diff options
| author | Raj Kumar Bhagat <[email protected]> | 2025-06-23 15:49:10 +0000 |
|---|---|---|
| committer | Jeff Johnson <[email protected]> | 2025-06-26 23:10:46 +0000 |
| commit | 662e9032140fd92662142d4bf394916cf48e426f (patch) | |
| tree | f9217f78785b1bfd558d3c88f769951290ea2d81 /drivers/net/wireless/ath/ath12k/wmi.c | |
| parent | wifi: ath12k: handle WMI event for real noise floor calculation (diff) | |
| download | kernel-662e9032140fd92662142d4bf394916cf48e426f.tar.gz kernel-662e9032140fd92662142d4bf394916cf48e426f.zip | |
wifi: ath12k: use real noise floor instead of default value
ATH12K_DEFAULT_NOISE_FLOOR represents the approximate noise floor value
which is used for RSSI calculation. Commit "wifi: ath12k: handle WMI event
for real noise floor calculation" added support to get the real noise floor
value from the firmware. Add changes to use the real value now instead of
the default one.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
Signed-off-by: Raj Kumar Bhagat <[email protected]>
Co-developed-by: Aditya Kumar Singh <[email protected]>
Signed-off-by: Aditya Kumar Singh <[email protected]>
Reviewed-by: Vasanthakumar Thiagarajan <[email protected]>
Link: https://patch.msgid.link/20250623-support_real_noise_floor-v2-2-974bbafa317e@oss.qualcomm.com
Signed-off-by: Jeff Johnson <[email protected]>
Diffstat (limited to 'drivers/net/wireless/ath/ath12k/wmi.c')
| -rw-r--r-- | drivers/net/wireless/ath/ath12k/wmi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index 3ec58feab755..37ac921fb7da 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -6981,6 +6981,7 @@ static void ath12k_mgmt_rx_event(struct ath12k_base *ab, struct sk_buff *skb) struct ieee80211_hdr *hdr; u16 fc; struct ieee80211_supported_band *sband; + s32 noise_floor; if (ath12k_pull_mgmt_rx_params_tlv(ab, skb, &rx_ev) != 0) { ath12k_warn(ab, "failed to extract mgmt rx event"); @@ -7042,7 +7043,11 @@ static void ath12k_mgmt_rx_event(struct ath12k_base *ab, struct sk_buff *skb) status->freq = ieee80211_channel_to_frequency(rx_ev.channel, status->band); - status->signal = rx_ev.snr + ATH12K_DEFAULT_NOISE_FLOOR; + spin_lock_bh(&ar->data_lock); + noise_floor = ath12k_pdev_get_noise_floor(ar); + spin_unlock_bh(&ar->data_lock); + + status->signal = rx_ev.snr + noise_floor; status->rate_idx = ath12k_mac_bitrate_to_idx(sband, rx_ev.rate / 100); hdr = (struct ieee80211_hdr *)skb->data; |
