aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 8b0feecf3fae..36315c83d4ca 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2275,9 +2275,6 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
2275 return; 2275 return;
2276 } 2276 }
2277 2277
2278 if (drop)
2279 timeout = 1;
2280
2281 for (j = 0; j < timeout; j++) { 2278 for (j = 0; j < timeout; j++) {
2282 bool npend = false; 2279 bool npend = false;
2283 2280
@@ -2295,21 +2292,22 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
2295 } 2292 }
2296 2293
2297 if (!npend) 2294 if (!npend)
2298 goto out; 2295 break;
2299 } 2296 }
2300 2297
2301 ath9k_ps_wakeup(sc); 2298 if (drop) {
2302 spin_lock_bh(&sc->sc_pcu_lock); 2299 ath9k_ps_wakeup(sc);
2303 drain_txq = ath_drain_all_txq(sc, false); 2300 spin_lock_bh(&sc->sc_pcu_lock);
2304 spin_unlock_bh(&sc->sc_pcu_lock); 2301 drain_txq = ath_drain_all_txq(sc, false);
2302 spin_unlock_bh(&sc->sc_pcu_lock);
2305 2303
2306 if (!drain_txq) 2304 if (!drain_txq)
2307 ath_reset(sc, false); 2305 ath_reset(sc, false);
2308 2306
2309 ath9k_ps_restore(sc); 2307 ath9k_ps_restore(sc);
2310 ieee80211_wake_queues(hw); 2308 ieee80211_wake_queues(hw);
2309 }
2311 2310
2312out:
2313 ieee80211_queue_delayed_work(hw, &sc->tx_complete_work, 0); 2311 ieee80211_queue_delayed_work(hw, &sc->tx_complete_work, 0);
2314 mutex_unlock(&sc->mutex); 2312 mutex_unlock(&sc->mutex);
2315} 2313}