ath9k: fix AP mode crash issues
[openwrt/staging/dedeckeh.git] / package / kernel / mac80211 / patches / 300-pending_work.patch
1 commit ec998e5991781ecdaad0911dc64f1c8d3749c308
2 Author: Felix Fietkau <nbd@openwrt.org>
3 Date: Tue Apr 8 23:42:17 2014 +0200
4
5 ath9k: fix a scheduling while atomic bug in CSA handling
6
7 Commit "ath9k: prepare for multi-interface CSA support" added a call to
8 ieee80211_iterate_active_interfaces in atomic context (beacon tasklet),
9 which is crashing.
10 Use ieee80211_iterate_active_interfaces_atomic instead.
11
12 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
13
14 commit 93f310a38a1d81a4bc8fcd9bf29628bd721cf2ef
15 Author: Felix Fietkau <nbd@openwrt.org>
16 Date: Sun Apr 6 23:35:28 2014 +0200
17
18 ath9k_hw: reduce ANI firstep range for older chips
19
20 Use 0-8 instead of 0-16, which is closer to the old implementation.
21 Also drop the overwrite of the firstep_low parameter to improve
22 stability.
23
24 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
25
26
27 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
28 +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
29 @@ -1004,11 +1004,9 @@ static bool ar5008_hw_ani_control_new(st
30 case ATH9K_ANI_FIRSTEP_LEVEL:{
31 u32 level = param;
32
33 - value = level * 2;
34 + value = level;
35 REG_RMW_FIELD(ah, AR_PHY_FIND_SIG,
36 AR_PHY_FIND_SIG_FIRSTEP, value);
37 - REG_RMW_FIELD(ah, AR_PHY_FIND_SIG_LOW,
38 - AR_PHY_FIND_SIG_FIRSTEP_LOW, value);
39
40 if (level != aniState->firstepLevel) {
41 ath_dbg(common, ANI,
42 --- a/drivers/net/wireless/ath/ath9k/beacon.c
43 +++ b/drivers/net/wireless/ath/ath9k/beacon.c
44 @@ -312,10 +312,9 @@ static void ath9k_csa_update_vif(void *d
45
46 void ath9k_csa_update(struct ath_softc *sc)
47 {
48 - ieee80211_iterate_active_interfaces(sc->hw,
49 - IEEE80211_IFACE_ITER_NORMAL,
50 - ath9k_csa_update_vif,
51 - sc);
52 + ieee80211_iterate_active_interfaces_atomic(sc->hw,
53 + IEEE80211_IFACE_ITER_NORMAL,
54 + ath9k_csa_update_vif, sc);
55 }
56
57 void ath9k_beacon_tasklet(unsigned long data)