* [STABLE REQUEST] wifi: ath11k: signal strength fixes for 6.6.y and 6.1.y
@ 2026-11-28 5:04 Henry Zhang
2026-11-28 7:30 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Henry Zhang @ 2026-11-28 5:04 UTC (permalink / raw)
To: stable; +Cc: jjohnson, quic_lingbok, linux-wireless, ath11k
Hi,
Please consider these two mainline commits for 6.6.y and 6.1.y:
94f228ac4f5b ("wifi: ath11k: fix ack signal strength calculation")
aadeee47e9d7 ("wifi: ath11k: modify the calculation of the average
signal strength in station mode")
Both are in mainline since v6.11 and in 6.12.y, but not in 6.6.y or
6.1.y, which still add ATH11K_DEFAULT_NOISE_FLOOR to the ack signal and
to the average signal unconditionally.
On firmware that reports the signal as a signed dBm byte
(WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT), these paths treat that
byte as unsigned and still add the -95 dB noise floor, so
"iw dev <wlan> station dump" reports impossible positive values while
"signal" itself is right. Seen on a QCA6390 (fw 0x101c06cc) with an
Ubuntu 6.8 kernel, which has the same affected calculations as 6.6.y:
signal: -47 [-50, -51] dBm
signal avg: 109 dBm
last ack signal: 103 dBm
avg ack signal: 47 dBm
109 is 204 - 95, where 204 (0xcc) is -52 dBm, and 103 is 198 - 95,
where 198 (0xc6) is -58 dBm. Userspace that reads these values over
nl80211 gets wrong numbers. No connectivity problem was seen.
The average signal code was added by b205ce4c266c ("ath11k: support
avg signal in station dump"), so 5.15.y does not have that part; I
have not checked 5.15.y for the ack signal part.
- 6.6.y: both commits apply as-is.
- 6.1.y: aadeee47e9d7 applies as-is. 94f228ac4f5b conflicts only in
the Copyright line of dp_tx.h; I can send a backport without that
line if that helps.
Testing: upstream, 94f228ac4f5b was tested on WCN6855 and QCN9074, and
aadeee47e9d7 on WCN6855. I applied both to the Ubuntu 6.8.0-138 ath11k
sources and built the modules against the 6.8.0-138 headers without
warnings (BTF generation was skipped, as vmlinux was not available).
I have not run them on the QCA6390, and I have not built 6.6.y or
6.1.y with them.
Thanks,
Henry Zhang
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [STABLE REQUEST] wifi: ath11k: signal strength fixes for 6.6.y and 6.1.y 2026-11-28 5:04 [STABLE REQUEST] wifi: ath11k: signal strength fixes for 6.6.y and 6.1.y Henry Zhang @ 2026-11-28 7:30 ` Greg KH 2026-12-01 2:27 ` [PATCH 6.6.y 0/2] wifi: ath11k: fix ack and average signal strength Henry Zhang 2026-12-01 2:27 ` [PATCH 6.1.y 0/2] wifi: ath11k: fix ack and average signal strength Henry Zhang 0 siblings, 2 replies; 8+ messages in thread From: Greg KH @ 2026-11-28 7:30 UTC (permalink / raw) To: Henry Zhang; +Cc: stable, jjohnson, quic_lingbok, linux-wireless, ath11k On Fri, Nov 27, 2026 at 09:04:06PM -0800, Henry Zhang wrote: > Hi, > > Please consider these two mainline commits for 6.6.y and 6.1.y: > > 94f228ac4f5b ("wifi: ath11k: fix ack signal strength calculation") > aadeee47e9d7 ("wifi: ath11k: modify the calculation of the average > signal strength in station mode") > > Both are in mainline since v6.11 and in 6.12.y, but not in 6.6.y or > 6.1.y, which still add ATH11K_DEFAULT_NOISE_FLOOR to the ack signal and > to the average signal unconditionally. > > On firmware that reports the signal as a signed dBm byte > (WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT), these paths treat that > byte as unsigned and still add the -95 dB noise floor, so > "iw dev <wlan> station dump" reports impossible positive values while > "signal" itself is right. Seen on a QCA6390 (fw 0x101c06cc) with an > Ubuntu 6.8 kernel, which has the same affected calculations as 6.6.y: > > signal: -47 [-50, -51] dBm > signal avg: 109 dBm > last ack signal: 103 dBm > avg ack signal: 47 dBm > > 109 is 204 - 95, where 204 (0xcc) is -52 dBm, and 103 is 198 - 95, > where 198 (0xc6) is -58 dBm. Userspace that reads these values over > nl80211 gets wrong numbers. No connectivity problem was seen. > > The average signal code was added by b205ce4c266c ("ath11k: support > avg signal in station dump"), so 5.15.y does not have that part; I > have not checked 5.15.y for the ack signal part. > > - 6.6.y: both commits apply as-is. > - 6.1.y: aadeee47e9d7 applies as-is. 94f228ac4f5b conflicts only in > the Copyright line of dp_tx.h; I can send a backport without that > line if that helps. Please send tested backport series for all of these. thanks, greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 6.6.y 0/2] wifi: ath11k: fix ack and average signal strength 2026-11-28 7:30 ` Greg KH @ 2026-12-01 2:27 ` Henry Zhang 2026-12-01 2:27 ` [PATCH 6.6.y 1/2] wifi: ath11k: fix ack signal strength calculation Henry Zhang 2026-12-01 2:27 ` [PATCH 6.6.y 2/2] wifi: ath11k: modify the calculation of the average signal strength in station mode Henry Zhang 2026-12-01 2:27 ` [PATCH 6.1.y 0/2] wifi: ath11k: fix ack and average signal strength Henry Zhang 1 sibling, 2 replies; 8+ messages in thread From: Henry Zhang @ 2026-12-01 2:27 UTC (permalink / raw) To: stable; +Cc: Henry Zhang, greg, jjohnson, quic_lingbok, linux-wireless, ath11k Backports of two ath11k fixes from mainline (v6.11), as requested in: https://lore.kernel.org/stable/2026112814-habitable-falsify-b2ab@gregkh/ 94f228ac4f5b ("wifi: ath11k: fix ack signal strength calculation") aadeee47e9d7 ("wifi: ath11k: modify the calculation of the average signal strength in station mode") On firmware that reports signal in dBm, 6.6.y adds the noise floor to an unsigned ack signal and to the average signal, so "iw station dump" reports incorrect values, including impossible positive values. Both commits apply to 6.6.y as-is. Testing: - A full x86_64 kernel and modules build on top of v6.6.163 completed with CONFIG_ATH11K=m and CONFIG_ATH11K_PCI=m. A separate W=1 ath11k build had the same one pre-existing debugfs warning before and after the series, with no errors. - Runtime-tested the same code changes on a QCA6390 (hw2.0, fw 0x101c06cc) with Ubuntu 6.8.0-149. The stock and patched ath11k modules were built from the same Ubuntu source. The stock module's srcversion matched the installed running module, and the patched module's srcversion matched the module loaded at boot. - The affected calculations and field declarations in that Ubuntu source match 6.6.y; surrounding source differences do not affect the patched code. I have not booted a 6.6.y kernel. Representative station dumps from separate boots, using the same AP and frequency: station dump stock with the two commits signal -63 dBm -63 dBm signal avg 98 dBm -61 dBm last ack signal 102 dBm -60 dBm avg ack signal -97 dBm -60 dBm (Beacon signal average was -57 dBm in both boots. Both boots also completed 60 gateway pings with no packet loss.) Lingbo Kong (2): wifi: ath11k: fix ack signal strength calculation wifi: ath11k: modify the calculation of the average signal strength in station mode 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 ++-- drivers/net/wireless/ath/ath11k/mac.c | 7 +++++-- 4 files changed, 21 insertions(+), 10 deletions(-) -- 2.34.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 6.6.y 1/2] wifi: ath11k: fix ack signal strength calculation 2026-12-01 2:27 ` [PATCH 6.6.y 0/2] wifi: ath11k: fix ack and average signal strength Henry Zhang @ 2026-12-01 2:27 ` Henry Zhang 2026-12-01 2:27 ` [PATCH 6.6.y 2/2] wifi: ath11k: modify the calculation of the average signal strength in station mode Henry Zhang 1 sibling, 0 replies; 8+ messages in thread From: Henry Zhang @ 2026-12-01 2:27 UTC (permalink / raw) To: stable; +Cc: Lingbo Kong, greg, jjohnson, linux-wireless, ath11k, Henry Zhang From: Lingbo Kong <quic_lingbok@quicinc.com> commit 94f228ac4f5b8c22f83865e51d3346c2d44d370d upstream. 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> Link: https://patch.msgid.link/20240611022550.59078-1-quic_lingbok@quicinc.com Signed-off-by: Henry Zhang <henryzhang62@gmail.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 22a0d5070..52f0c43ed 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 61be2265e..795fe3b8f 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 c5e88364a..46d17abd8 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; -- 2.34.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6.6.y 2/2] wifi: ath11k: modify the calculation of the average signal strength in station mode 2026-12-01 2:27 ` [PATCH 6.6.y 0/2] wifi: ath11k: fix ack and average signal strength Henry Zhang 2026-12-01 2:27 ` [PATCH 6.6.y 1/2] wifi: ath11k: fix ack signal strength calculation Henry Zhang @ 2026-12-01 2:27 ` Henry Zhang 1 sibling, 0 replies; 8+ messages in thread From: Henry Zhang @ 2026-12-01 2:27 UTC (permalink / raw) To: stable; +Cc: Lingbo Kong, greg, jjohnson, linux-wireless, ath11k, Henry Zhang From: Lingbo Kong <quic_lingbok@quicinc.com> commit aadeee47e9d7ae98f7116f63fa63fcceffffc65c upstream. 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 <quic_lingbok@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20240309121129.5379-1-quic_lingbok@quicinc.com Signed-off-by: Henry Zhang <henryzhang62@gmail.com> --- 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 2661d2bc8..267daf287 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -8544,8 +8544,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); } -- 2.34.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6.1.y 0/2] wifi: ath11k: fix ack and average signal strength 2026-11-28 7:30 ` Greg KH 2026-12-01 2:27 ` [PATCH 6.6.y 0/2] wifi: ath11k: fix ack and average signal strength Henry Zhang @ 2026-12-01 2:27 ` Henry Zhang 2026-12-01 2:27 ` [PATCH 6.1.y 1/2] wifi: ath11k: fix ack signal strength calculation Henry Zhang 2026-12-01 2:27 ` [PATCH 6.1.y 2/2] wifi: ath11k: modify the calculation of the average signal strength in station mode Henry Zhang 1 sibling, 2 replies; 8+ messages in thread From: Henry Zhang @ 2026-12-01 2:27 UTC (permalink / raw) To: stable; +Cc: Henry Zhang, greg, jjohnson, quic_lingbok, linux-wireless, ath11k Backports of two ath11k fixes from mainline (v6.11), as requested in: https://lore.kernel.org/stable/2026112814-habitable-falsify-b2ab@gregkh/ 94f228ac4f5b ("wifi: ath11k: fix ack signal strength calculation") aadeee47e9d7 ("wifi: ath11k: modify the calculation of the average signal strength in station mode") On firmware that reports signal in dBm, 6.1.y adds the noise floor to an unsigned ack signal and to the average signal, so "iw station dump" reports incorrect values, including impossible positive values. aadeee47e9d7 applies as-is. The 94f228ac4f5b backport omits the dp_tx.h Copyright-line change, which does not apply to 6.1.y; its code changes are identical to upstream. Testing: - A full x86_64 kernel and modules build on top of v6.1.193 completed with CONFIG_ATH11K=m and CONFIG_ATH11K_PCI=m. Separate W=1 ath11k builds before and after the series completed without warnings or errors. - Runtime-tested the same code changes on a QCA6390 (hw2.0, fw 0x101c06cc) with Ubuntu 6.8.0-149. The stock and patched ath11k modules were built from the same Ubuntu source. The stock module's srcversion matched the installed running module, and the patched module's srcversion matched the module loaded at boot. - The affected calculations and field declarations in that Ubuntu source match 6.1.y; surrounding source differences do not affect the patched code. I have not booted a 6.1.y kernel. Representative station dumps from separate boots, using the same AP and frequency: station dump stock with the two commits signal -63 dBm -63 dBm signal avg 98 dBm -61 dBm last ack signal 102 dBm -60 dBm avg ack signal -97 dBm -60 dBm (Beacon signal average was -57 dBm in both boots. Both boots also completed 60 gateway pings with no packet loss.) Lingbo Kong (2): wifi: ath11k: fix ack signal strength calculation wifi: ath11k: modify the calculation of the average signal strength in station mode drivers/net/wireless/ath/ath11k/dp_tx.c | 16 ++++++++++++---- drivers/net/wireless/ath/ath11k/dp_tx.h | 2 +- drivers/net/wireless/ath/ath11k/hal_tx.h | 4 ++-- drivers/net/wireless/ath/ath11k/mac.c | 7 +++++-- 4 files changed, 20 insertions(+), 9 deletions(-) -- 2.34.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 6.1.y 1/2] wifi: ath11k: fix ack signal strength calculation 2026-12-01 2:27 ` [PATCH 6.1.y 0/2] wifi: ath11k: fix ack and average signal strength Henry Zhang @ 2026-12-01 2:27 ` Henry Zhang 2026-12-01 2:27 ` [PATCH 6.1.y 2/2] wifi: ath11k: modify the calculation of the average signal strength in station mode Henry Zhang 1 sibling, 0 replies; 8+ messages in thread From: Henry Zhang @ 2026-12-01 2:27 UTC (permalink / raw) To: stable; +Cc: Lingbo Kong, greg, jjohnson, linux-wireless, ath11k, Henry Zhang From: Lingbo Kong <quic_lingbok@quicinc.com> commit 94f228ac4f5b8c22f83865e51d3346c2d44d370d upstream. 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> Link: https://patch.msgid.link/20240611022550.59078-1-quic_lingbok@quicinc.com [ Backport to 6.1.y: leave out the Copyright line change in dp_tx.h, as the Copyright lines of 6.1.y differ. ] Signed-off-by: Henry Zhang <henryzhang62@gmail.com> --- drivers/net/wireless/ath/ath11k/dp_tx.c | 16 ++++++++++++---- drivers/net/wireless/ath/ath11k/dp_tx.h | 2 +- drivers/net/wireless/ath/ath11k/hal_tx.h | 4 ++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c index cd2448861..48f362736 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 68a21ea9b..38ec89a81 100644 --- a/drivers/net/wireless/ath/ath11k/dp_tx.h +++ b/drivers/net/wireless/ath/ath11k/dp_tx.h @@ -12,7 +12,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 c5e88364a..46d17abd8 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; -- 2.34.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6.1.y 2/2] wifi: ath11k: modify the calculation of the average signal strength in station mode 2026-12-01 2:27 ` [PATCH 6.1.y 0/2] wifi: ath11k: fix ack and average signal strength Henry Zhang 2026-12-01 2:27 ` [PATCH 6.1.y 1/2] wifi: ath11k: fix ack signal strength calculation Henry Zhang @ 2026-12-01 2:27 ` Henry Zhang 1 sibling, 0 replies; 8+ messages in thread From: Henry Zhang @ 2026-12-01 2:27 UTC (permalink / raw) To: stable; +Cc: Lingbo Kong, greg, jjohnson, linux-wireless, ath11k, Henry Zhang From: Lingbo Kong <quic_lingbok@quicinc.com> commit aadeee47e9d7ae98f7116f63fa63fcceffffc65c upstream. 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 <quic_lingbok@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20240309121129.5379-1-quic_lingbok@quicinc.com Signed-off-by: Henry Zhang <henryzhang62@gmail.com> --- 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 b4b977d29..e626435cf 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -8201,8 +8201,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); } -- 2.34.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-12-01 2:28 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-11-28 5:04 [STABLE REQUEST] wifi: ath11k: signal strength fixes for 6.6.y and 6.1.y Henry Zhang 2026-11-28 7:30 ` Greg KH 2026-12-01 2:27 ` [PATCH 6.6.y 0/2] wifi: ath11k: fix ack and average signal strength Henry Zhang 2026-12-01 2:27 ` [PATCH 6.6.y 1/2] wifi: ath11k: fix ack signal strength calculation Henry Zhang 2026-12-01 2:27 ` [PATCH 6.6.y 2/2] wifi: ath11k: modify the calculation of the average signal strength in station mode Henry Zhang 2026-12-01 2:27 ` [PATCH 6.1.y 0/2] wifi: ath11k: fix ack and average signal strength Henry Zhang 2026-12-01 2:27 ` [PATCH 6.1.y 1/2] wifi: ath11k: fix ack signal strength calculation Henry Zhang 2026-12-01 2:27 ` [PATCH 6.1.y 2/2] wifi: ath11k: modify the calculation of the average signal strength in station mode Henry Zhang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox