diff options
author | Pyun YongHyeon <yongari@FreeBSD.org> | 2011-12-06 00:18:37 +0000 |
---|---|---|
committer | Pyun YongHyeon <yongari@FreeBSD.org> | 2011-12-06 00:18:37 +0000 |
commit | d2f7028c110cac110bc5172177d359e3ec8eb9ac (patch) | |
tree | 7ea741794fc6807bbaab4a0efb1a35f8865bc17f /sys/dev/et | |
parent | c8b727ce779a071efbc17a02fe351fa1432564b6 (diff) | |
download | src-d2f7028c110cac110bc5172177d359e3ec8eb9ac.tar.gz src-d2f7028c110cac110bc5172177d359e3ec8eb9ac.zip |
et(4) supports VLAN oversized frame so correctly set header length.
While I'm here remove initializing if_mtu, it is set by
ether_ifattach(9). Also move callout_init_mtx(9) to the right below
driver lock initialization.
Notes
Notes:
svn path=/head/; revision=228297
Diffstat (limited to 'sys/dev/et')
-rw-r--r-- | sys/dev/et/if_et.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/et/if_et.c b/sys/dev/et/if_et.c index 8138d90f2426..dac78b86e3a9 100644 --- a/sys/dev/et/if_et.c +++ b/sys/dev/et/if_et.c @@ -244,6 +244,7 @@ et_attach(device_t dev) sc->dev = dev; mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); + callout_init_mtx(&sc->sc_tick, &sc->sc_mtx, 0); ifp = sc->ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { @@ -335,7 +336,6 @@ et_attach(device_t dev) ifp->if_init = et_init; ifp->if_ioctl = et_ioctl; ifp->if_start = et_start; - ifp->if_mtu = ETHERMTU; ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_VLAN_MTU; ifp->if_capenable = ifp->if_capabilities; ifp->if_snd.ifq_drv_maxlen = ET_TX_NDESC - 1; @@ -352,7 +352,9 @@ et_attach(device_t dev) } ether_ifattach(ifp, eaddr); - callout_init_mtx(&sc->sc_tick, &sc->sc_mtx, 0); + + /* Tell the upper layer(s) we support long frames. */ + ifp->if_hdrlen = sizeof(struct ether_vlan_header); error = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_NET | INTR_MPSAFE, NULL, et_intr, sc, &sc->sc_irq_handle); |