Message ID | 20250514164857.227540-8-quic_sarishar@quicinc.com |
---|---|
State | New |
Headers | show |
Series | [wireless-next,v7,01/10] wifi: mac80211: add support towards MLO handling of station statistics | expand |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 392e7990f8f0..40d615d97a5c 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -7350,6 +7350,13 @@ static void cfg80211_sta_set_mld_sinfo(struct station_info *sinfo) } init++; } + + /* Resetting sinfo->filled bits to exclude fields which don't + * make much sense at the MLO level. + */ + sinfo->filled &= ~(1 << NL80211_STA_INFO_CHAIN_SIGNAL); + sinfo->filled &= ~(1 << NL80211_STA_INFO_CHAIN_SIGNAL_AVG); + sinfo->filled &= ~(1 << NL80211_STA_INFO_TID_STATS); } static int nl80211_dump_station(struct sk_buff *skb,
Currently, sinfo->filled is for set in sta_set_sinfo() after filling the corresponding fields in station_info structure for station statistics. For non-ML stations, the fields are correctly filled from sta->deflink and corresponding sinfo->filled bit are set, but for MLO any one of link's data is filled and corresponding sinfo->filled bit is set. For MLO before embed NL message, fields of sinfo structure like bytes, packets, signal are updated with accumulated, best, least of all links data. But some of fields like rssi, pertid don't make much sense at MLO level. Hence, to prevent misinterpretation, reset sinfo->filled for fields which don't make much sense at MLO level. This will prevent filling the unnecessary values in NL message. Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com> --- net/wireless/nl80211.c | 7 +++++++ 1 file changed, 7 insertions(+)