Take a step towards removing if_watchdog/if_timer. Don't explicitly set
if_watchdog/if_timer to NULL/0 when initializing an ifnet. if_alloc() sets those members to NULL/0 already.
This commit is contained in:
parent
f1b211841d
commit
e1b17582f4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=198988
@ -560,7 +560,6 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
|
||||
ifp->if_softc = sc;
|
||||
ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST;
|
||||
ifp->if_start = ath_start;
|
||||
ifp->if_watchdog = NULL;
|
||||
ifp->if_ioctl = ath_ioctl;
|
||||
ifp->if_init = ath_init;
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
|
||||
|
@ -1054,10 +1054,6 @@ cxgb_port_attach(device_t dev)
|
||||
ifp->if_ioctl = cxgb_ioctl;
|
||||
ifp->if_start = cxgb_start;
|
||||
|
||||
|
||||
ifp->if_timer = 0; /* Disable ifnet watchdog */
|
||||
ifp->if_watchdog = NULL;
|
||||
|
||||
ifp->if_snd.ifq_drv_maxlen = cxgb_snd_queue_len;
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
@ -1928,7 +1928,6 @@ hatm_attach(device_t dev)
|
||||
ifp->if_flags = IFF_SIMPLEX;
|
||||
ifp->if_ioctl = hatm_ioctl;
|
||||
ifp->if_start = hatm_start;
|
||||
ifp->if_watchdog = NULL;
|
||||
ifp->if_init = hatm_init;
|
||||
|
||||
utopia_attach(&sc->utopia, IFP2IFATM(sc->ifp), &sc->media, &sc->mtx,
|
||||
|
@ -2508,8 +2508,6 @@ ixgbe_setup_interface(device_t dev, struct adapter *adapter)
|
||||
ifp->if_transmit = ixgbe_mq_start;
|
||||
ifp->if_qflush = ixgbe_qflush;
|
||||
#endif
|
||||
ifp->if_timer = 0;
|
||||
ifp->if_watchdog = NULL;
|
||||
ifp->if_snd.ifq_maxlen = adapter->num_tx_desc - 2;
|
||||
|
||||
ether_ifattach(ifp, adapter->hw.mac.addr);
|
||||
|
@ -567,7 +567,6 @@ nfe_attach(device_t dev)
|
||||
ifp->if_start = nfe_start;
|
||||
ifp->if_hwassist = 0;
|
||||
ifp->if_capabilities = 0;
|
||||
ifp->if_watchdog = NULL;
|
||||
ifp->if_init = nfe_init;
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, NFE_TX_RING_COUNT - 1);
|
||||
ifp->if_snd.ifq_drv_maxlen = NFE_TX_RING_COUNT - 1;
|
||||
|
@ -197,11 +197,9 @@ patm_attach(device_t dev)
|
||||
ifp->if_softc = sc;
|
||||
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
|
||||
ifp->if_flags = IFF_SIMPLEX;
|
||||
ifp->if_watchdog = NULL;
|
||||
ifp->if_init = patm_init;
|
||||
ifp->if_ioctl = patm_ioctl;
|
||||
ifp->if_start = patm_start;
|
||||
ifp->if_watchdog = NULL;
|
||||
|
||||
/* do this early so we can destroy unconditionally */
|
||||
mtx_init(&sc->mtx, device_get_nameunit(dev),
|
||||
|
@ -1372,8 +1372,6 @@ sk_attach(dev)
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
ifp->if_ioctl = sk_ioctl;
|
||||
ifp->if_start = sk_start;
|
||||
ifp->if_timer = 0;
|
||||
ifp->if_watchdog = NULL;
|
||||
ifp->if_init = sk_init;
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, SK_TX_RING_CNT - 1);
|
||||
ifp->if_snd.ifq_drv_maxlen = SK_TX_RING_CNT - 1;
|
||||
|
@ -722,8 +722,6 @@ stge_attach(device_t dev)
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
ifp->if_ioctl = stge_ioctl;
|
||||
ifp->if_start = stge_start;
|
||||
ifp->if_timer = 0;
|
||||
ifp->if_watchdog = NULL;
|
||||
ifp->if_init = stge_init;
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_snd.ifq_drv_maxlen = STGE_TX_RING_CNT - 1;
|
||||
|
@ -128,7 +128,6 @@ ef_attach(struct efnet *sc)
|
||||
struct ifnet *ifp = sc->ef_ifp;
|
||||
|
||||
ifp->if_start = ef_start;
|
||||
ifp->if_watchdog = NULL;
|
||||
ifp->if_init = ef_init;
|
||||
ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
|
||||
ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST);
|
||||
|
@ -391,7 +391,6 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct ieee80211vap *vap,
|
||||
ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST;
|
||||
ifp->if_start = ieee80211_start;
|
||||
ifp->if_ioctl = ieee80211_ioctl;
|
||||
ifp->if_watchdog = NULL; /* NB: no watchdog routine */
|
||||
ifp->if_init = ieee80211_init;
|
||||
/* NB: input+output filled in by ether_ifattach */
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
|
||||
|
@ -369,7 +369,6 @@ ng_eiface_constructor(node_p node)
|
||||
ifp->if_output = ether_output;
|
||||
ifp->if_start = ng_eiface_start;
|
||||
ifp->if_ioctl = ng_eiface_ioctl;
|
||||
ifp->if_watchdog = NULL;
|
||||
ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
|
||||
ifp->if_flags = (IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST);
|
||||
|
||||
|
@ -1226,7 +1226,6 @@ ng_fec_constructor(node_p node)
|
||||
ifp->if_start = ng_fec_start;
|
||||
ifp->if_ioctl = ng_fec_ioctl;
|
||||
ifp->if_init = ng_fec_init;
|
||||
ifp->if_watchdog = NULL;
|
||||
ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
|
||||
ifp->if_mtu = NG_FEC_MTU_DEFAULT;
|
||||
ifp->if_flags = (IFF_SIMPLEX|IFF_BROADCAST|IFF_MULTICAST);
|
||||
|
@ -558,7 +558,6 @@ ng_iface_constructor(node_p node)
|
||||
ifp->if_output = ng_iface_output;
|
||||
ifp->if_start = ng_iface_start;
|
||||
ifp->if_ioctl = ng_iface_ioctl;
|
||||
ifp->if_watchdog = NULL;
|
||||
ifp->if_mtu = NG_IFACE_MTU_DEFAULT;
|
||||
ifp->if_flags = (IFF_SIMPLEX|IFF_POINTOPOINT|IFF_NOARP|IFF_MULTICAST);
|
||||
ifp->if_type = IFT_PROPVIRTUAL; /* XXX */
|
||||
|
@ -279,7 +279,6 @@ ng_sppp_constructor (node_p node)
|
||||
if_initname (SP2IFP(pp), NG_SPPP_IFACE_NAME, priv->unit);
|
||||
ifp->if_start = ng_sppp_start;
|
||||
ifp->if_ioctl = ng_sppp_ioctl;
|
||||
ifp->if_watchdog = NULL;
|
||||
ifp->if_flags = (IFF_POINTOPOINT|IFF_MULTICAST);
|
||||
|
||||
/* Give this node the same name as the interface (if possible) */
|
||||
|
Loading…
Reference in New Issue
Block a user