summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-06-13 16:52:02 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-06-20 12:57:08 +0200
commitdd374f84baecd76cbd12fc543c763ff78338d4ad (patch)
tree0fb3e7ef0225abec8d62183118b9add72ee84fee /net
parentce08cd344a0027076b2f46b9e8988d08f6641252 (diff)
wifi: nl80211: expose link ID for associated BSSes
When retrieving scan data, expose not just whether or not the interface (possibly an MLD) is associated to the BSS or not, but also on which link ID if it is an MLD. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/nl80211.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 64934dd923ce..aca799b9971e 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -9959,8 +9959,10 @@ static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb,
case NL80211_IFTYPE_STATION:
for_each_valid_link(wdev, link_id) {
if (intbss == wdev->links[link_id].client.current_bss &&
- nla_put_u32(msg, NL80211_BSS_STATUS,
- NL80211_BSS_STATUS_ASSOCIATED))
+ (nla_put_u32(msg, NL80211_BSS_STATUS,
+ NL80211_BSS_STATUS_ASSOCIATED) ||
+ (wdev->valid_links &&
+ nla_put_u8(msg, NL80211_ATTR_MLO_LINK_ID, link_id))))
goto nla_put_failure;
}
break;