Use define from if_var.h to access a field inside struct if_data,
that resides in struct ifnet. Sponsored by: Nginx, Inc.
This commit is contained in:
parent
04da7226c4
commit
1bffa9511f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270856
@ -363,7 +363,7 @@ ae_attach(device_t dev)
|
||||
|
||||
ether_ifattach(ifp, sc->eaddr);
|
||||
/* Tell the upper layer(s) we support long frames. */
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
/*
|
||||
* Create and run all helper tasks.
|
||||
|
@ -635,7 +635,7 @@ age_attach(device_t dev)
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
|
||||
/* Tell the upper layer(s) we support long frames. */
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
/* Create local taskq. */
|
||||
sc->age_tq = taskqueue_create_fast("age_taskq", M_WAITOK,
|
||||
|
@ -1012,7 +1012,7 @@ alc_attach(device_t dev)
|
||||
ifp->if_hwassist &= ~ALC_CSUM_FEATURES;
|
||||
|
||||
/* Tell the upper layer(s) we support long frames. */
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
/* Create local taskq. */
|
||||
sc->alc_tq = taskqueue_create_fast("alc_taskq", M_WAITOK,
|
||||
|
@ -658,7 +658,7 @@ ale_attach(device_t dev)
|
||||
ifp->if_capenable &= ~IFCAP_RXCSUM;
|
||||
|
||||
/* Tell the upper layer(s) we support long frames. */
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
/* Create local taskq. */
|
||||
sc->ale_tq = taskqueue_create_fast("ale_taskq", M_WAITOK,
|
||||
|
@ -1708,7 +1708,7 @@ atse_attach(device_t dev)
|
||||
ether_ifattach(ifp, sc->atse_eth_addr);
|
||||
|
||||
/* Tell the upper layer(s) about vlan mtu support. */
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_VLAN_MTU;
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
#ifdef DEVICE_POLLING
|
||||
|
@ -514,7 +514,7 @@ bfe_attach(device_t dev)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_VLAN_MTU;
|
||||
ifp->if_capenable |= IFCAP_VLAN_MTU;
|
||||
|
||||
|
@ -423,7 +423,7 @@ cas_attach(struct cas_softc *sc)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames/checksum offloads.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities = IFCAP_VLAN_MTU;
|
||||
if ((sc->sc_flags & CAS_NO_CSUM) == 0) {
|
||||
ifp->if_capabilities |= IFCAP_HWCSUM;
|
||||
|
@ -2484,7 +2484,7 @@ dc_attach(device_t dev)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_VLAN_MTU;
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
#ifdef DEVICE_POLLING
|
||||
|
@ -3241,7 +3241,7 @@ igb_setup_interface(device_t dev, struct adapter *adapter)
|
||||
* Tell the upper layer(s) we
|
||||
* support full VLAN capability.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING
|
||||
| IFCAP_VLAN_HWTSO
|
||||
| IFCAP_VLAN_MTU;
|
||||
|
@ -1676,7 +1676,7 @@ ffec_attach(device_t dev)
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, TX_DESC_COUNT - 1);
|
||||
ifp->if_snd.ifq_drv_maxlen = TX_DESC_COUNT - 1;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
#if 0 /* XXX The hardware keeps stats we could use for these. */
|
||||
ifp->if_linkmib = &sc->mibdata;
|
||||
|
@ -223,7 +223,7 @@ fwe_attach(device_t dev)
|
||||
splx(s);
|
||||
|
||||
/* Tell the upper layer(s) we support long frames. */
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
|
||||
ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_POLLING;
|
||||
ifp->if_capenable |= IFCAP_VLAN_MTU;
|
||||
|
@ -382,7 +382,7 @@ gem_attach(struct gem_softc *sc)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames/checksum offloads.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_HWCSUM;
|
||||
ifp->if_hwassist |= sc->sc_csum_features;
|
||||
ifp->if_capenable |= IFCAP_VLAN_MTU | IFCAP_HWCSUM;
|
||||
|
@ -324,7 +324,7 @@ gx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
return (0);
|
||||
|
||||
case SIOCSIFMTU:
|
||||
if (ifr->ifr_mtu + ifp->if_data.ifi_hdrlen > GXEMUL_ETHER_DEV_MTU)
|
||||
if (ifr->ifr_mtu + ifp->if_hdrlen > GXEMUL_ETHER_DEV_MTU)
|
||||
return (ENOTSUP);
|
||||
return (0);
|
||||
|
||||
|
@ -367,7 +367,7 @@ hme_config(struct hme_softc *sc)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames/checksum offloads.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_HWCSUM;
|
||||
ifp->if_hwassist |= sc->sc_csum_features;
|
||||
ifp->if_capenable |= IFCAP_VLAN_MTU | IFCAP_HWCSUM;
|
||||
|
@ -275,7 +275,7 @@ netvsc_attach(device_t dev)
|
||||
/*
|
||||
* Tell upper layers that we support full VLAN capability.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
|
||||
ifp->if_capenable |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
|
||||
|
||||
|
@ -1368,7 +1368,7 @@ ixgb_setup_interface(device_t dev, struct adapter * adapter)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
#if __FreeBSD_version >= 500000
|
||||
ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
|
||||
|
@ -2739,7 +2739,7 @@ ixgbe_setup_interface(device_t dev, struct adapter *adapter)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_TSO | IFCAP_VLAN_HWCSUM;
|
||||
ifp->if_capabilities |= IFCAP_JUMBO_MTU;
|
||||
|
@ -1851,7 +1851,7 @@ ixv_setup_interface(device_t dev, struct adapter *adapter)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_TSO4 | IFCAP_VLAN_HWCSUM;
|
||||
ifp->if_capabilities |= IFCAP_JUMBO_MTU;
|
||||
|
@ -2288,7 +2288,7 @@ ixl_setup_interface(device_t dev, struct ixl_vsi *vsi)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
ifp->if_capabilities |= IFCAP_HWCSUM;
|
||||
ifp->if_capabilities |= IFCAP_HWCSUM_IPV6;
|
||||
|
@ -1367,7 +1367,7 @@ ixlv_setup_interface(device_t dev, struct ixlv_sc *sc)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
ifp->if_capabilities |= IFCAP_HWCSUM;
|
||||
ifp->if_capabilities |= IFCAP_HWCSUM_IPV6;
|
||||
|
@ -878,7 +878,7 @@ jme_attach(device_t dev)
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
|
||||
/* Tell the upper layer(s) we support long frames. */
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
/* Create local taskq. */
|
||||
sc->jme_tq = taskqueue_create_fast("jme_taskq", M_WAITOK,
|
||||
|
@ -196,7 +196,7 @@ lance_attach(struct lance_softc *sc)
|
||||
ether_ifattach(ifp, sc->sc_enaddr);
|
||||
|
||||
/* Claim 802.1q capability. */
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_VLAN_MTU;
|
||||
ifp->if_capenable |= IFCAP_VLAN_MTU;
|
||||
}
|
||||
|
@ -1710,7 +1710,7 @@ msk_attach(device_t dev)
|
||||
* Must appear after the call to ether_ifattach() because
|
||||
* ether_ifattach() sets ifi_hdrlen to the default value.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
/*
|
||||
* Do miibus setup.
|
||||
|
@ -819,7 +819,7 @@ nf10bmac_attach(device_t dev)
|
||||
ether_ifattach(ifp, sc->nf10bmac_eth_addr);
|
||||
|
||||
/* Tell the upper layer(s) about vlan mtu support. */
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_VLAN_MTU;
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
#ifdef DEVICE_POLLING
|
||||
|
@ -964,7 +964,7 @@ nge_attach(device_t dev)
|
||||
* Must appear after the call to ether_ifattach() because
|
||||
* ether_ifattach() sets ifi_hdrlen to the default value.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
/*
|
||||
* Hookup IRQ last.
|
||||
|
@ -699,7 +699,7 @@ qla_init_ifnet(device_t dev, qla_host_t *ha)
|
||||
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
ifmedia_init(&ha->media, IFM_IMASK, qla_media_change, qla_media_status);
|
||||
|
||||
|
@ -775,7 +775,7 @@ qla_init_ifnet(device_t dev, qla_host_t *ha)
|
||||
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
ifmedia_init(&ha->media, IFM_IMASK, qla_media_change, qla_media_status);
|
||||
|
||||
|
@ -770,7 +770,7 @@ qls_init_ifnet(device_t dev, qla_host_t *ha)
|
||||
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
ifmedia_init(&ha->media, IFM_IMASK, qls_media_change, qls_media_status);
|
||||
|
||||
|
@ -1681,7 +1681,7 @@ re_attach(device_t dev)
|
||||
* Must appear after the call to ether_ifattach() because
|
||||
* ether_ifattach() sets ifi_hdrlen to the default value.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
#ifdef DEV_NETMAP
|
||||
re_netmap_attach(sc);
|
||||
|
@ -411,7 +411,7 @@ rt_attach(device_t dev)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_VLAN_MTU;
|
||||
ifp->if_capenable |= IFCAP_VLAN_MTU;
|
||||
ifp->if_capabilities |= IFCAP_RXCSUM|IFCAP_TXCSUM;
|
||||
|
@ -902,7 +902,7 @@ sf_attach(device_t dev)
|
||||
* Must appear after the call to ether_ifattach() because
|
||||
* ether_ifattach() sets ifi_hdrlen to the default value.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
/* Hook interrupt last to avoid having to lock softc */
|
||||
error = bus_setup_intr(dev, sc->sf_irq, INTR_TYPE_NET | INTR_MPSAFE,
|
||||
|
@ -641,7 +641,7 @@ sge_attach(device_t dev)
|
||||
IFCAP_VLAN_HWTSO | IFCAP_VLAN_MTU;
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
/* Tell the upper layer(s) we support long frames. */
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
/* Hook interrupt last to avoid having to lock softc */
|
||||
error = bus_setup_intr(dev, sc->sge_irq, INTR_TYPE_NET | INTR_MPSAFE,
|
||||
|
@ -1089,7 +1089,7 @@ sis_attach(device_t dev)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_VLAN_MTU;
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
#ifdef DEVICE_POLLING
|
||||
|
@ -1496,7 +1496,7 @@ sk_attach(dev)
|
||||
* Must appear after the call to ether_ifattach() because
|
||||
* ether_ifattach() sets ifi_hdrlen to the default value.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
/*
|
||||
* Do miibus setup.
|
||||
|
@ -1024,7 +1024,7 @@ ste_attach(device_t dev)
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_VLAN_MTU;
|
||||
if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0)
|
||||
ifp->if_capabilities |= IFCAP_WOL_MAGIC;
|
||||
|
@ -621,7 +621,7 @@ stge_attach(device_t dev)
|
||||
* Must appear after the call to ether_ifattach() because
|
||||
* ether_ifattach() sets ifi_hdrlen to the default value.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
/*
|
||||
* The manual recommends disabling early transmit, so we
|
||||
|
@ -436,7 +436,7 @@ txp_attach(device_t dev)
|
||||
ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM;
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
/* Tell the upper layer(s) we support long frames. */
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
WRITE_REG(sc, TXP_IER, TXP_INTR_NONE);
|
||||
WRITE_REG(sc, TXP_IMR, TXP_INTR_ALL);
|
||||
|
@ -1130,7 +1130,7 @@ 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);
|
||||
ifp->if_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,
|
||||
|
@ -947,7 +947,7 @@ vtnet_setup_interface(struct vtnet_softc *sc)
|
||||
ifp->if_capabilities |= IFCAP_LINKSTATE;
|
||||
|
||||
/* Tell the upper layer(s) we support long frames. */
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities |= IFCAP_JUMBO_MTU | IFCAP_VLAN_MTU;
|
||||
|
||||
if (virtio_with_feature(dev, VIRTIO_NET_F_CSUM)) {
|
||||
|
@ -784,7 +784,7 @@ vr_attach(device_t dev)
|
||||
* Must appear after the call to ether_ifattach() because
|
||||
* ether_ifattach() sets ifi_hdrlen to the default value.
|
||||
*/
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
/* Hook interrupt last to avoid having to lock softc. */
|
||||
error = bus_setup_intr(dev, sc->vr_irq, INTR_TYPE_NET | INTR_MPSAFE,
|
||||
|
@ -1395,7 +1395,7 @@ vxge_ifp_setup(device_t ndev)
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
|
||||
/* IFQ_SET_READY(&ifp->if_snd); */
|
||||
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
|
||||
ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM;
|
||||
ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
|
||||
|
@ -238,7 +238,7 @@ octm_attach(device_t dev)
|
||||
|
||||
ifp->if_transmit = octm_transmit;
|
||||
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities = IFCAP_VLAN_MTU;
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
|
||||
@ -473,7 +473,7 @@ octm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
return (0);
|
||||
|
||||
case SIOCSIFMTU:
|
||||
cvmx_mgmt_port_set_max_packet_size(sc->sc_port, ifr->ifr_mtu + ifp->if_data.ifi_hdrlen);
|
||||
cvmx_mgmt_port_set_max_packet_size(sc->sc_port, ifr->ifr_mtu + ifp->if_hdrlen);
|
||||
return (0);
|
||||
|
||||
case SIOCSIFMEDIA:
|
||||
|
@ -189,7 +189,7 @@ octe_attach(device_t dev)
|
||||
|
||||
ifp->if_transmit = octe_transmit;
|
||||
|
||||
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header);
|
||||
ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_HWCSUM;
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
ifp->if_hwassist = CSUM_TCP | CSUM_UDP;
|
||||
|
Loading…
Reference in New Issue
Block a user