2024-03-09 12:12:13

by Lingbo Kong

[permalink] [raw]
Subject: [PATCH] wifi: ath11k: modify the calculation of the average signal strength in station mode

Currently, the calculation of the average signal strength in station mode
is incorrect.

This is because before calculating the average signal strength, ath11k need
to determine whether the hardware and firmware support db2dbm, if the
hardware and firmware support db2dbm, do not need to add noise floor,
otherwise, need to add noise floor.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23

Signed-off-by: Lingbo Kong <[email protected]>
---
drivers/net/wireless/ath/ath11k/mac.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index a6a37d67a50a..1f9cf7a42ba8 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -8976,8 +8976,11 @@ static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw,
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
}

- sinfo->signal_avg = ewma_avg_rssi_read(&arsta->avg_rssi) +
- ATH11K_DEFAULT_NOISE_FLOOR;
+ sinfo->signal_avg = ewma_avg_rssi_read(&arsta->avg_rssi);
+
+ if (!db2dbm)
+ sinfo->signal_avg += ATH11K_DEFAULT_NOISE_FLOOR;
+
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG);
}


base-commit: 7a5ed5a3801e9b6cf7bafbb0a05c70cef620b22a
--
2.34.1



2024-03-11 18:18:24

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath11k: modify the calculation of the average signal strength in station mode

On 3/9/2024 4:11 AM, Lingbo Kong wrote:
> Currently, the calculation of the average signal strength in station mode
> is incorrect.
>
> This is because before calculating the average signal strength, ath11k need
> to determine whether the hardware and firmware support db2dbm, if the
> hardware and firmware support db2dbm, do not need to add noise floor,
> otherwise, need to add noise floor.
>
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>
> Signed-off-by: Lingbo Kong <[email protected]>
Acked-by: Jeff Johnson <[email protected]>


2024-03-13 16:20:23

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath11k: modify the calculation of the average signal strength in station mode

Lingbo Kong <[email protected]> wrote:

> Currently, the calculation of the average signal strength in station mode
> is incorrect.
>
> This is because before calculating the average signal strength, ath11k need
> to determine whether the hardware and firmware support db2dbm, if the
> hardware and firmware support db2dbm, do not need to add noise floor,
> otherwise, need to add noise floor.
>
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>
> Signed-off-by: Lingbo Kong <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

What about AP chipsets like QCN9074, do they also work similarly?

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


2024-03-21 02:55:52

by Lingbo Kong

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath11k: modify the calculation of the average signal strength in station mode

On 2024/3/14 0:20, Kalle Valo wrote:
> Lingbo Kong <[email protected]> wrote:
>
>> Currently, the calculation of the average signal strength in station mode
>> is incorrect.
>>
>> This is because before calculating the average signal strength, ath11k need
>> to determine whether the hardware and firmware support db2dbm, if the
>> hardware and firmware support db2dbm, do not need to add noise floor,
>> otherwise, need to add noise floor.
>>
>> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>>
>> Signed-off-by: Lingbo Kong <[email protected]>
>> Signed-off-by: Kalle Valo <[email protected]>
>
> What about AP chipsets like QCN9074, do they also work similarly?
>

yes, i asked WIN's colleague Ashok Raj Nagarajan for helping to test
this patch.
they work similarly.

Best regards
Lingbo Kong

2024-04-14 13:34:45

by Lingbo Kong

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath11k: modify the calculation of the average signal strength in station mode



On 2024/3/14 0:20, Kalle Valo wrote:
> Lingbo Kong <[email protected]> wrote:
>
>> Currently, the calculation of the average signal strength in station mode
>> is incorrect.
>>
>> This is because before calculating the average signal strength, ath11k need
>> to determine whether the hardware and firmware support db2dbm, if the
>> hardware and firmware support db2dbm, do not need to add noise floor,
>> otherwise, need to add noise floor.
>>
>> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>>
>> Signed-off-by: Lingbo Kong <[email protected]>
>> Signed-off-by: Kalle Valo <[email protected]>
>
> What about AP chipsets like QCN9074, do they also work similarly?
>
Hi, kalle,

I observe this patch's status is deferred.
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

I think it belongs to bug-fix, so, could you please merge it? :)

Best regards
Lingbo Kong


2024-04-15 16:10:02

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath11k: modify the calculation of the average signal strength in station mode

Lingbo Kong <[email protected]> writes:

> On 2024/3/14 0:20, Kalle Valo wrote:
>> Lingbo Kong <[email protected]> wrote:
>>
>>> Currently, the calculation of the average signal strength in station mode
>>> is incorrect.
>>>
>>> This is because before calculating the average signal strength, ath11k need
>>> to determine whether the hardware and firmware support db2dbm, if the
>>> hardware and firmware support db2dbm, do not need to add noise floor,
>>> otherwise, need to add noise floor.
>>>
>>> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>>>
>>> Signed-off-by: Lingbo Kong <[email protected]>
>>> Signed-off-by: Kalle Valo <[email protected]>
>> What about AP chipsets like QCN9074, do they also work similarly?
>>
> Hi, kalle,
>
> I observe this patch's status is deferred.
> https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
>
> I think it belongs to bug-fix, so, could you please merge it? :)

I need to test it first which takes time.

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches