diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index c3dbf2661a3..efdafd28fab 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2261,6 +2261,7 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop) | |||
2261 | struct ath_softc *sc = hw->priv; | 2261 | struct ath_softc *sc = hw->priv; |
2262 | int timeout = 200; /* ms */ | 2262 | int timeout = 200; /* ms */ |
2263 | int i, j; | 2263 | int i, j; |
2264 | bool drain_txq; | ||
2264 | 2265 | ||
2265 | mutex_lock(&sc->mutex); | 2266 | mutex_lock(&sc->mutex); |
2266 | cancel_delayed_work_sync(&sc->tx_complete_work); | 2267 | cancel_delayed_work_sync(&sc->tx_complete_work); |
@@ -2286,7 +2287,10 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop) | |||
2286 | } | 2287 | } |
2287 | 2288 | ||
2288 | ath9k_ps_wakeup(sc); | 2289 | ath9k_ps_wakeup(sc); |
2289 | if (!ath_drain_all_txq(sc, false)) | 2290 | spin_lock_bh(&sc->sc_pcu_lock); |
2291 | drain_txq = ath_drain_all_txq(sc, false); | ||
2292 | spin_unlock_bh(&sc->sc_pcu_lock); | ||
2293 | if (!drain_txq) | ||
2290 | ath_reset(sc, false); | 2294 | ath_reset(sc, false); |
2291 | ath9k_ps_restore(sc); | 2295 | ath9k_ps_restore(sc); |
2292 | ieee80211_wake_queues(hw); | 2296 | ieee80211_wake_queues(hw); |