ath9k: reorganize patches, reset hardware after full sleep (fixes #10349)
[openwrt.git] / package / mac80211 / patches / 562-ath9k_fix_flush.patch
1 --- a/drivers/net/wireless/ath/ath9k/main.c
2 +++ b/drivers/net/wireless/ath/ath9k/main.c
3 @@ -2268,9 +2268,6 @@ static void ath9k_flush(struct ieee80211
4 return;
5 }
6
7 - if (drop)
8 - timeout = 1;
9 -
10 for (j = 0; j < timeout; j++) {
11 bool npend = false;
12
13 @@ -2288,21 +2285,22 @@ static void ath9k_flush(struct ieee80211
14 }
15
16 if (!npend)
17 - goto out;
18 + break;
19 }
20
21 - ath9k_ps_wakeup(sc);
22 - spin_lock_bh(&sc->sc_pcu_lock);
23 - drain_txq = ath_drain_all_txq(sc, false);
24 - spin_unlock_bh(&sc->sc_pcu_lock);
25 + if (drop) {
26 + ath9k_ps_wakeup(sc);
27 + spin_lock_bh(&sc->sc_pcu_lock);
28 + drain_txq = ath_drain_all_txq(sc, false);
29 + spin_unlock_bh(&sc->sc_pcu_lock);
30
31 - if (!drain_txq)
32 - ath_reset(sc, false);
33 + if (!drain_txq)
34 + ath_reset(sc, false);
35
36 - ath9k_ps_restore(sc);
37 - ieee80211_wake_queues(hw);
38 + ath9k_ps_restore(sc);
39 + ieee80211_wake_queues(hw);
40 + }
41
42 -out:
43 ieee80211_queue_delayed_work(hw, &sc->tx_complete_work, 0);
44 mutex_unlock(&sc->mutex);
45 }
This page took 0.041325 seconds and 5 git commands to generate.