From 348baf0eac3391c62d441ec29b4c5da62ed91e74 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 24 Jan 2014 14:06:29 +0100 Subject: nl80211: send event when AP operation is stopped There are a few cases, e.g. suspend, where an AP interface is stopped by the kernel rather than by userspace request, most commonly when suspending. To let userspace know about this, send the NL80211_CMD_STOP_AP command as an event every time an AP interface is stopped. This also happens when userspace did in fact request the AP stop, but that's not a problem. For full-MAC drivers this may need to be extended to also cover cases where the device stopped the AP operation for some reason, this a bit more complicated because then all cfg80211 state also needs to be reset; such API is not part of this patch. Signed-off-by: Johannes Berg --- net/wireless/ap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'net/wireless/ap.c') diff --git a/net/wireless/ap.c b/net/wireless/ap.c index 11ee4ed04f73..4760d6554e62 100644 --- a/net/wireless/ap.c +++ b/net/wireless/ap.c @@ -30,6 +30,7 @@ static int __cfg80211_stop_ap(struct cfg80211_registered_device *rdev, wdev->channel = NULL; wdev->ssid_len = 0; rdev_set_qos_map(rdev, dev, NULL); + nl80211_send_ap_stopped(wdev); } return err; -- cgit v1.2.3