Skip to content

Commit 2cbfaea

Browse files
Sujithlinvjw
authored andcommitted
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 <[email protected]> Signed-off-by: Vasanthakumar Thiagarajan <[email protected]> Signed-off-by: Luis R. Rodriguez <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent 6398dc0 commit 2cbfaea

File tree

1 file changed

+8
-0
lines changed
  • drivers/net/wireless/ath/ath9k

1 file changed

+8
-0
lines changed

drivers/net/wireless/ath/ath9k/calib.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ static void ath9k_hw_do_getnf(struct ath_hw *ah,
101101
nf = 0 - ((nf ^ 0x1ff) + 1);
102102
ath_print(common, ATH_DBG_CALIBRATE,
103103
"NF calibrated [ctl] [chain 0] is %d\n", nf);
104+
105+
if (AR_SREV_9271(ah) && (nf >= -114))
106+
nf = -116;
107+
104108
nfarray[0] = nf;
105109

106110
if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {
@@ -139,6 +143,10 @@ static void ath9k_hw_do_getnf(struct ath_hw *ah,
139143
nf = 0 - ((nf ^ 0x1ff) + 1);
140144
ath_print(common, ATH_DBG_CALIBRATE,
141145
"NF calibrated [ext] [chain 0] is %d\n", nf);
146+
147+
if (AR_SREV_9271(ah) && (nf >= -114))
148+
nf = -116;
149+
142150
nfarray[3] = nf;
143151

144152
if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {

0 commit comments

Comments
 (0)