aboutsummaryrefslogtreecommitdiff
path: root/sys/mips/atheros
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <loos@FreeBSD.org>2014-07-03 20:16:48 +0000
committerLuiz Otavio O Souza <loos@FreeBSD.org>2014-07-03 20:16:48 +0000
commit4bd2c6a20d91b03499ce99e3b00248653811e8da (patch)
tree1b23a2f8a06730f6298d08ba4bfbda91b4ed2595 /sys/mips/atheros
parentbfae93299c73fdd7305249b825b96c268684b41e (diff)
downloadsrc-4bd2c6a20d91b03499ce99e3b00248653811e8da.tar.gz
src-4bd2c6a20d91b03499ce99e3b00248653811e8da.zip
Properly advertise that if_arge can handle long frames (if_arge is set to
handle packets up to 1536 bytes) This fixes the need to frag that could happen when using vlans on top of if_arge (which is a common case for the use the switch ports as individual NICs). Previously to this commit any vlan setup with if_arge as parent would have the MTU of the parent interface reduced by the size of dot1q header (4 bytes). Tested on TP-Link 1043ND (where the WAN port is just a switch port setup to tag packets in a different VLAN than the LAN ports). Reported and tested by: Harm Weites (harm at weites.com)
Notes
Notes: svn path=/head/; revision=268235
Diffstat (limited to 'sys/mips/atheros')
-rw-r--r--sys/mips/atheros/if_arge.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/mips/atheros/if_arge.c b/sys/mips/atheros/if_arge.c
index f4ead993004b..85617387f5d7 100644
--- a/sys/mips/atheros/if_arge.c
+++ b/sys/mips/atheros/if_arge.c
@@ -703,6 +703,9 @@ arge_attach(device_t dev)
ifp->if_snd.ifq_maxlen = ifqmaxlen;
IFQ_SET_READY(&ifp->if_snd);
+ /* Tell the upper layer(s) we support long frames. */
+ ifp->if_capabilities |= IFCAP_VLAN_MTU;
+
ifp->if_capenable = ifp->if_capabilities;
#ifdef DEVICE_POLLING
ifp->if_capabilities |= IFCAP_POLLING;