svn commit: r200558 - head/sys/dev/vge
Pyun YongHyeon
yongari at FreeBSD.org
Mon Dec 14 14:55:21 PST 2009
Author: yongari
Date: Mon Dec 14 22:55:20 2009
New Revision: 200558
URL: http://svn.freebsd.org/changeset/base/200558
Log:
Tell upper layer vge(4) supports long frames. This should be done
after ether_ifattach(), as ether_ifattach() initializes it with
ETHER_HDR_LEN.
While I'm here remove setting if_mtu, it's already handled in
ether_ifattach().
Modified:
head/sys/dev/vge/if_vge.c
Modified: head/sys/dev/vge/if_vge.c
==============================================================================
--- head/sys/dev/vge/if_vge.c Mon Dec 14 22:47:09 2009 (r200557)
+++ head/sys/dev/vge/if_vge.c Mon Dec 14 22:55:20 2009 (r200558)
@@ -1045,7 +1045,6 @@ vge_attach(device_t dev)
ifp->if_softc = sc;
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = vge_ioctl;
ifp->if_capabilities = IFCAP_VLAN_MTU;
@@ -1066,6 +1065,9 @@ vge_attach(device_t dev)
*/
ether_ifattach(ifp, eaddr);
+ /* Tell the upper layer(s) we support long frames. */
+ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
+
/* Hook interrupt last to avoid having to lock softc */
error = bus_setup_intr(dev, sc->vge_irq, INTR_TYPE_NET|INTR_MPSAFE,
NULL, vge_intr, sc, &sc->vge_intrhand);
More information about the svn-src-head
mailing list