aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2010-03-17 04:55:20 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-03-23 16:50:14 -0400
commit2cbfaea48500ce98588e31bd806bbfb524b36b31 (patch)
tree43794b07ff48ac6f81777fd4049ffa21471ed661 /drivers/net/wireless
parent6398dc039d92b12805a900b3f82a033007a5b465 (diff)
ath9k_hw: restrict valid nf readings for AR9271 to -114
Noisefloor values read on AR9271 are unreliable if they are less than -114, set those statically to -116. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath9k/calib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 0c3e9c8fa017..e76dd7498653 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -101,6 +101,10 @@ static void ath9k_hw_do_getnf(struct ath_hw *ah,
101 nf = 0 - ((nf ^ 0x1ff) + 1); 101 nf = 0 - ((nf ^ 0x1ff) + 1);
102 ath_print(common, ATH_DBG_CALIBRATE, 102 ath_print(common, ATH_DBG_CALIBRATE,
103 "NF calibrated [ctl] [chain 0] is %d\n", nf); 103 "NF calibrated [ctl] [chain 0] is %d\n", nf);
104
105 if (AR_SREV_9271(ah) && (nf >= -114))
106 nf = -116;
107
104 nfarray[0] = nf; 108 nfarray[0] = nf;
105 109
106 if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) { 110 if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {
@@ -139,6 +143,10 @@ static void ath9k_hw_do_getnf(struct ath_hw *ah,
139 nf = 0 - ((nf ^ 0x1ff) + 1); 143 nf = 0 - ((nf ^ 0x1ff) + 1);
140 ath_print(common, ATH_DBG_CALIBRATE, 144 ath_print(common, ATH_DBG_CALIBRATE,
141 "NF calibrated [ext] [chain 0] is %d\n", nf); 145 "NF calibrated [ext] [chain 0] is %d\n", nf);
146
147 if (AR_SREV_9271(ah) && (nf >= -114))
148 nf = -116;
149
142 nfarray[3] = nf; 150 nfarray[3] = nf;
143 151
144 if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) { 152 if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {