aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/util.c
diff options
context:
space:
mode:
authorSarika Sharma <quic_sarishar@quicinc.com>2025-05-28 11:14:18 +0530
committerJohannes Berg <johannes.berg@intel.com>2025-06-24 15:19:26 +0200
commit505991fba9ec112770c79a0fea56b4c49a5ad2fa (patch)
tree7b8414f45bef3b53722e09c1ed8a9bec458ddc1a /net/wireless/util.c
parentwifi: cfg80211: clear sinfo->filled for MLO station statistics (diff)
downloadlinux-505991fba9ec112770c79a0fea56b4c49a5ad2fa.tar.gz
linux-505991fba9ec112770c79a0fea56b4c49a5ad2fa.zip
wifi: mac80211: extend support to fill link level sinfo structure
Currently, sinfo structure is supported to fill information at deflink( or one of the links) level for station. This has problems when applied to fetch multi-link(ML) station information. Hence, if valid_links are present, support filling link_station structure for each link. This will be helpful to check the link related statistics during MLO. Additionally, TXQ stats for pertid are applicable at station level not at link level. Therefore check link_id is less then 0, before filling TXQ stats in pertid stats. Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com> Link: https://patch.msgid.link/20250528054420.3050133-9-quic_sarishar@quicinc.com [fix some indentation] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r--net/wireless/util.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index e438f883f085..5aff11c35303 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -2650,6 +2650,18 @@ bool cfg80211_does_bw_fit_range(const struct ieee80211_freq_range *freq_range,
return false;
}
+int cfg80211_link_sinfo_alloc_tid_stats(struct link_station_info *link_sinfo,
+ gfp_t gfp)
+{
+ link_sinfo->pertid = kcalloc(IEEE80211_NUM_TIDS + 1,
+ sizeof(*link_sinfo->pertid), gfp);
+ if (!link_sinfo->pertid)
+ return -ENOMEM;
+
+ return 0;
+}
+EXPORT_SYMBOL(cfg80211_link_sinfo_alloc_tid_stats);
+
int cfg80211_sinfo_alloc_tid_stats(struct station_info *sinfo, gfp_t gfp)
{
sinfo->pertid = kcalloc(IEEE80211_NUM_TIDS + 1,