1 commit 8c7ae357cc5b6bd037ad2d666e9f3789cf882925
2 Author: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
3 Date: Wed Apr 23 15:07:57 2014 +0530
5 ath9k: fix race in setting ATH_OP_INVALID
7 The commit "ath9k: move sc_flags to ath_common" moved setting
8 ATH_OP_INVALID flag below ieee80211_register_hw. This is causing
9 the flag never being cleared randomly as the drv_start is called
10 prior to setting flag. Fix this by setting the flag prior to
13 Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
14 Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 commit c82552c5b0cb1735dbcbad78b1ffc6d3c212dc56
17 Author: Tim Harvey <tharvey@gateworks.com>
18 Date: Mon Apr 21 16:14:57 2014 -0700
20 ath9k: add a recv budget
22 Implement a recv budget so that in cases of high traffic we still allow other
23 taskets to get processed.
25 Without this, we can encounter a host of issues during high wireless traffic
26 reception depending on system load including rcu stall's detected (ARM),
27 soft lockups, failure to service critical tasks such as watchdog resets,
28 and triggering of the tx stuck tasklet.
30 The same thing was proposed previously by Ben:
31 http://www.spinics.net/lists/linux-wireless/msg112891.html
33 The only difference here is that I make sure only processed packets are counted
34 in the budget by checking at the end of the rx loop.
36 Signed-off-by: Tim Harvey <tharvey@gateworks.com>
37 Acked-by: Felix Fietkau <nbd@openwrt.org>
38 Signed-off-by: John W. Linville <linville@tuxdriver.com>
40 commit 3a758134e66ca74a9df792616b5288b2fa2cfd7f
41 Author: Tim Harvey <tharvey@gateworks.com>
42 Date: Mon Apr 21 16:14:56 2014 -0700
44 ath9k: fix possible hang on flush
46 If a flush is requested, make sure to clear the descriptor once we've
49 This resolves a hang that will occur if all RX descriptors are full when a
52 Signed-off-by: Tim Harvey <tharvey@gateworks.com>
53 Acked-by: Felix Fietkau <nbd@openwrt.org>
54 Signed-off-by: John W. Linville <linville@tuxdriver.com>
56 commit eefb1d6adc4c60d219182b8917e4567484ce07fc
57 Author: Felix Fietkau <nbd@openwrt.org>
58 Date: Mon Apr 28 18:27:41 2014 +0200
60 ath9k: remove tid->paused flag
62 There are some corner cases where the driver could get stuck with a full
63 tid queue that is paused, leading to a software tx queue hang.
65 Since the tx queueing rework, pausing per-tid queues on aggregation
66 session setup is no longer necessary. The driver will assign sequence
67 numbers to buffered frames when a new session is established, in order
68 to get the correct starting sequence number.
70 mac80211 prevents new frames from entering the queue during setup.
72 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
74 commit 98a713933d8495f4078f561c1e651b738dd5b531
75 Author: Felix Fietkau <nbd@openwrt.org>
76 Date: Sun Apr 27 14:49:03 2014 +0200
78 ath9k_hw: do not lower ANI setting below default on AR913x
80 When the amount of noise fluctuates strongly, low immunity settings
81 can sometimes disrupt signal detection on AR913x chips. When that
82 happens, no OFDM/CCK errors are reported anymore, and ANI tunes the
83 radio to the lowest immunity settings.
84 Usually rx/tx fails as well in that case.
86 To fix this, keep noise immunity settings at or above ANI default level,
87 which will keep radio parameters at or above INI values.
89 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
91 commit 7cbb4c021bfd1e656f5b9953a947ab3c64e4e3b0
92 Author: Felix Fietkau <nbd@openwrt.org>
93 Date: Thu Apr 10 10:49:01 2014 +0200
95 mac80211: exclude AP_VLAN interfaces from tx power calculation
97 Their power value is initialized to zero. This patch fixes an issue
98 where the configured power drops to the minimum value when AP_VLAN
99 interfaces are created/removed.
101 Cc: stable@vger.kernel.org
102 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
104 commit 0ca13e26341733bf9577287fb04a3bef0d2f5cc9
105 Author: Felix Fietkau <nbd@openwrt.org>
106 Date: Wed Apr 9 00:07:01 2014 +0200
108 mac80211: suppress BSS info change notifications for AP_VLAN
110 Fixes warnings on tx power changes
112 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
114 commit ec998e5991781ecdaad0911dc64f1c8d3749c308
115 Author: Felix Fietkau <nbd@openwrt.org>
116 Date: Tue Apr 8 23:42:17 2014 +0200
118 ath9k: fix a scheduling while atomic bug in CSA handling
120 Commit "ath9k: prepare for multi-interface CSA support" added a call to
121 ieee80211_iterate_active_interfaces in atomic context (beacon tasklet),
123 Use ieee80211_iterate_active_interfaces_atomic instead.
125 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
127 commit 93f310a38a1d81a4bc8fcd9bf29628bd721cf2ef
128 Author: Felix Fietkau <nbd@openwrt.org>
129 Date: Sun Apr 6 23:35:28 2014 +0200
131 ath9k_hw: reduce ANI firstep range for older chips
133 Use 0-8 instead of 0-16, which is closer to the old implementation.
134 Also drop the overwrite of the firstep_low parameter to improve
137 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
140 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
141 +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
142 @@ -1004,11 +1004,9 @@ static bool ar5008_hw_ani_control_new(st
143 case ATH9K_ANI_FIRSTEP_LEVEL:{
148 REG_RMW_FIELD(ah, AR_PHY_FIND_SIG,
149 AR_PHY_FIND_SIG_FIRSTEP, value);
150 - REG_RMW_FIELD(ah, AR_PHY_FIND_SIG_LOW,
151 - AR_PHY_FIND_SIG_FIRSTEP_LOW, value);
153 if (level != aniState->firstepLevel) {
155 --- a/drivers/net/wireless/ath/ath9k/beacon.c
156 +++ b/drivers/net/wireless/ath/ath9k/beacon.c
157 @@ -312,10 +312,9 @@ static void ath9k_csa_update_vif(void *d
159 void ath9k_csa_update(struct ath_softc *sc)
161 - ieee80211_iterate_active_interfaces(sc->hw,
162 - IEEE80211_IFACE_ITER_NORMAL,
163 - ath9k_csa_update_vif,
165 + ieee80211_iterate_active_interfaces_atomic(sc->hw,
166 + IEEE80211_IFACE_ITER_NORMAL,
167 + ath9k_csa_update_vif, sc);
170 void ath9k_beacon_tasklet(unsigned long data)
171 --- a/net/mac80211/main.c
172 +++ b/net/mac80211/main.c
173 @@ -152,6 +152,8 @@ static u32 ieee80211_hw_conf_chan(struct
174 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
175 if (!rcu_access_pointer(sdata->vif.chanctx_conf))
177 + if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
179 power = min(power, sdata->vif.bss_conf.txpower);
182 @@ -203,7 +205,7 @@ void ieee80211_bss_info_change_notify(st
184 struct ieee80211_local *local = sdata->local;
187 + if (!changed || sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
190 drv_bss_info_changed(local, sdata, &sdata->vif.bss_conf, changed);
191 --- a/drivers/net/wireless/ath/ath9k/ani.c
192 +++ b/drivers/net/wireless/ath/ath9k/ani.c
193 @@ -155,6 +155,9 @@ static void ath9k_hw_set_ofdm_nil(struct
194 ATH9K_ANI_RSSI_THR_LOW,
195 ATH9K_ANI_RSSI_THR_HIGH);
197 + if (AR_SREV_9100(ah) && immunityLevel < ATH9K_ANI_OFDM_DEF_LEVEL)
198 + immunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL;
201 aniState->ofdmNoiseImmunityLevel = immunityLevel;
203 @@ -235,6 +238,9 @@ static void ath9k_hw_set_cck_nil(struct
204 BEACON_RSSI(ah), ATH9K_ANI_RSSI_THR_LOW,
205 ATH9K_ANI_RSSI_THR_HIGH);
207 + if (AR_SREV_9100(ah) && immunityLevel < ATH9K_ANI_CCK_DEF_LEVEL)
208 + immunityLevel = ATH9K_ANI_CCK_DEF_LEVEL;
210 if (ah->opmode == NL80211_IFTYPE_STATION &&
211 BEACON_RSSI(ah) <= ATH9K_ANI_RSSI_THR_LOW &&
212 immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI)
213 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
214 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
215 @@ -251,7 +251,6 @@ struct ath_atx_tid {
223 --- a/drivers/net/wireless/ath/ath9k/xmit.c
224 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
225 @@ -107,9 +107,6 @@ static void ath_tx_queue_tid(struct ath_
227 struct ath_atx_ac *ac = tid->ac;
235 @@ -1407,7 +1404,6 @@ int ath_tx_aggr_start(struct ath_softc *
236 ath_tx_tid_change_state(sc, txtid);
238 txtid->active = true;
239 - txtid->paused = true;
240 *ssn = txtid->seq_start = txtid->seq_next;
241 txtid->bar_index = -1;
243 @@ -1427,7 +1423,6 @@ void ath_tx_aggr_stop(struct ath_softc *
245 ath_txq_lock(sc, txq);
246 txtid->active = false;
247 - txtid->paused = false;
248 ath_tx_flush_tid(sc, txtid);
249 ath_tx_tid_change_state(sc, txtid);
250 ath_txq_unlock_complete(sc, txq);
251 @@ -1487,7 +1482,7 @@ void ath_tx_aggr_wakeup(struct ath_softc
252 ath_txq_lock(sc, txq);
253 ac->clear_ps_filter = true;
255 - if (!tid->paused && ath_tid_has_buffered(tid)) {
256 + if (ath_tid_has_buffered(tid)) {
257 ath_tx_queue_tid(txq, tid);
258 ath_txq_schedule(sc, txq);
260 @@ -1510,7 +1505,6 @@ void ath_tx_aggr_resume(struct ath_softc
261 ath_txq_lock(sc, txq);
263 tid->baw_size = IEEE80211_MIN_AMPDU_BUF << sta->ht_cap.ampdu_factor;
264 - tid->paused = false;
266 if (ath_tid_has_buffered(tid)) {
267 ath_tx_queue_tid(txq, tid);
268 @@ -1544,8 +1538,6 @@ void ath9k_release_buffered_frames(struc
271 tid = ATH_AN_2_TID(an, i);
275 ath_txq_lock(sc, tid->ac->txq);
276 while (nframes > 0) {
277 @@ -1844,9 +1836,6 @@ void ath_txq_schedule(struct ath_softc *
278 list_del(&tid->list);
284 if (ath_tx_sched_aggr(sc, txq, tid, &stop))
287 @@ -2698,7 +2687,6 @@ void ath_tx_node_init(struct ath_softc *
288 tid->baw_size = WME_MAX_BA;
289 tid->baw_head = tid->baw_tail = 0;
291 - tid->paused = false;
293 __skb_queue_head_init(&tid->buf_q);
294 __skb_queue_head_init(&tid->retry_q);
295 --- a/drivers/net/wireless/ath/ath9k/recv.c
296 +++ b/drivers/net/wireless/ath/ath9k/recv.c
297 @@ -975,6 +975,7 @@ int ath_rx_tasklet(struct ath_softc *sc,
300 dma_addr_t new_buf_addr;
301 + unsigned int budget = 512;
304 dma_type = DMA_BIDIRECTIONAL;
305 @@ -1113,15 +1114,17 @@ requeue_drop_frag:
308 list_add_tail(&bf->list, &sc->rx.rxbuf);
313 ath_rx_edma_buf_link(sc, qtype);
315 ath_rx_buf_relink(sc, bf);
316 - ath9k_hw_rxena(ah);
318 + ath9k_hw_rxena(ah);
325 if (!(ah->imask & ATH9K_INT_RXEOL)) {
326 --- a/drivers/net/wireless/ath/ath9k/ahb.c
327 +++ b/drivers/net/wireless/ath/ath9k/ahb.c
328 @@ -86,7 +86,6 @@ static int ath_ahb_probe(struct platform
332 - struct ath_common *common;
335 if (!dev_get_platdata(&pdev->dev)) {
336 @@ -146,9 +145,6 @@ static int ath_ahb_probe(struct platform
337 wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n",
338 hw_name, (unsigned long)mem, irq);
340 - common = ath9k_hw_common(sc->sc_ah);
341 - /* Will be cleared in ath9k_start() */
342 - set_bit(ATH_OP_INVALID, &common->op_flags);
346 --- a/drivers/net/wireless/ath/ath9k/init.c
347 +++ b/drivers/net/wireless/ath/ath9k/init.c
348 @@ -781,6 +781,9 @@ int ath9k_init_device(u16 devid, struct
349 common = ath9k_hw_common(ah);
350 ath9k_set_hw_capab(sc, hw);
352 + /* Will be cleared in ath9k_start() */
353 + set_bit(ATH_OP_INVALID, &common->op_flags);
355 /* Initialize regulatory */
356 error = ath_regd_init(&common->regulatory, sc->hw->wiphy,
358 --- a/drivers/net/wireless/ath/ath9k/pci.c
359 +++ b/drivers/net/wireless/ath/ath9k/pci.c
360 @@ -784,7 +784,6 @@ static int ath_pci_probe(struct pci_dev
362 struct ath_softc *sc;
363 struct ieee80211_hw *hw;
364 - struct ath_common *common;
368 @@ -877,10 +876,6 @@ static int ath_pci_probe(struct pci_dev
369 wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n",
370 hw_name, (unsigned long)sc->mem, pdev->irq);
372 - /* Will be cleared in ath9k_start() */
373 - common = ath9k_hw_common(sc->sc_ah);
374 - set_bit(ATH_OP_INVALID, &common->op_flags);