Skip to content

Commit

Permalink
wifi: nl80211: add MLD address to assoc BSS entries
Browse files Browse the repository at this point in the history
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 <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Sep 3, 2022
1 parent 7e415d0 commit 6522047
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/uapi/linux/nl80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -4959,6 +4959,7 @@ enum nl80211_bss_scan_width {
* using the nesting index as the antenna number.
* @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz
* @NL80211_BSS_MLO_LINK_ID: MLO link ID of the BSS (u8).
* @NL80211_BSS_MLD_ADDR: MLD address of this BSS if connected to it.
* @__NL80211_BSS_AFTER_LAST: internal
* @NL80211_BSS_MAX: highest BSS attribute
*/
Expand All @@ -4985,6 +4986,7 @@ enum nl80211_bss {
NL80211_BSS_CHAIN_SIGNAL,
NL80211_BSS_FREQUENCY_OFFSET,
NL80211_BSS_MLO_LINK_ID,
NL80211_BSS_MLD_ADDR,

/* keep last */
__NL80211_BSS_AFTER_LAST,
Expand Down
6 changes: 4 additions & 2 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -10182,8 +10182,10 @@ static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb,
(nla_put_u32(msg, NL80211_BSS_STATUS,
NL80211_BSS_STATUS_ASSOCIATED) ||
(wdev->valid_links &&
nla_put_u8(msg, NL80211_BSS_MLO_LINK_ID,
link_id))))
(nla_put_u8(msg, NL80211_BSS_MLO_LINK_ID,
link_id) ||
nla_put(msg, NL80211_BSS_MLD_ADDR, ETH_ALEN,
wdev->u.client.connected_addr)))))
goto nla_put_failure;
}
break;
Expand Down

0 comments on commit 6522047

Please sign in to comment.