Commit 8c0500c
committed
wifi: mac80211: fix reporting of all valid links in sta_set_sinfo()
JIRA: https://issues.redhat.com/browse/RHEL-114889
commit eebccbf
Author: Sarika Sharma <quic_sarishar@quicinc.com>
Date: Thu Sep 4 16:10:54 2025 +0530
wifi: mac80211: fix reporting of all valid links in sta_set_sinfo()
Currently, sta_set_sinfo() fails to populate link-level station info
when sinfo->valid_links is initially 0 and sta->sta.valid_links has
bits set for links other than link 0. This typically occurs when
association happens on a non-zero link or link 0 deleted dynamically.
In such cases, the for_each_valid_link(sinfo, link_id) loop only
executes for link 0 and terminates early, since sinfo->valid_links
remains 0. As a result, only MLD-level information is reported to
userspace.
Hence to fix, initialize sinfo->valid_links with sta->sta.valid_links
before entering the loop to ensure loop executes for each valid link.
During iteration, mask out invalid links from sinfo->valid_links if
any of sta->link[link_id], sdata->link[link_id], or sinfo->links[link_id]
are not present, to report only valid link information.
Fixes: 505991f ("wifi: mac80211: extend support to fill link level sinfo structure")
Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com>
Link: https://patch.msgid.link/20250904104054.790321-1-quic_sarishar@quicinc.com
[clarify comment]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>1 parent fd56bac commit 8c0500c
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3206 | 3206 | | |
3207 | 3207 | | |
3208 | 3208 | | |
| 3209 | + | |
| 3210 | + | |
| 3211 | + | |
| 3212 | + | |
3209 | 3213 | | |
3210 | 3214 | | |
3211 | 3215 | | |
3212 | 3216 | | |
3213 | 3217 | | |
3214 | 3218 | | |
3215 | | - | |
| 3219 | + | |
| 3220 | + | |
3216 | 3221 | | |
3217 | | - | |
3218 | | - | |
| 3222 | + | |
3219 | 3223 | | |
3220 | 3224 | | |
3221 | 3225 | | |
| |||
0 commit comments