Commit cba7217a authored by Alvin Šipraga's avatar Alvin Šipraga Committed by Johannes Berg

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: default avatarAlvin Šipraga <alsi@bang-olufsen.dk>
Link: https://lore.kernel.org/r/20230128125844.2407135-2-alvin@pqrs.dkSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 77669c15
...@@ -39,7 +39,7 @@ static int ___cfg80211_stop_ap(struct cfg80211_registered_device *rdev, ...@@ -39,7 +39,7 @@ static int ___cfg80211_stop_ap(struct cfg80211_registered_device *rdev,
wdev->u.ap.ssid_len = 0; wdev->u.ap.ssid_len = 0;
rdev_set_qos_map(rdev, dev, NULL); rdev_set_qos_map(rdev, dev, NULL);
if (notify) if (notify)
nl80211_send_ap_stopped(wdev); nl80211_send_ap_stopped(wdev, link_id);
/* Should we apply the grace period during beaconing interface /* Should we apply the grace period during beaconing interface
* shutdown also? * shutdown also?
......
...@@ -19717,7 +19717,7 @@ void cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp) ...@@ -19717,7 +19717,7 @@ void cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp)
} }
EXPORT_SYMBOL(cfg80211_crit_proto_stopped); EXPORT_SYMBOL(cfg80211_crit_proto_stopped);
void nl80211_send_ap_stopped(struct wireless_dev *wdev) void nl80211_send_ap_stopped(struct wireless_dev *wdev, unsigned int link_id)
{ {
struct wiphy *wiphy = wdev->wiphy; struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
...@@ -19735,7 +19735,9 @@ void nl80211_send_ap_stopped(struct wireless_dev *wdev) ...@@ -19735,7 +19735,9 @@ void nl80211_send_ap_stopped(struct wireless_dev *wdev)
if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
nla_put_u32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex) || nla_put_u32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex) ||
nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
NL80211_ATTR_PAD)) NL80211_ATTR_PAD) ||
(wdev->valid_links &&
nla_put_u8(msg, NL80211_ATTR_MLO_LINK_ID, link_id)))
goto out; goto out;
genlmsg_end(msg, hdr); genlmsg_end(msg, hdr);
......
...@@ -114,7 +114,7 @@ nl80211_radar_notify(struct cfg80211_registered_device *rdev, ...@@ -114,7 +114,7 @@ nl80211_radar_notify(struct cfg80211_registered_device *rdev,
enum nl80211_radar_event event, enum nl80211_radar_event event,
struct net_device *netdev, gfp_t gfp); struct net_device *netdev, gfp_t gfp);
void nl80211_send_ap_stopped(struct wireless_dev *wdev); void nl80211_send_ap_stopped(struct wireless_dev *wdev, unsigned int link_id);
void cfg80211_rdev_free_coalesce(struct cfg80211_registered_device *rdev); void cfg80211_rdev_free_coalesce(struct cfg80211_registered_device *rdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment