Lines 1967-1977
Link Here
|
1967 |
sc->sc_tx_timer = 0; |
1967 |
sc->sc_tx_timer = 0; |
1968 |
if (--ring->queued < WPI_TX_RING_LOMARK) { |
1968 |
if (--ring->queued < WPI_TX_RING_LOMARK) { |
1969 |
sc->qfullmsk &= ~(1 << ring->qid); |
1969 |
sc->qfullmsk &= ~(1 << ring->qid); |
|
|
1970 |
IF_LOCK(&ifp->if_snd); |
1970 |
if (sc->qfullmsk == 0 && |
1971 |
if (sc->qfullmsk == 0 && |
1971 |
(ifp->if_drv_flags & IFF_DRV_OACTIVE)) { |
1972 |
(ifp->if_drv_flags & IFF_DRV_OACTIVE)) { |
1972 |
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; |
1973 |
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; |
|
|
1974 |
IF_UNLOCK(&ifp->if_snd); |
1973 |
ieee80211_runtask(ic, &sc->sc_start_task); |
1975 |
ieee80211_runtask(ic, &sc->sc_start_task); |
1974 |
} |
1976 |
} else |
|
|
1977 |
IF_UNLOCK(&ifp->if_snd); |
1975 |
} |
1978 |
} |
1976 |
|
1979 |
|
1977 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); |
1980 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); |
Lines 2871-2883
Link Here
|
2871 |
|
2874 |
|
2872 |
DPRINTF(sc, WPI_DEBUG_XMIT, "%s: called\n", __func__); |
2875 |
DPRINTF(sc, WPI_DEBUG_XMIT, "%s: called\n", __func__); |
2873 |
|
2876 |
|
|
|
2877 |
IF_LOCK(&ifp->if_snd); |
2874 |
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || |
2878 |
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || |
2875 |
(ifp->if_drv_flags & IFF_DRV_OACTIVE)) |
2879 |
(ifp->if_drv_flags & IFF_DRV_OACTIVE)) { |
|
|
2880 |
IF_UNLOCK(&ifp->if_snd); |
2876 |
return; |
2881 |
return; |
|
|
2882 |
} |
2883 |
IF_UNLOCK(&ifp->if_snd); |
2877 |
|
2884 |
|
2878 |
for (;;) { |
2885 |
for (;;) { |
2879 |
if (sc->qfullmsk != 0) { |
2886 |
if (sc->qfullmsk != 0) { |
|
|
2887 |
IF_LOCK(&ifp->if_snd); |
2880 |
ifp->if_drv_flags |= IFF_DRV_OACTIVE; |
2888 |
ifp->if_drv_flags |= IFF_DRV_OACTIVE; |
|
|
2889 |
IF_UNLOCK(&ifp->if_snd); |
2881 |
break; |
2890 |
break; |
2882 |
} |
2891 |
} |
2883 |
IFQ_DRV_DEQUEUE(&ifp->if_snd, m); |
2892 |
IFQ_DRV_DEQUEUE(&ifp->if_snd, m); |
Lines 5222-5229
Link Here
|
5222 |
goto fail; |
5231 |
goto fail; |
5223 |
} |
5232 |
} |
5224 |
|
5233 |
|
|
|
5234 |
IF_LOCK(&ifp->if_snd); |
5225 |
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; |
5235 |
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; |
5226 |
ifp->if_drv_flags |= IFF_DRV_RUNNING; |
5236 |
ifp->if_drv_flags |= IFF_DRV_RUNNING; |
|
|
5237 |
IF_UNLOCK(&ifp->if_snd); |
5227 |
|
5238 |
|
5228 |
callout_reset(&sc->watchdog_to, hz, wpi_watchdog, sc); |
5239 |
callout_reset(&sc->watchdog_to, hz, wpi_watchdog, sc); |
5229 |
|
5240 |
|
Lines 5255-5261
Link Here
|
5255 |
sc->sc_tx_timer = 0; |
5266 |
sc->sc_tx_timer = 0; |
5256 |
callout_stop(&sc->watchdog_to); |
5267 |
callout_stop(&sc->watchdog_to); |
5257 |
callout_stop(&sc->calib_to); |
5268 |
callout_stop(&sc->calib_to); |
|
|
5269 |
|
5270 |
IF_LOCK(&ifp->if_snd); |
5258 |
ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); |
5271 |
ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); |
|
|
5272 |
IF_UNLOCK(&ifp->if_snd); |
5259 |
|
5273 |
|
5260 |
/* Power OFF hardware. */ |
5274 |
/* Power OFF hardware. */ |
5261 |
wpi_hw_stop(sc); |
5275 |
wpi_hw_stop(sc); |