Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] wifi: ath11k: fix ack signal strength calculation
@ 2024-06-11  2:25 Lingbo Kong
  2024-06-12 19:26 ` Jeff Johnson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Lingbo Kong @ 2024-06-11  2:25 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, quic_lingbok

Currently, the calculation of ack signal strength is incorrect.

This is because before calculating the ack 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.

Besides, the value of ack_rssi passed by firmware to ath11k should be a
signed number, so change its type to s8.

After that, "iw wlan0 station dump" show the correct ack signal strength.

Such as:
root@CDCCSTEX0799733-LIN:~# iw wlp88s0 station dump
Station 00:03:7f:12:df:df (on wlp88s0)
        inactive time:  75 ms
        rx bytes:       11599
        rx packets:     99
        tx bytes:       9029
        tx packets:     81
        tx retries:     4
        tx failed:      0
        rx drop misc:   2
        signal:         -16 dBm
        signal avg:     -24 dBm
        tx bitrate:     1560.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 4
        tx duration:    9230 us
        rx bitrate:     1560.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 4
        rx duration:    7201 us
        last ack signal:-23 dBm
        avg ack signal: -22 dBm

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1

Signed-off-by: Lingbo Kong <quic_lingbok@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/dp_tx.c  | 16 ++++++++++++----
 drivers/net/wireless/ath/ath11k/dp_tx.h  |  4 ++--
 drivers/net/wireless/ath/ath11k/hal_tx.h |  4 ++--
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index 21819b741701..8522c67baabf 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -353,8 +353,12 @@ ath11k_dp_tx_htt_tx_complete_buf(struct ath11k_base *ab,
 	if (ts->acked) {
 		if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
 			info->flags |= IEEE80211_TX_STAT_ACK;
-			info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR +
-						  ts->ack_rssi;
+			info->status.ack_signal = ts->ack_rssi;
+
+			if (!test_bit(WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT,
+				      ab->wmi_ab.svc_map))
+				info->status.ack_signal += ATH11K_DEFAULT_NOISE_FLOOR;
+
 			info->status.flags |=
 				IEEE80211_TX_STATUS_ACK_SIGNAL_VALID;
 		} else {
@@ -584,8 +588,12 @@ static void ath11k_dp_tx_complete_msdu(struct ath11k *ar,
 	if (ts->status == HAL_WBM_TQM_REL_REASON_FRAME_ACKED &&
 	    !(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
 		info->flags |= IEEE80211_TX_STAT_ACK;
-		info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR +
-					  ts->ack_rssi;
+		info->status.ack_signal = ts->ack_rssi;
+
+		if (!test_bit(WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT,
+			      ab->wmi_ab.svc_map))
+			info->status.ack_signal += ATH11K_DEFAULT_NOISE_FLOOR;
+
 		info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID;
 	}
 
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.h b/drivers/net/wireless/ath/ath11k/dp_tx.h
index 61be2265e09f..795fe3b8fa0d 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.h
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.h
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021, 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #ifndef ATH11K_DP_TX_H
@@ -13,7 +13,7 @@
 struct ath11k_dp_htt_wbm_tx_status {
 	u32 msdu_id;
 	bool acked;
-	int ack_rssi;
+	s8 ack_rssi;
 	u16 peer_id;
 };
 
diff --git a/drivers/net/wireless/ath/ath11k/hal_tx.h b/drivers/net/wireless/ath/ath11k/hal_tx.h
index c5e88364afe5..46d17abd808b 100644
--- a/drivers/net/wireless/ath/ath11k/hal_tx.h
+++ b/drivers/net/wireless/ath/ath11k/hal_tx.h
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #ifndef ATH11K_HAL_TX_H
@@ -54,7 +54,7 @@ struct hal_tx_info {
 struct hal_tx_status {
 	enum hal_wbm_rel_src_module buf_rel_source;
 	enum hal_wbm_tqm_rel_reason status;
-	u8 ack_rssi;
+	s8 ack_rssi;
 	u32 flags; /* %HAL_TX_STATUS_FLAGS_ */
 	u32 ppdu_id;
 	u8 try_cnt;

base-commit: a116bf2be795eb1db75fa6a48aa85c397be001a6
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: ath11k: fix ack signal strength calculation
  2024-06-11  2:25 [PATCH] wifi: ath11k: fix ack signal strength calculation Lingbo Kong
@ 2024-06-12 19:26 ` Jeff Johnson
  2024-06-13 11:57 ` James Prestwood
  2024-06-19 13:59 ` Kalle Valo
  2 siblings, 0 replies; 5+ messages in thread
From: Jeff Johnson @ 2024-06-12 19:26 UTC (permalink / raw)
  To: Lingbo Kong, ath11k; +Cc: linux-wireless

On 6/10/2024 7:25 PM, Lingbo Kong wrote:
> Currently, the calculation of ack signal strength is incorrect.
> 
> This is because before calculating the ack 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.
> 
> Besides, the value of ack_rssi passed by firmware to ath11k should be a
> signed number, so change its type to s8.
> 
> After that, "iw wlan0 station dump" show the correct ack signal strength.
> 
> Such as:
> root@CDCCSTEX0799733-LIN:~# iw wlp88s0 station dump
> Station 00:03:7f:12:df:df (on wlp88s0)
>         inactive time:  75 ms
>         rx bytes:       11599
>         rx packets:     99
>         tx bytes:       9029
>         tx packets:     81
>         tx retries:     4
>         tx failed:      0
>         rx drop misc:   2
>         signal:         -16 dBm
>         signal avg:     -24 dBm
>         tx bitrate:     1560.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 4
>         tx duration:    9230 us
>         rx bitrate:     1560.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 4
>         rx duration:    7201 us
>         last ack signal:-23 dBm
>         avg ack signal: -22 dBm
> 
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Lingbo Kong <quic_lingbok@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: ath11k: fix ack signal strength calculation
  2024-06-11  2:25 [PATCH] wifi: ath11k: fix ack signal strength calculation Lingbo Kong
  2024-06-12 19:26 ` Jeff Johnson
@ 2024-06-13 11:57 ` James Prestwood
  2024-06-13 12:08   ` Lingbo Kong
  2024-06-19 13:59 ` Kalle Valo
  2 siblings, 1 reply; 5+ messages in thread
From: James Prestwood @ 2024-06-13 11:57 UTC (permalink / raw)
  To: Lingbo Kong, ath11k; +Cc: linux-wireless

Hi Lingbo,

On 6/10/24 7:25 PM, Lingbo Kong wrote:
> Currently, the calculation of ack signal strength is incorrect.
>
> This is because before calculating the ack 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.

This oatch got me checking on some devices we have running ath11k 
(WCN6855). I don't see any "ack signal" property but I noticed the 
signal avg does not seem correct:

signal:      -55 [-62, -56] dBm
signal avg:    105 dBm

Every other device besides ath11k has a signal avg close to or equal to 
the signal. Do you think there is also an issue with this property? not 
just the ack signal?

Thanks,

James

>
> Besides, the value of ack_rssi passed by firmware to ath11k should be a
> signed number, so change its type to s8.
>
> After that, "iw wlan0 station dump" show the correct ack signal strength.
>
> Such as:
> root@CDCCSTEX0799733-LIN:~# iw wlp88s0 station dump
> Station 00:03:7f:12:df:df (on wlp88s0)
>          inactive time:  75 ms
>          rx bytes:       11599
>          rx packets:     99
>          tx bytes:       9029
>          tx packets:     81
>          tx retries:     4
>          tx failed:      0
>          rx drop misc:   2
>          signal:         -16 dBm
>          signal avg:     -24 dBm
>          tx bitrate:     1560.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 4
>          tx duration:    9230 us
>          rx bitrate:     1560.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 4
>          rx duration:    7201 us
>          last ack signal:-23 dBm
>          avg ack signal: -22 dBm
>
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Lingbo Kong <quic_lingbok@quicinc.com>
> ---
>   drivers/net/wireless/ath/ath11k/dp_tx.c  | 16 ++++++++++++----
>   drivers/net/wireless/ath/ath11k/dp_tx.h  |  4 ++--
>   drivers/net/wireless/ath/ath11k/hal_tx.h |  4 ++--
>   3 files changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
> index 21819b741701..8522c67baabf 100644
> --- a/drivers/net/wireless/ath/ath11k/dp_tx.c
> +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
> @@ -353,8 +353,12 @@ ath11k_dp_tx_htt_tx_complete_buf(struct ath11k_base *ab,
>   	if (ts->acked) {
>   		if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
>   			info->flags |= IEEE80211_TX_STAT_ACK;
> -			info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR +
> -						  ts->ack_rssi;
> +			info->status.ack_signal = ts->ack_rssi;
> +
> +			if (!test_bit(WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT,
> +				      ab->wmi_ab.svc_map))
> +				info->status.ack_signal += ATH11K_DEFAULT_NOISE_FLOOR;
> +
>   			info->status.flags |=
>   				IEEE80211_TX_STATUS_ACK_SIGNAL_VALID;
>   		} else {
> @@ -584,8 +588,12 @@ static void ath11k_dp_tx_complete_msdu(struct ath11k *ar,
>   	if (ts->status == HAL_WBM_TQM_REL_REASON_FRAME_ACKED &&
>   	    !(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
>   		info->flags |= IEEE80211_TX_STAT_ACK;
> -		info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR +
> -					  ts->ack_rssi;
> +		info->status.ack_signal = ts->ack_rssi;
> +
> +		if (!test_bit(WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT,
> +			      ab->wmi_ab.svc_map))
> +			info->status.ack_signal += ATH11K_DEFAULT_NOISE_FLOOR;
> +
>   		info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID;
>   	}
>   
> diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.h b/drivers/net/wireless/ath/ath11k/dp_tx.h
> index 61be2265e09f..795fe3b8fa0d 100644
> --- a/drivers/net/wireless/ath/ath11k/dp_tx.h
> +++ b/drivers/net/wireless/ath/ath11k/dp_tx.h
> @@ -1,7 +1,7 @@
>   /* SPDX-License-Identifier: BSD-3-Clause-Clear */
>   /*
>    * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
> - * Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. All rights reserved.
> + * Copyright (c) 2021, 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>    */
>   
>   #ifndef ATH11K_DP_TX_H
> @@ -13,7 +13,7 @@
>   struct ath11k_dp_htt_wbm_tx_status {
>   	u32 msdu_id;
>   	bool acked;
> -	int ack_rssi;
> +	s8 ack_rssi;
>   	u16 peer_id;
>   };
>   
> diff --git a/drivers/net/wireless/ath/ath11k/hal_tx.h b/drivers/net/wireless/ath/ath11k/hal_tx.h
> index c5e88364afe5..46d17abd808b 100644
> --- a/drivers/net/wireless/ath/ath11k/hal_tx.h
> +++ b/drivers/net/wireless/ath/ath11k/hal_tx.h
> @@ -1,7 +1,7 @@
>   /* SPDX-License-Identifier: BSD-3-Clause-Clear */
>   /*
>    * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
> - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
> + * Copyright (c) 2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved.
>    */
>   
>   #ifndef ATH11K_HAL_TX_H
> @@ -54,7 +54,7 @@ struct hal_tx_info {
>   struct hal_tx_status {
>   	enum hal_wbm_rel_src_module buf_rel_source;
>   	enum hal_wbm_tqm_rel_reason status;
> -	u8 ack_rssi;
> +	s8 ack_rssi;
>   	u32 flags; /* %HAL_TX_STATUS_FLAGS_ */
>   	u32 ppdu_id;
>   	u8 try_cnt;
>
> base-commit: a116bf2be795eb1db75fa6a48aa85c397be001a6

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: ath11k: fix ack signal strength calculation
  2024-06-13 11:57 ` James Prestwood
@ 2024-06-13 12:08   ` Lingbo Kong
  0 siblings, 0 replies; 5+ messages in thread
From: Lingbo Kong @ 2024-06-13 12:08 UTC (permalink / raw)
  To: James Prestwood, ath11k; +Cc: linux-wireless



On 2024/6/13 19:57, James Prestwood wrote:
> Hi Lingbo,
> 
> On 6/10/24 7:25 PM, Lingbo Kong wrote:
>> Currently, the calculation of ack signal strength is incorrect.
>>
>> This is because before calculating the ack 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.
> 
> This oatch got me checking on some devices we have running ath11k 
> (WCN6855). I don't see any "ack signal" property but I noticed the 
> signal avg does not seem correct:
> 
> signal:      -55 [-62, -56] dBm
> signal avg:    105 dBm
> 
> Every other device besides ath11k has a signal avg close to or equal to 
> the signal. Do you think there is also an issue with this property? not 
> just the ack signal?
> 
> Thanks,
> 
> James
> 

Hi,james,

This is indeed a issue, but I have solved it. It's just that this patch 
has not been applied to ath.git. you can apply the following patch.

https://patchwork.kernel.org/project/linux-wireless/patch/20240309121129.5379-1-quic_lingbok@quicinc.com/

best regards
Lingbo Kong


>>
>> Besides, the value of ack_rssi passed by firmware to ath11k should be a
>> signed number, so change its type to s8.
>>
>> After that, "iw wlan0 station dump" show the correct ack signal strength.
>>
>> Such as:
>> root@CDCCSTEX0799733-LIN:~# iw wlp88s0 station dump
>> Station 00:03:7f:12:df:df (on wlp88s0)
>>          inactive time:  75 ms
>>          rx bytes:       11599
>>          rx packets:     99
>>          tx bytes:       9029
>>          tx packets:     81
>>          tx retries:     4
>>          tx failed:      0
>>          rx drop misc:   2
>>          signal:         -16 dBm
>>          signal avg:     -24 dBm
>>          tx bitrate:     1560.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 4
>>          tx duration:    9230 us
>>          rx bitrate:     1560.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 4
>>          rx duration:    7201 us
>>          last ack signal:-23 dBm
>>          avg ack signal: -22 dBm
>>
>> Tested-on: WCN6855 hw2.0 PCI 
>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
>> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
>>
>> Signed-off-by: Lingbo Kong <quic_lingbok@quicinc.com>
>> ---
>>   drivers/net/wireless/ath/ath11k/dp_tx.c  | 16 ++++++++++++----
>>   drivers/net/wireless/ath/ath11k/dp_tx.h  |  4 ++--
>>   drivers/net/wireless/ath/ath11k/hal_tx.h |  4 ++--
>>   3 files changed, 16 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c 
>> b/drivers/net/wireless/ath/ath11k/dp_tx.c
>> index 21819b741701..8522c67baabf 100644
>> --- a/drivers/net/wireless/ath/ath11k/dp_tx.c
>> +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
>> @@ -353,8 +353,12 @@ ath11k_dp_tx_htt_tx_complete_buf(struct 
>> ath11k_base *ab,
>>       if (ts->acked) {
>>           if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
>>               info->flags |= IEEE80211_TX_STAT_ACK;
>> -            info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR +
>> -                          ts->ack_rssi;
>> +            info->status.ack_signal = ts->ack_rssi;
>> +
>> +            if (!test_bit(WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT,
>> +                      ab->wmi_ab.svc_map))
>> +                info->status.ack_signal += ATH11K_DEFAULT_NOISE_FLOOR;
>> +
>>               info->status.flags |=
>>                   IEEE80211_TX_STATUS_ACK_SIGNAL_VALID;
>>           } else {
>> @@ -584,8 +588,12 @@ static void ath11k_dp_tx_complete_msdu(struct 
>> ath11k *ar,
>>       if (ts->status == HAL_WBM_TQM_REL_REASON_FRAME_ACKED &&
>>           !(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
>>           info->flags |= IEEE80211_TX_STAT_ACK;
>> -        info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR +
>> -                      ts->ack_rssi;
>> +        info->status.ack_signal = ts->ack_rssi;
>> +
>> +        if (!test_bit(WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT,
>> +                  ab->wmi_ab.svc_map))
>> +            info->status.ack_signal += ATH11K_DEFAULT_NOISE_FLOOR;
>> +
>>           info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID;
>>       }
>> diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.h 
>> b/drivers/net/wireless/ath/ath11k/dp_tx.h
>> index 61be2265e09f..795fe3b8fa0d 100644
>> --- a/drivers/net/wireless/ath/ath11k/dp_tx.h
>> +++ b/drivers/net/wireless/ath/ath11k/dp_tx.h
>> @@ -1,7 +1,7 @@
>>   /* SPDX-License-Identifier: BSD-3-Clause-Clear */
>>   /*
>>    * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
>> - * Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. All 
>> rights reserved.
>> + * Copyright (c) 2021, 2023-2024 Qualcomm Innovation Center, Inc. All 
>> rights reserved.
>>    */
>>   #ifndef ATH11K_DP_TX_H
>> @@ -13,7 +13,7 @@
>>   struct ath11k_dp_htt_wbm_tx_status {
>>       u32 msdu_id;
>>       bool acked;
>> -    int ack_rssi;
>> +    s8 ack_rssi;
>>       u16 peer_id;
>>   };
>> diff --git a/drivers/net/wireless/ath/ath11k/hal_tx.h 
>> b/drivers/net/wireless/ath/ath11k/hal_tx.h
>> index c5e88364afe5..46d17abd808b 100644
>> --- a/drivers/net/wireless/ath/ath11k/hal_tx.h
>> +++ b/drivers/net/wireless/ath/ath11k/hal_tx.h
>> @@ -1,7 +1,7 @@
>>   /* SPDX-License-Identifier: BSD-3-Clause-Clear */
>>   /*
>>    * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
>> - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights 
>> reserved.
>> + * Copyright (c) 2022, 2024 Qualcomm Innovation Center, Inc. All 
>> rights reserved.
>>    */
>>   #ifndef ATH11K_HAL_TX_H
>> @@ -54,7 +54,7 @@ struct hal_tx_info {
>>   struct hal_tx_status {
>>       enum hal_wbm_rel_src_module buf_rel_source;
>>       enum hal_wbm_tqm_rel_reason status;
>> -    u8 ack_rssi;
>> +    s8 ack_rssi;
>>       u32 flags; /* %HAL_TX_STATUS_FLAGS_ */
>>       u32 ppdu_id;
>>       u8 try_cnt;
>>
>> base-commit: a116bf2be795eb1db75fa6a48aa85c397be001a6

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: ath11k: fix ack signal strength calculation
  2024-06-11  2:25 [PATCH] wifi: ath11k: fix ack signal strength calculation Lingbo Kong
  2024-06-12 19:26 ` Jeff Johnson
  2024-06-13 11:57 ` James Prestwood
@ 2024-06-19 13:59 ` Kalle Valo
  2 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2024-06-19 13:59 UTC (permalink / raw)
  To: Lingbo Kong; +Cc: ath11k, linux-wireless, quic_lingbok

Lingbo Kong <quic_lingbok@quicinc.com> wrote:

> Currently, the calculation of ack signal strength is incorrect.
> 
> This is because before calculating the ack 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.
> 
> Besides, the value of ack_rssi passed by firmware to ath11k should be a
> signed number, so change its type to s8.
> 
> After that, "iw wlan0 station dump" show the correct ack signal strength.
> 
> Such as:
> root@CDCCSTEX0799733-LIN:~# iw wlp88s0 station dump
> Station 00:03:7f:12:df:df (on wlp88s0)
>         inactive time:  75 ms
>         rx bytes:       11599
>         rx packets:     99
>         tx bytes:       9029
>         tx packets:     81
>         tx retries:     4
>         tx failed:      0
>         rx drop misc:   2
>         signal:         -16 dBm
>         signal avg:     -24 dBm
>         tx bitrate:     1560.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 4
>         tx duration:    9230 us
>         rx bitrate:     1560.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 4
>         rx duration:    7201 us
>         last ack signal:-23 dBm
>         avg ack signal: -22 dBm
> 
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Lingbo Kong <quic_lingbok@quicinc.com>
> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

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

94f228ac4f5b wifi: ath11k: fix ack signal strength calculation

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20240611022550.59078-1-quic_lingbok@quicinc.com/

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-19 13:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11  2:25 [PATCH] wifi: ath11k: fix ack signal strength calculation Lingbo Kong
2024-06-12 19:26 ` Jeff Johnson
2024-06-13 11:57 ` James Prestwood
2024-06-13 12:08   ` Lingbo Kong
2024-06-19 13:59 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox