]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath12k: fix signal in radiotap for WCN7850
authorKang Yang <kang.yang@oss.qualcomm.com>
Tue, 22 Jul 2025 09:59:32 +0000 (17:59 +0800)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Thu, 18 Sep 2025 23:43:47 +0000 (16:43 -0700)
Currently host will add ATH12K_DEFAULT_NOISE_FLOOR to rssi_comb to
convert RSSI from dB to dBm.

For WCN7850, this conversion is unnecessary because the RSSI value is
already reported in dBm units.

No longer convert for those firmware that already support dBM conversion.

This patch won't affect QCN chips.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Signed-off-by: Kang Yang <kang.yang@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20250722095934.67-2-kang.yang@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/dp_mon.c

index 8189e52ed00718995572ba1e1c3cc26756846d20..ec1587d0b917c103349b8026111b9e5ad16abb1e 100644 (file)
@@ -2154,8 +2154,12 @@ static void ath12k_dp_mon_update_radiotap(struct ath12k *ar,
        spin_unlock_bh(&ar->data_lock);
 
        rxs->flag |= RX_FLAG_MACTIME_START;
-       rxs->signal = ppduinfo->rssi_comb + noise_floor;
        rxs->nss = ppduinfo->nss + 1;
+       if (test_bit(WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT,
+                    ar->ab->wmi_ab.svc_map))
+               rxs->signal = ppduinfo->rssi_comb;
+       else
+               rxs->signal = ppduinfo->rssi_comb + noise_floor;
 
        if (ppduinfo->userstats[ppduinfo->userid].ampdu_present) {
                rxs->flag |= RX_FLAG_AMPDU_DETAILS;