ath5k: channel change fix
[openwrt/staging/yousong.git] / package / kernel / mac80211 / patches / 310-ath9k-set-ATH_OP_INVALID-before-disabling-hardware.patch
1 From: Felix Fietkau <nbd@openwrt.org>
2 Date: Thu, 13 Nov 2014 18:29:00 +0100
3 Subject: [PATCH] ath9k: set ATH_OP_INVALID before disabling hardware
4
5 Closes another small IRQ handler race
6
7 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
8 ---
9
10 --- a/drivers/net/wireless/ath/ath9k/main.c
11 +++ b/drivers/net/wireless/ath/ath9k/main.c
12 @@ -885,6 +885,9 @@ static void ath9k_stop(struct ieee80211_
13 &sc->cur_chan->chandef);
14
15 ath9k_hw_reset(ah, ah->curchan, ah->caldata, false);
16 +
17 + set_bit(ATH_OP_INVALID, &common->op_flags);
18 +
19 ath9k_hw_phy_disable(ah);
20
21 ath9k_hw_configpcipowersave(ah, true);
22 @@ -893,7 +896,6 @@ static void ath9k_stop(struct ieee80211_
23
24 ath9k_ps_restore(sc);
25
26 - set_bit(ATH_OP_INVALID, &common->op_flags);
27 sc->ps_idle = prev_idle;
28
29 mutex_unlock(&sc->mutex);