Skip to content

Commit

Permalink
ath9k_hw: restrict valid nf readings for AR9271 to -114
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith authored and John W. Linville committed Mar 23, 2010
1 parent 6398dc0 commit 2cbfaea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/net/wireless/ath/ath9k/calib.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ static void ath9k_hw_do_getnf(struct ath_hw *ah,
nf = 0 - ((nf ^ 0x1ff) + 1);
ath_print(common, ATH_DBG_CALIBRATE,
"NF calibrated [ctl] [chain 0] is %d\n", nf);

if (AR_SREV_9271(ah) && (nf >= -114))
nf = -116;

nfarray[0] = nf;

if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {
Expand Down Expand Up @@ -139,6 +143,10 @@ static void ath9k_hw_do_getnf(struct ath_hw *ah,
nf = 0 - ((nf ^ 0x1ff) + 1);
ath_print(common, ATH_DBG_CALIBRATE,
"NF calibrated [ext] [chain 0] is %d\n", nf);

if (AR_SREV_9271(ah) && (nf >= -114))
nf = -116;

nfarray[3] = nf;

if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {
Expand Down

0 comments on commit 2cbfaea

Please sign in to comment.