Skip to content

Commit 6522047

Browse files
committed
wifi: nl80211: add MLD address to assoc BSS entries
Add an MLD address attribute to BSS entries that the interface is currently associated with to help userspace figure out what's going on. Signed-off-by: Johannes Berg <[email protected]>
1 parent 7e415d0 commit 6522047

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

include/uapi/linux/nl80211.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4959,6 +4959,7 @@ enum nl80211_bss_scan_width {
49594959
* using the nesting index as the antenna number.
49604960
* @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz
49614961
* @NL80211_BSS_MLO_LINK_ID: MLO link ID of the BSS (u8).
4962+
* @NL80211_BSS_MLD_ADDR: MLD address of this BSS if connected to it.
49624963
* @__NL80211_BSS_AFTER_LAST: internal
49634964
* @NL80211_BSS_MAX: highest BSS attribute
49644965
*/
@@ -4985,6 +4986,7 @@ enum nl80211_bss {
49854986
NL80211_BSS_CHAIN_SIGNAL,
49864987
NL80211_BSS_FREQUENCY_OFFSET,
49874988
NL80211_BSS_MLO_LINK_ID,
4989+
NL80211_BSS_MLD_ADDR,
49884990

49894991
/* keep last */
49904992
__NL80211_BSS_AFTER_LAST,

net/wireless/nl80211.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10182,8 +10182,10 @@ static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb,
1018210182
(nla_put_u32(msg, NL80211_BSS_STATUS,
1018310183
NL80211_BSS_STATUS_ASSOCIATED) ||
1018410184
(wdev->valid_links &&
10185-
nla_put_u8(msg, NL80211_BSS_MLO_LINK_ID,
10186-
link_id))))
10185+
(nla_put_u8(msg, NL80211_BSS_MLO_LINK_ID,
10186+
link_id) ||
10187+
nla_put(msg, NL80211_BSS_MLD_ADDR, ETH_ALEN,
10188+
wdev->u.client.connected_addr)))))
1018710189
goto nla_put_failure;
1018810190
}
1018910191
break;

0 commit comments

Comments
 (0)