aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-02-28 13:02:24 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-03-03 15:35:55 -0500
commit6241226f68ea5285674adeb846a1a4544470724e (patch)
tree005cac43cf6b5ddb01f80ca0782bc5a43bd52a76 /drivers/net/wireless/ath/ath9k
parent727b662c2b3476840b7fef7a44685fb0a0898c48 (diff)
ath9k_hw: toggle weak signal detection in AP mode on older chipsets
The commit 80b4205b "ath9k: Fix OFDM weak signal detection for AP mode" prevented weak signal detection changes from taking effect in AP mode on all chipsets, claiming it is "not allowed". The main reason for not disabling weak signal detection in AP mode is that typically beacon RSSI is used to track whether it is needed to boost range, and this is unavailable in AP mode for obvious reasons. The problem with not disabling weak signal detection is that older chipsets are very sensitive to high PHY error counts. When faced with heavy noise, this can lead to an excessive amount of "Failed to stop TX DMA" errors in the field. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r--drivers/net/wireless/ath/ath9k/ani.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index d28923b7435b..3227ee059813 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -176,16 +176,18 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel,
176 if (ah->opmode == NL80211_IFTYPE_STATION && 176 if (ah->opmode == NL80211_IFTYPE_STATION &&
177 BEACON_RSSI(ah) <= ATH9K_ANI_RSSI_THR_HIGH) 177 BEACON_RSSI(ah) <= ATH9K_ANI_RSSI_THR_HIGH)
178 weak_sig = true; 178 weak_sig = true;
179
180 /* 179 /*
181 * OFDM Weak signal detection is always enabled for AP mode. 180 * Newer chipsets are better at dealing with high PHY error counts -
181 * keep weak signal detection enabled when no RSSI threshold is
182 * available to determine if it is needed (mode != STA)
182 */ 183 */
183 if (ah->opmode != NL80211_IFTYPE_AP && 184 else if (AR_SREV_9300_20_OR_LATER(ah) &&
184 aniState->ofdmWeakSigDetect != weak_sig) { 185 ah->opmode != NL80211_IFTYPE_STATION)
185 ath9k_hw_ani_control(ah, 186 weak_sig = true;
186 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, 187
187 entry_ofdm->ofdm_weak_signal_on); 188 if (aniState->ofdmWeakSigDetect != weak_sig)
188 } 189 ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
190 weak_sig);
189 191
190 if (aniState->ofdmNoiseImmunityLevel >= ATH9K_ANI_OFDM_DEF_LEVEL) { 192 if (aniState->ofdmNoiseImmunityLevel >= ATH9K_ANI_OFDM_DEF_LEVEL) {
191 ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH; 193 ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH;