aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-07-23 02:22:52 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-07-23 02:22:52 +0000
commitdd35966d2ee6acf13b6aa94ec59ea0949a675d01 (patch)
tree434bce1a4ac500a61f521229508401c04a7708c6 /package/mac80211/patches
parent07e5c74fbacd0f920a64967353c5782a207b9da5 (diff)
downloadmaster-187ad058-dd35966d2ee6acf13b6aa94ec59ea0949a675d01.tar.gz
master-187ad058-dd35966d2ee6acf13b6aa94ec59ea0949a675d01.tar.bz2
master-187ad058-dd35966d2ee6acf13b6aa94ec59ea0949a675d01.zip
ath9k: simplify noise floor calibration chainmask calculation
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22362 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches')
-rw-r--r--package/mac80211/patches/531-ath9k_nf_cleanup.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/package/mac80211/patches/531-ath9k_nf_cleanup.patch b/package/mac80211/patches/531-ath9k_nf_cleanup.patch
new file mode 100644
index 0000000000..f038559a44
--- /dev/null
+++ b/package/mac80211/patches/531-ath9k_nf_cleanup.patch
@@ -0,0 +1,30 @@
+--- a/drivers/net/wireless/ath/ath9k/calib.c
++++ b/drivers/net/wireless/ath/ath9k/calib.c
+@@ -172,26 +172,9 @@ void ath9k_hw_loadnf(struct ath_hw *ah,
+ struct ath9k_nfcal_hist *h;
+ unsigned i, j;
+ int32_t val;
+- u8 chainmask;
++ u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask;
+ struct ath_common *common = ath9k_hw_common(ah);
+
+- if (AR_SREV_9300_20_OR_LATER(ah))
+- chainmask = 0x3F;
+- else if (AR_SREV_9285(ah) || AR_SREV_9271(ah))
+- chainmask = 0x9;
+- else if (AR_SREV_9280(ah) || AR_SREV_9287(ah)) {
+- if ((ah->rxchainmask & 0x2) || (ah->rxchainmask & 0x4))
+- chainmask = 0x1B;
+- else
+- chainmask = 0x09;
+- } else {
+- if (ah->rxchainmask & 0x4)
+- chainmask = 0x3F;
+- else if (ah->rxchainmask & 0x2)
+- chainmask = 0x1B;
+- else
+- chainmask = 0x09;
+- }
+ h = ah->nfCalHist;
+
+ for (i = 0; i < NUM_NF_READINGS; i++) {