aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath11k/core.h
diff options
context:
space:
mode:
authorThiraviyam Mariyappan <quic_tmariyap@quicinc.com>2022-05-19 18:27:41 +0530
committerKalle Valo <quic_kvalo@quicinc.com>2022-05-30 14:25:27 +0300
commitb205ce4c266cd66e6f954733ef6c94f06722e150 (patch)
tree0d42ac92269b9dab01dad8bdc93872efce47ed8f /drivers/net/wireless/ath/ath11k/core.h
parentath11k: fix IRQ affinity warning on shutdown (diff)
downloadlinux-b205ce4c266cd66e6f954733ef6c94f06722e150.tar.xz
linux-b205ce4c266cd66e6f954733ef6c94f06722e150.zip
ath11k: support avg signal in station dump
Currently mac80211 doesn't calculate average signal when RSS(Receive side scaling) is enabled from the driver, so average signal isn't printed in the station dump. To address this issue, calculate the average signal from RSSI within driver and display in the station dump. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1 Signed-off-by: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/1652965061-30457-1-git-send-email-quic_tmariyap@quicinc.com
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/core.h')
-rw-r--r--drivers/net/wireless/ath/ath11k/core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
index 95bca0b078b1..ea31016437b0 100644
--- a/drivers/net/wireless/ath/ath11k/core.h
+++ b/drivers/net/wireless/ath/ath11k/core.h
@@ -14,6 +14,7 @@
#include <linux/dmi.h>
#include <linux/ctype.h>
#include <linux/rhashtable.h>
+#include <linux/average.h>
#include "qmi.h"
#include "htc.h"
#include "wmi.h"
@@ -464,6 +465,8 @@ struct ath11k_per_ppdu_tx_stats {
u32 retry_bytes;
};
+DECLARE_EWMA(avg_rssi, 10, 8)
+
struct ath11k_sta {
struct ath11k_vif *arvif;
@@ -482,6 +485,7 @@ struct ath11k_sta {
u64 rx_duration;
u64 tx_duration;
u8 rssi_comb;
+ struct ewma_avg_rssi avg_rssi;
s8 rssi_beacon;
s8 chain_signal[IEEE80211_MAX_CHAINS];
struct ath11k_htt_tx_stats *tx_stats;