Skip to content

Commit cba7217

Browse files
sipragajmberg-intel
authored andcommitted
wifi: nl80211: add MLO_LINK_ID to CMD_STOP_AP event
nl80211_send_ap_stopped() can be called multiple times on the same netdev for each link when using Multi-Link Operation. Add the MLO_LINK_ID attribute to the event to allow userspace to distinguish which link the event is for. Signed-off-by: Alvin Šipraga <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 77669c1 commit cba7217

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

net/wireless/ap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static int ___cfg80211_stop_ap(struct cfg80211_registered_device *rdev,
3939
wdev->u.ap.ssid_len = 0;
4040
rdev_set_qos_map(rdev, dev, NULL);
4141
if (notify)
42-
nl80211_send_ap_stopped(wdev);
42+
nl80211_send_ap_stopped(wdev, link_id);
4343

4444
/* Should we apply the grace period during beaconing interface
4545
* shutdown also?

net/wireless/nl80211.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19717,7 +19717,7 @@ void cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp)
1971719717
}
1971819718
EXPORT_SYMBOL(cfg80211_crit_proto_stopped);
1971919719

19720-
void nl80211_send_ap_stopped(struct wireless_dev *wdev)
19720+
void nl80211_send_ap_stopped(struct wireless_dev *wdev, unsigned int link_id)
1972119721
{
1972219722
struct wiphy *wiphy = wdev->wiphy;
1972319723
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
@@ -19735,7 +19735,9 @@ void nl80211_send_ap_stopped(struct wireless_dev *wdev)
1973519735
if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
1973619736
nla_put_u32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex) ||
1973719737
nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
19738-
NL80211_ATTR_PAD))
19738+
NL80211_ATTR_PAD) ||
19739+
(wdev->valid_links &&
19740+
nla_put_u8(msg, NL80211_ATTR_MLO_LINK_ID, link_id)))
1973919741
goto out;
1974019742

1974119743
genlmsg_end(msg, hdr);

net/wireless/nl80211.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ nl80211_radar_notify(struct cfg80211_registered_device *rdev,
114114
enum nl80211_radar_event event,
115115
struct net_device *netdev, gfp_t gfp);
116116

117-
void nl80211_send_ap_stopped(struct wireless_dev *wdev);
117+
void nl80211_send_ap_stopped(struct wireless_dev *wdev, unsigned int link_id);
118118

119119
void cfg80211_rdev_free_coalesce(struct cfg80211_registered_device *rdev);
120120

0 commit comments

Comments
 (0)