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().
This commit is contained in:
Pyun YongHyeon 2009-12-14 22:55:20 +00:00
parent 37c90cfec7
commit 0c003e99df
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=200558

View File

@ -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);