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:
parent
ab3ce2d348
commit
2fc41157e8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user