diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-08-09 10:20:02 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-08-09 10:20:02 +0000 |
commit | 5d770a09e85126b8b3e9fe302c36350a90210cbe (patch) | |
tree | bb70e59641e2310a3c26ec449af5ab0cb7420d9d /sys/dev/awi | |
parent | 74759aaa78777146f23aa05c856f574efdfb41d9 (diff) | |
download | FreeBSD-src-5d770a09e85126b8b3e9fe302c36350a90210cbe.zip FreeBSD-src-5d770a09e85126b8b3e9fe302c36350a90210cbe.tar.gz |
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
ifnet.if_drv_flags. Device drivers are now responsible for
synchronizing access to these flags, as they are in if_drv_flags. This
helps prevent races between the network stack and device driver in
maintaining the interface flags field.
Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
some less so.
Reviewed by: pjd, bz
MFC after: 7 days
Diffstat (limited to 'sys/dev/awi')
-rw-r--r-- | sys/dev/awi/awi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/awi/awi.c b/sys/dev/awi/awi.c index 4e2aab1..27e339d 100644 --- a/sys/dev/awi/awi.c +++ b/sys/dev/awi/awi.c @@ -653,8 +653,8 @@ awi_init(struct ifnet *ifp) sc->sc_rxdoff = awi_read_4(sc, AWI_CA_IRX_DATA_DESC); sc->sc_rxmoff = awi_read_4(sc, AWI_CA_IRX_PS_DESC); - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; ic->ic_state = IEEE80211_S_INIT; if (ic->ic_opmode == IEEE80211_M_AHDEMO || @@ -720,7 +720,7 @@ awi_stop(struct ifnet *ifp, int disable) awi_write_1(sc, AWI_CA_FTX_CF, 0); (void)awi_cmd(sc, AWI_CMD_FLUSH_TX, AWI_WAIT); } - ifp->if_flags &= ~(IFF_RUNNING|IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING|IFF_DRV_OACTIVE); ifp->if_timer = 0; sc->sc_tx_timer = sc->sc_rx_timer = 0; if (sc->sc_rxpend != NULL) { @@ -763,7 +763,7 @@ awi_start(struct ifnet *ifp) if (m0 != NULL) { len = m0->m_pkthdr.len; if (awi_next_txd(sc, len, &frame, &ntxd)) { - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } IF_DEQUEUE(&ic->ic_mgtq, m0); @@ -790,7 +790,7 @@ awi_start(struct ifnet *ifp) IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN; } if (awi_next_txd(sc, len, &frame, &ntxd)) { - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } IFQ_DEQUEUE(&ifp->if_snd, m0); @@ -1293,7 +1293,7 @@ awi_tx_int(struct awi_softc *sc) DPRINTF2(("awi_txint: txdone %d txnext %d txbase %d txend %d\n", sc->sc_txdone, sc->sc_txnext, sc->sc_txbase, sc->sc_txend)); sc->sc_tx_timer = 0; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; awi_start(ifp); } |