diff mbox series

[ath-next,3/3] wifi: ath12k: setup survey rx and bss_rx

Message ID 20250319192946.1087196-3-janusz.dziedzic@gmail.com
State Superseded
Headers show
Series [ath-next,1/3] wifi: ath10k: setup survey rx and bss_rx | expand

Commit Message

Janusz Dziedzic March 19, 2025, 7:29 p.m. UTC
Fill survey rx and bss_rx times correctly.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
---
 drivers/net/wireless/ath/ath12k/wmi.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index 04dd307ebfc4..9c829f2ee3e6 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -6773,16 +6773,18 @@  ath12k_pdev_bss_chan_info_event(struct ath12k_base *ab, struct sk_buff *skb)
 
 	survey = &ar->survey[idx];
 
-	survey->noise     = le32_to_cpu(bss_ch_info_ev.noise_floor);
-	survey->time      = div_u64(total, cc_freq_hz);
+	survey->noise = le32_to_cpu(bss_ch_info_ev.noise_floor);
+	survey->time = div_u64(total, cc_freq_hz);
 	survey->time_busy = div_u64(busy, cc_freq_hz);
-	survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
-	survey->time_tx   = div_u64(tx, cc_freq_hz);
-	survey->filled   |= (SURVEY_INFO_NOISE_DBM |
-			     SURVEY_INFO_TIME |
-			     SURVEY_INFO_TIME_BUSY |
-			     SURVEY_INFO_TIME_RX |
-			     SURVEY_INFO_TIME_TX);
+	survey->time_rx = div_u64(rx, cc_freq_hz);
+	survey->time_tx = div_u64(tx, cc_freq_hz);
+	survey->time_bss_rx = div_u64(rx_bss, cc_freq_hz);
+	survey->filled |= (SURVEY_INFO_NOISE_DBM |
+			   SURVEY_INFO_TIME |
+			   SURVEY_INFO_TIME_BUSY |
+			   SURVEY_INFO_TIME_RX |
+			   SURVEY_INFO_TIME_TX |
+			   SURVEY_INFO_TIME_BSS_RX);
 exit:
 	spin_unlock_bh(&ar->data_lock);
 	complete(&ar->bss_survey_done);