|
@@ -11677,6 +11677,35 @@ void cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp)
|
|
|
}
|
|
|
EXPORT_SYMBOL(cfg80211_crit_proto_stopped);
|
|
|
|
|
|
+void nl80211_send_ap_stopped(struct wireless_dev *wdev)
|
|
|
+{
|
|
|
+ struct wiphy *wiphy = wdev->wiphy;
|
|
|
+ struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
|
|
|
+ struct sk_buff *msg;
|
|
|
+ void *hdr;
|
|
|
+
|
|
|
+ msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
|
|
|
+ if (!msg)
|
|
|
+ return;
|
|
|
+
|
|
|
+ hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_STOP_AP);
|
|
|
+ if (!hdr)
|
|
|
+ goto out;
|
|
|
+
|
|
|
+ if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
|
|
|
+ nla_put_u32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex) ||
|
|
|
+ nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)))
|
|
|
+ goto out;
|
|
|
+
|
|
|
+ genlmsg_end(msg, hdr);
|
|
|
+
|
|
|
+ genlmsg_multicast_netns(&nl80211_fam, wiphy_net(wiphy), msg, 0,
|
|
|
+ NL80211_MCGRP_MLME, GFP_KERNEL);
|
|
|
+ return;
|
|
|
+ out:
|
|
|
+ nlmsg_free(msg);
|
|
|
+}
|
|
|
+
|
|
|
/* initialisation/exit functions */
|
|
|
|
|
|
int nl80211_init(void)
|