summaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-07-23 02:08:24 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-07-23 02:08:24 +0000
commit9dbbc9466d7e32fc2c0075adea49e25c916ec796 (patch)
treef5260dbda5041ed67e0faeb871ee41eeacaefd27 /package/mac80211/patches
parentcbab8bf1dfe614f705de5f1da3108a489f255ccf (diff)
ath9k: fix invalid noisefloor measurement values in ht20 mode
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22361 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches')
-rw-r--r--package/mac80211/patches/530-ath9k_nf_fix.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/package/mac80211/patches/530-ath9k_nf_fix.patch b/package/mac80211/patches/530-ath9k_nf_fix.patch
new file mode 100644
index 000000000..081c2ab74
--- /dev/null
+++ b/package/mac80211/patches/530-ath9k_nf_fix.patch
@@ -0,0 +1,46 @@
+--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
++++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+@@ -1508,6 +1508,9 @@ static void ar5008_hw_do_getnf(struct at
+ nf = MS(REG_READ(ah, AR_PHY_CH2_CCA), AR_PHY_CH2_MINCCA_PWR);
+ nfarray[2] = sign_extend(nf, 9);
+
++ if (!IS_CHAN_HT40(ah->curchan))
++ return;
++
+ nf = MS(REG_READ(ah, AR_PHY_EXT_CCA), AR_PHY_EXT_MINCCA_PWR);
+ nfarray[3] = sign_extend(nf, 9);
+
+--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c
++++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
+@@ -477,7 +477,8 @@ static void ar9002_hw_do_getnf(struct at
+ nfarray[0] = sign_extend(nf, 9);
+
+ nf = MS(REG_READ(ah, AR_PHY_EXT_CCA), AR9280_PHY_EXT_MINCCA_PWR);
+- nfarray[3] = sign_extend(nf, 9);
++ if (IS_CHAN_HT40(ah->curchan))
++ nfarray[3] = sign_extend(nf, 9);
+
+ if (AR_SREV_9285(ah) || AR_SREV_9271(ah))
+ return;
+@@ -486,7 +487,8 @@ static void ar9002_hw_do_getnf(struct at
+ nfarray[1] = sign_extend(nf, 9);
+
+ nf = MS(REG_READ(ah, AR_PHY_CH1_EXT_CCA), AR9280_PHY_CH1_EXT_MINCCA_PWR);
+- nfarray[4] = sign_extend(nf, 9);
++ if (IS_CHAN_HT40(ah->curchan))
++ nfarray[4] = sign_extend(nf, 9);
+ }
+
+ static void ar9002_hw_set_nf_limits(struct ath_hw *ah)
+--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+@@ -1029,6 +1029,9 @@ static void ar9003_hw_do_getnf(struct at
+ nf = MS(REG_READ(ah, AR_PHY_CCA_2), AR_PHY_CH2_MINCCA_PWR);
+ nfarray[2] = sign_extend(nf, 9);
+
++ if (!IS_CHAN_HT40(ah->curchan))
++ return;
++
+ nf = MS(REG_READ(ah, AR_PHY_EXT_CCA), AR_PHY_EXT_MINCCA_PWR);
+ nfarray[3] = sign_extend(nf, 9);
+