UPSTREAM: 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>

Bug: 238103864
Change-Id: I1d66e4f10e2e4ac9829bcd1f3349aada78a99a4b
(cherry picked from commit dd374f84baecd76cbd12fc543c763ff78338d4ad)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
This commit is contained in:
Johannes Berg 2022-06-13 16:52:02 +02:00 committed by Treehugger Robot
parent 3a516bbc6a
commit e2034a4fab
1 changed files with 4 additions and 2 deletions

View File

@ -9956,8 +9956,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;