aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/556-ath9k_ani_revert.patch
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-06-21 16:54:37 +0000
committerJohn Crispin <blogic@openwrt.org>2013-06-21 16:54:37 +0000
commitf1b4824c865b228039d84b2605b2e7e4f34cddeb (patch)
tree37c9cbe251e4fb790aaa72e862c35822be30b491 /package/kernel/mac80211/patches/556-ath9k_ani_revert.patch
parentd2642de7494bba312bbb22cfeb3ad77130a10047 (diff)
downloadmaster-187ad058-f1b4824c865b228039d84b2605b2e7e4f34cddeb.tar.gz
master-187ad058-f1b4824c865b228039d84b2605b2e7e4f34cddeb.tar.bz2
master-187ad058-f1b4824c865b228039d84b2605b2e7e4f34cddeb.zip
packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37007 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/patches/556-ath9k_ani_revert.patch')
-rw-r--r--package/kernel/mac80211/patches/556-ath9k_ani_revert.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/556-ath9k_ani_revert.patch b/package/kernel/mac80211/patches/556-ath9k_ani_revert.patch
new file mode 100644
index 0000000000..006f3930e9
--- /dev/null
+++ b/package/kernel/mac80211/patches/556-ath9k_ani_revert.patch
@@ -0,0 +1,74 @@
+--- a/drivers/net/wireless/ath/ath9k/ani.h
++++ b/drivers/net/wireless/ath/ath9k/ani.h
+@@ -20,8 +20,12 @@
+ #define BEACON_RSSI(ahp) (ahp->stats.avgbrssi)
+
+ /* units are errors per second */
+-#define ATH9K_ANI_OFDM_TRIG_HIGH 1000
++#define ATH9K_ANI_OFDM_TRIG_HIGH 3500
++#define ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI 1000
++
+ #define ATH9K_ANI_OFDM_TRIG_LOW 400
++#define ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI 900
++
+ #define ATH9K_ANI_CCK_TRIG_HIGH 600
+ #define ATH9K_ANI_CCK_TRIG_LOW 300
+
+--- a/drivers/net/wireless/ath/ath9k/ani.c
++++ b/drivers/net/wireless/ath/ath9k/ani.c
+@@ -177,14 +177,17 @@ static void ath9k_hw_set_ofdm_nil(struct
+ BEACON_RSSI(ah) <= ATH9K_ANI_RSSI_THR_HIGH)
+ weak_sig = true;
+
+- /*
+- * OFDM Weak signal detection is always enabled for AP mode.
+- */
+- if (ah->opmode != NL80211_IFTYPE_AP &&
+- aniState->ofdmWeakSigDetect != weak_sig) {
+- ath9k_hw_ani_control(ah,
+- ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
+- entry_ofdm->ofdm_weak_signal_on);
++ if (aniState->ofdmWeakSigDetect != weak_sig)
++ ath9k_hw_ani_control(ah,
++ ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
++ entry_ofdm->ofdm_weak_signal_on);
++
++ if (aniState->ofdmNoiseImmunityLevel >= ATH9K_ANI_OFDM_DEF_LEVEL) {
++ ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH;
++ ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI;
++ } else {
++ ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI;
++ ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW;
+ }
+ }
+
+@@ -420,25 +423,12 @@ void ath9k_hw_ani_monitor(struct ath_hw
+ ofdmPhyErrRate, aniState->cckNoiseImmunityLevel,
+ cckPhyErrRate, aniState->ofdmsTurn);
+
+- if (aniState->listenTime > 5 * ah->aniperiod) {
+- /*
+- * Check if we need to lower immunity if
+- * 5 ani_periods have passed.
+- */
+- if (ofdmPhyErrRate <= ah->config.ofdm_trig_low &&
+- cckPhyErrRate <= ah->config.cck_trig_low) {
++ if (aniState->listenTime > ah->aniperiod) {
++ if (cckPhyErrRate < ah->config.cck_trig_low &&
++ ofdmPhyErrRate < ah->config.ofdm_trig_low) {
+ ath9k_hw_ani_lower_immunity(ah);
+ aniState->ofdmsTurn = !aniState->ofdmsTurn;
+- }
+- ath9k_ani_restart(ah);
+- } else if (aniState->listenTime > ah->aniperiod) {
+- /*
+- * Check if immunity has to be raised,
+- * (either OFDM or CCK).
+- */
+- if (ofdmPhyErrRate > ah->config.ofdm_trig_high &&
+- (cckPhyErrRate <= ah->config.cck_trig_high ||
+- aniState->ofdmsTurn)) {
++ } else if (ofdmPhyErrRate > ah->config.ofdm_trig_high) {
+ ath9k_hw_ani_ofdm_err_trigger(ah);
+ aniState->ofdmsTurn = false;
+ } else if (cckPhyErrRate > ah->config.cck_trig_high) {