ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again
Reviewed by: yongari
This commit is contained in:
parent
324930d7f8
commit
5bbe0c5357
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=229767
@ -761,7 +761,6 @@ an_attach(struct an_softc *sc, int flags)
|
||||
ifp->if_softc = sc;
|
||||
if_initname(ifp, device_get_name(sc->an_dev),
|
||||
device_get_unit(sc->an_dev));
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
ifp->if_ioctl = an_ioctl;
|
||||
ifp->if_start = an_start;
|
||||
|
@ -489,7 +489,6 @@ bfe_attach(device_t dev)
|
||||
ifp->if_ioctl = bfe_ioctl;
|
||||
ifp->if_start = bfe_start;
|
||||
ifp->if_init = bfe_init;
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, BFE_TX_QLEN);
|
||||
ifp->if_snd.ifq_drv_maxlen = BFE_TX_QLEN;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
@ -468,7 +468,6 @@ bm_attach(device_t dev)
|
||||
|
||||
if_initname(ifp, device_get_name(sc->sc_dev),
|
||||
device_get_unit(sc->sc_dev));
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
ifp->if_start = bm_start;
|
||||
ifp->if_ioctl = bm_ioctl;
|
||||
|
@ -2136,7 +2136,6 @@ bxe_attach(device_t dev)
|
||||
#endif
|
||||
|
||||
ifp->if_init = bxe_init;
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_hwassist = BXE_IF_HWASSIST;
|
||||
ifp->if_capabilities = BXE_IF_CAPABILITIES;
|
||||
/* TPA not enabled by default. */
|
||||
|
@ -2898,7 +2898,6 @@ em_setup_interface(device_t dev, struct adapter *adapter)
|
||||
return (-1);
|
||||
}
|
||||
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_init = em_init;
|
||||
ifp->if_softc = adapter;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
|
@ -2899,7 +2899,6 @@ igb_setup_interface(device_t dev, struct adapter *adapter)
|
||||
return (-1);
|
||||
}
|
||||
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_init = igb_init;
|
||||
ifp->if_softc = adapter;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
|
@ -2354,7 +2354,6 @@ lem_setup_interface(device_t dev, struct adapter *adapter)
|
||||
return (-1);
|
||||
}
|
||||
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_init = lem_init;
|
||||
ifp->if_softc = adapter;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
|
@ -301,7 +301,6 @@ ep_attach(struct ep_softc *sc)
|
||||
|
||||
ifp->if_softc = sc;
|
||||
if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev));
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
ifp->if_start = epstart;
|
||||
ifp->if_ioctl = epioctl;
|
||||
|
@ -232,7 +232,6 @@ ex_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_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST;
|
||||
ifp->if_start = ex_start;
|
||||
ifp->if_ioctl = ex_ioctl;
|
||||
|
@ -214,7 +214,6 @@ fwe_attach(device_t dev)
|
||||
#endif
|
||||
ifp->if_start = fwe_start;
|
||||
ifp->if_ioctl = fwe_ioctl;
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_flags = (IFF_BROADCAST|IFF_SIMPLEX|IFF_MULTICAST);
|
||||
ifp->if_snd.ifq_maxlen = TX_MAX_QUEUE;
|
||||
|
||||
|
@ -313,7 +313,6 @@ ie_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_start = iestart;
|
||||
ifp->if_ioctl = ieioctl;
|
||||
|
@ -714,7 +714,6 @@ ndis_attach(dev)
|
||||
ndis_probe_offload(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 = ndis_ioctl;
|
||||
ifp->if_start = ndis_start;
|
||||
|
@ -1354,7 +1354,6 @@ ixgb_setup_interface(device_t dev, struct adapter * adapter)
|
||||
ifp->if_unit = device_get_unit(dev);
|
||||
ifp->if_name = "ixgb";
|
||||
#endif
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_baudrate = 1000000000;
|
||||
ifp->if_init = ixgb_init;
|
||||
ifp->if_softc = adapter;
|
||||
|
@ -2431,7 +2431,6 @@ ixgbe_setup_interface(device_t dev, struct adapter *adapter)
|
||||
return (-1);
|
||||
}
|
||||
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_baudrate = 1000000000;
|
||||
ifp->if_init = ixgbe_init;
|
||||
ifp->if_softc = adapter;
|
||||
|
@ -1829,7 +1829,6 @@ ixv_setup_interface(device_t dev, struct adapter *adapter)
|
||||
if (ifp == NULL)
|
||||
panic("%s: can not if_alloc()\n", device_get_nameunit(dev));
|
||||
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_baudrate = 1000000000;
|
||||
ifp->if_init = ixv_init;
|
||||
ifp->if_softc = adapter;
|
||||
|
@ -536,7 +536,6 @@ lge_attach(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 = lge_ioctl;
|
||||
ifp->if_start = lge_start;
|
||||
|
@ -1636,7 +1636,6 @@ msk_attach(device_t dev)
|
||||
}
|
||||
ifp->if_softc = sc_if;
|
||||
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_capabilities = IFCAP_TXCSUM | IFCAP_TSO4;
|
||||
/*
|
||||
|
@ -895,7 +895,6 @@ my_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 = my_ioctl;
|
||||
ifp->if_start = my_start;
|
||||
|
@ -565,7 +565,6 @@ nfe_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 = nfe_ioctl;
|
||||
ifp->if_start = nfe_start;
|
||||
|
@ -529,7 +529,6 @@ nve_attach(device_t dev)
|
||||
ifp->if_ioctl = nve_ioctl;
|
||||
ifp->if_start = nve_ifstart;
|
||||
ifp->if_init = nve_init;
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_baudrate = IF_Mbps(100);
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, TX_RING_SIZE - 1);
|
||||
ifp->if_snd.ifq_drv_maxlen = TX_RING_SIZE - 1;
|
||||
|
@ -660,7 +660,6 @@ qla_init_ifnet(device_t dev, qla_host_t *ha)
|
||||
|
||||
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
|
||||
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_baudrate = (1 * 1000 * 1000 *1000);
|
||||
ifp->if_init = qla_init;
|
||||
ifp->if_softc = ha;
|
||||
|
@ -383,7 +383,6 @@ rt_attach(device_t dev)
|
||||
ifp->if_init = rt_init;
|
||||
ifp->if_ioctl = rt_ioctl;
|
||||
ifp->if_start = rt_start;
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
#define RT_TX_QLEN 256
|
||||
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, RT_TX_QLEN);
|
||||
|
@ -1054,7 +1054,6 @@ sis_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 = sis_ioctl;
|
||||
ifp->if_start = sis_start;
|
||||
|
@ -1350,7 +1350,6 @@ sk_attach(dev)
|
||||
}
|
||||
ifp->if_softc = sc_if;
|
||||
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
/*
|
||||
* SK_GENESIS has a bug in checksum offload - From linux.
|
||||
|
@ -201,7 +201,6 @@ sn_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_start = snstart;
|
||||
ifp->if_ioctl = snioctl;
|
||||
|
@ -176,7 +176,6 @@ sncconfig(sc, media, nmedia, defmedia, myea)
|
||||
ifp->if_start = sncstart;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
ifp->if_init = sncinit;
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen);
|
||||
|
||||
/* Initialize media goo. */
|
||||
|
@ -573,7 +573,6 @@ stge_attach(device_t dev)
|
||||
ifp->if_ioctl = stge_ioctl;
|
||||
ifp->if_start = stge_start;
|
||||
ifp->if_init = stge_init;
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_snd.ifq_drv_maxlen = STGE_TX_RING_CNT - 1;
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
@ -1175,7 +1175,6 @@ tl_attach(dev)
|
||||
ifp->if_ioctl = tl_ioctl;
|
||||
ifp->if_start = tl_start;
|
||||
ifp->if_init = tl_init;
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_snd.ifq_maxlen = TL_TX_LIST_CNT - 1;
|
||||
ifp->if_capabilities |= IFCAP_VLAN_MTU;
|
||||
ifp->if_capenable |= IFCAP_VLAN_MTU;
|
||||
|
@ -247,7 +247,6 @@ tsec_attach(struct tsec_softc *sc)
|
||||
|
||||
ifp->if_softc = sc;
|
||||
if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev));
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_flags = IFF_SIMPLEX | IFF_MULTICAST | IFF_BROADCAST;
|
||||
ifp->if_init = tsec_init;
|
||||
ifp->if_start = tsec_start;
|
||||
|
@ -219,7 +219,6 @@ ue_attach_post_task(struct usb_proc_msg *_task)
|
||||
ue->ue_ifp = ifp;
|
||||
error = ue->ue_methods->ue_attach_post_sub(ue);
|
||||
} else {
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
if (ue->ue_methods->ue_ioctl != NULL)
|
||||
ifp->if_ioctl = ue->ue_methods->ue_ioctl;
|
||||
|
@ -188,7 +188,6 @@ vx_attach(device_t dev)
|
||||
eaddr[(i << 1) + 1] = x;
|
||||
}
|
||||
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_snd.ifq_maxlen = ifqmaxlen;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
ifp->if_start = vx_start;
|
||||
|
@ -1378,7 +1378,6 @@ vxge_ifp_setup(device_t ndev)
|
||||
/* Initialize interface ifnet structure */
|
||||
if_initname(ifp, device_get_name(ndev), device_get_unit(ndev));
|
||||
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_baudrate = VXGE_BAUDRATE;
|
||||
ifp->if_init = vxge_init;
|
||||
ifp->if_softc = vdev;
|
||||
|
@ -660,7 +660,6 @@ wb_attach(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 = wb_ioctl;
|
||||
ifp->if_start = wb_start;
|
||||
|
@ -375,7 +375,6 @@ netif_create(int handle, struct xenbus_device *xdev, char *bridge)
|
||||
ifp->if_output = ether_output;
|
||||
ifp->if_start = netback_start;
|
||||
ifp->if_ioctl = netback_ioctl;
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_snd.ifq_maxlen = NET_TX_RING_SIZE - 1;
|
||||
|
||||
DPRINTF("Created %s for domid=%d handle=%d\n", IFNAME(netif), netif->domid, netif->handle);
|
||||
|
@ -2145,7 +2145,6 @@ create_netdev(device_t dev)
|
||||
ifp->if_watchdog = xn_watchdog;
|
||||
#endif
|
||||
ifp->if_init = xn_ifinit;
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_snd.ifq_maxlen = NET_TX_RING_SIZE - 1;
|
||||
|
||||
ifp->if_hwassist = XN_CSUM_FEATURES;
|
||||
|
Loading…
Reference in New Issue
Block a user