2011-11-05 21:51:32 +02:00
|
|
|
--- a/drivers/net/wireless/ath/ath9k/main.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
2011-11-14 23:21:03 +02:00
|
|
|
@@ -2251,9 +2251,6 @@ static void ath9k_flush(struct ieee80211
|
2011-11-05 21:51:32 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (drop)
|
|
|
|
- timeout = 1;
|
|
|
|
-
|
|
|
|
for (j = 0; j < timeout; j++) {
|
|
|
|
bool npend = false;
|
|
|
|
|
2011-11-14 23:21:03 +02:00
|
|
|
@@ -2271,21 +2268,22 @@ static void ath9k_flush(struct ieee80211
|
2011-11-05 21:51:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!npend)
|
|
|
|
- goto out;
|
|
|
|
+ break;
|
|
|
|
}
|
|
|
|
|
|
|
|
- ath9k_ps_wakeup(sc);
|
|
|
|
- spin_lock_bh(&sc->sc_pcu_lock);
|
|
|
|
- drain_txq = ath_drain_all_txq(sc, false);
|
|
|
|
- spin_unlock_bh(&sc->sc_pcu_lock);
|
|
|
|
+ if (drop) {
|
|
|
|
+ ath9k_ps_wakeup(sc);
|
|
|
|
+ spin_lock_bh(&sc->sc_pcu_lock);
|
|
|
|
+ drain_txq = ath_drain_all_txq(sc, false);
|
|
|
|
+ spin_unlock_bh(&sc->sc_pcu_lock);
|
|
|
|
|
|
|
|
- if (!drain_txq)
|
|
|
|
- ath_reset(sc, false);
|
|
|
|
+ if (!drain_txq)
|
|
|
|
+ ath_reset(sc, false);
|
|
|
|
|
|
|
|
- ath9k_ps_restore(sc);
|
|
|
|
- ieee80211_wake_queues(hw);
|
|
|
|
+ ath9k_ps_restore(sc);
|
|
|
|
+ ieee80211_wake_queues(hw);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
-out:
|
|
|
|
ieee80211_queue_delayed_work(hw, &sc->tx_complete_work, 0);
|
|
|
|
mutex_unlock(&sc->mutex);
|
|
|
|
}
|