mac80211: add back missing tx power handling fix (#12750)
[openwrt/staging/chunkeey.git] / package / kernel / mac80211 / patches / 300-pending_work.patch
1 commit 7cbb4c021bfd1e656f5b9953a947ab3c64e4e3b0
2 Author: Felix Fietkau <nbd@openwrt.org>
3 Date: Thu Apr 10 10:49:01 2014 +0200
4
5 mac80211: exclude AP_VLAN interfaces from tx power calculation
6
7 Their power value is initialized to zero. This patch fixes an issue
8 where the configured power drops to the minimum value when AP_VLAN
9 interfaces are created/removed.
10
11 Cc: stable@vger.kernel.org
12 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
13
14 commit 0ca13e26341733bf9577287fb04a3bef0d2f5cc9
15 Author: Felix Fietkau <nbd@openwrt.org>
16 Date: Wed Apr 9 00:07:01 2014 +0200
17
18 mac80211: suppress BSS info change notifications for AP_VLAN
19
20 Fixes warnings on tx power changes
21
22 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
23
24 commit ec998e5991781ecdaad0911dc64f1c8d3749c308
25 Author: Felix Fietkau <nbd@openwrt.org>
26 Date: Tue Apr 8 23:42:17 2014 +0200
27
28 ath9k: fix a scheduling while atomic bug in CSA handling
29
30 Commit "ath9k: prepare for multi-interface CSA support" added a call to
31 ieee80211_iterate_active_interfaces in atomic context (beacon tasklet),
32 which is crashing.
33 Use ieee80211_iterate_active_interfaces_atomic instead.
34
35 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
36
37 commit 93f310a38a1d81a4bc8fcd9bf29628bd721cf2ef
38 Author: Felix Fietkau <nbd@openwrt.org>
39 Date: Sun Apr 6 23:35:28 2014 +0200
40
41 ath9k_hw: reduce ANI firstep range for older chips
42
43 Use 0-8 instead of 0-16, which is closer to the old implementation.
44 Also drop the overwrite of the firstep_low parameter to improve
45 stability.
46
47 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
48
49
50 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
51 +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
52 @@ -1004,11 +1004,9 @@ static bool ar5008_hw_ani_control_new(st
53 case ATH9K_ANI_FIRSTEP_LEVEL:{
54 u32 level = param;
55
56 - value = level * 2;
57 + value = level;
58 REG_RMW_FIELD(ah, AR_PHY_FIND_SIG,
59 AR_PHY_FIND_SIG_FIRSTEP, value);
60 - REG_RMW_FIELD(ah, AR_PHY_FIND_SIG_LOW,
61 - AR_PHY_FIND_SIG_FIRSTEP_LOW, value);
62
63 if (level != aniState->firstepLevel) {
64 ath_dbg(common, ANI,
65 --- a/drivers/net/wireless/ath/ath9k/beacon.c
66 +++ b/drivers/net/wireless/ath/ath9k/beacon.c
67 @@ -312,10 +312,9 @@ static void ath9k_csa_update_vif(void *d
68
69 void ath9k_csa_update(struct ath_softc *sc)
70 {
71 - ieee80211_iterate_active_interfaces(sc->hw,
72 - IEEE80211_IFACE_ITER_NORMAL,
73 - ath9k_csa_update_vif,
74 - sc);
75 + ieee80211_iterate_active_interfaces_atomic(sc->hw,
76 + IEEE80211_IFACE_ITER_NORMAL,
77 + ath9k_csa_update_vif, sc);
78 }
79
80 void ath9k_beacon_tasklet(unsigned long data)
81 --- a/net/mac80211/main.c
82 +++ b/net/mac80211/main.c
83 @@ -152,6 +152,8 @@ static u32 ieee80211_hw_conf_chan(struct
84 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
85 if (!rcu_access_pointer(sdata->vif.chanctx_conf))
86 continue;
87 + if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
88 + continue;
89 power = min(power, sdata->vif.bss_conf.txpower);
90 }
91 rcu_read_unlock();
92 @@ -203,7 +205,7 @@ void ieee80211_bss_info_change_notify(st
93 {
94 struct ieee80211_local *local = sdata->local;
95
96 - if (!changed)
97 + if (!changed || sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
98 return;
99
100 drv_bss_info_changed(local, sdata, &sdata->vif.bss_conf, changed);