Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2cbfaea4 authored by Sujith's avatar Sujith Committed by John W. Linville
Browse files

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: default avatarSujith <Sujith.Manoharan@atheros.com>
Signed-off-by: default avatarVasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6398dc03
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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)) {
@@ -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)) {