diff mbox

ath9k: Fix get channel default noise floor

Message ID 1516976454-8883-1-git-send-email-Wojciech.Dubowik@neratec.com (mailing list archive)
State Accepted
Commit b9607de6cf22a5cd268b9206177a9baafb6e8ac8
Delegated to: Kalle Valo
Headers show

Commit Message

Wojciech Dubowik Jan. 26, 2018, 2:20 p.m. UTC
Commit 8da58553cc63 ("ath9k: Use calibrated noise floor value
when available") introduced regression in ath9k_hw_getchan_noise
where per chain nominal noise floor has been taken instead default
for channel.
Revert to original default channel noise floor.

Reported-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
---
 drivers/net/wireless/ath/ath9k/calib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sebastian Gottschall Jan. 26, 2018, 2:24 p.m. UTC | #1
let me check

Am 26.01.2018 um 15:20 schrieb Wojciech Dubowik:
> Commit 8da58553cc63 ("ath9k: Use calibrated noise floor value
> when available") introduced regression in ath9k_hw_getchan_noise
> where per chain nominal noise floor has been taken instead default
> for channel.
> Revert to original default channel noise floor.
>
> Reported-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
> Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
> ---
>   drivers/net/wireless/ath/ath9k/calib.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
> index 3d9447e..695c779 100644
> --- a/drivers/net/wireless/ath/ath9k/calib.c
> +++ b/drivers/net/wireless/ath/ath9k/calib.c
> @@ -72,7 +72,7 @@ static s16 ath9k_hw_get_default_nf(struct ath_hw *ah,
>   s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan,
>   			   s16 nf)
>   {
> -	s8 noise = ath9k_hw_get_default_nf(ah, chan, 0);
> +	s8 noise = ATH_DEFAULT_NOISE_FLOOR;
>   
>   	if (nf) {
>   		s8 delta = nf - ATH9K_NF_CAL_NOISE_THRESH -
Kalle Valo Jan. 26, 2018, 2:35 p.m. UTC | #2
Wojciech Dubowik <Wojciech.Dubowik@neratec.com> writes:

> Commit 8da58553cc63 ("ath9k: Use calibrated noise floor value
> when available") introduced regression in ath9k_hw_getchan_noise
> where per chain nominal noise floor has been taken instead default
> for channel.
> Revert to original default channel noise floor.
>
> Reported-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
> Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>

Fixes: 8da58553cc63 ("ath9k: Use calibrated noise floor value when available")

I can add that if this passes Sebastian's tests.

And I'm planning to queue this for 4.16.
Sebastian Gottschall Jan. 26, 2018, 3:06 p.m. UTC | #3
the regression has been solved with that patch. so noise floor looks 
normal for me on the 9280 chipset again

Am 26.01.2018 um 15:35 schrieb Kalle Valo:
> Wojciech Dubowik <Wojciech.Dubowik@neratec.com> writes:
>
>> Commit 8da58553cc63 ("ath9k: Use calibrated noise floor value
>> when available") introduced regression in ath9k_hw_getchan_noise
>> where per chain nominal noise floor has been taken instead default
>> for channel.
>> Revert to original default channel noise floor.
>>
>> Reported-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
>> Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
> Fixes: 8da58553cc63 ("ath9k: Use calibrated noise floor value when available")
>
> I can add that if this passes Sebastian's tests.
>
> And I'm planning to queue this for 4.16.
>
Kalle Valo Feb. 7, 2018, 2:14 p.m. UTC | #4
Wojciech Dubowik <Wojciech.Dubowik@neratec.com> wrote:

> Commit 8da58553cc63 ("ath9k: Use calibrated noise floor value
> when available") introduced regression in ath9k_hw_getchan_noise
> where per chain nominal noise floor has been taken instead default
> for channel.
> Revert to original default channel noise floor.
> 
> Fixes: 8da58553cc63 ("ath9k: Use calibrated noise floor value when available")
> Reported-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
> Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-current branch of ath.git, thanks.

b9607de6cf22 ath9k: Fix get channel default noise floor
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 3d9447e..695c779 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -72,7 +72,7 @@  static s16 ath9k_hw_get_default_nf(struct ath_hw *ah,
 s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan,
 			   s16 nf)
 {
-	s8 noise = ath9k_hw_get_default_nf(ah, chan, 0);
+	s8 noise = ATH_DEFAULT_NOISE_FLOOR;
 
 	if (nf) {
 		s8 delta = nf - ATH9K_NF_CAL_NOISE_THRESH -