Skip to content

Commit

Permalink
ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again
Browse files Browse the repository at this point in the history
Reviewed by:	yongari
  • Loading branch information
Kevin Lo authored and Kevin Lo committed Jan 7, 2012
1 parent 324930d commit 5bbe0c5
Show file tree
Hide file tree
Showing 35 changed files with 0 additions and 35 deletions.
1 change: 0 additions & 1 deletion sys/dev/an/if_an.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/bfe/if_bfe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion sys/dev/bm/if_bm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/bxe/if_bxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
1 change: 0 additions & 1 deletion sys/dev/e1000/if_em.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/e1000/if_igb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/e1000/if_lem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/ep/if_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/ex/if_ex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/firewire/if_fwe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion sys/dev/ie/if_ie.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/if_ndis/if_ndis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/ixgb/if_ixgb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/ixgbe/ixgbe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/ixgbe/ixv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/lge/if_lge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/msk/if_msk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/*
Expand Down
1 change: 0 additions & 1 deletion sys/dev/my/if_my.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/nfe/if_nfe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/nve/if_nve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/qlxgb/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/rt/if_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion sys/dev/sis/if_sis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/sk/if_sk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion sys/dev/sn/if_sn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/snc/dp83932.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
1 change: 0 additions & 1 deletion sys/dev/stge/if_stge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion sys/dev/tl/if_tl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/tsec/if_tsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/usb/net/usb_ethernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/vx/if_vx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/vxge/vxge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/wb/if_wb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion sys/dev/xen/netback/netback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion sys/dev/xen/netfront/netfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5bbe0c5

Please sign in to comment.