From 7239ea7f0188474a88dedbf78177232fcf727977 Mon Sep 17 00:00:00 2001 From: Sameer Thalappil Date: Tue, 6 Aug 2013 23:28:40 +0300 Subject: [PATCH] nl80211: Add stop AP mode event API Stop AP command can be used by the driver as an event to indicate that AP mode has stopped operation. WLAN driver may have encountered errors that has forced the driver to report this event or concurrent operations on virtual interfaces may have forced AP operation to be stopped. When in P2P GO mode, wpa_supplicant uses this event to remove P2P group to keep in sync with the driver state. Signed-hostap: Jouni Malinen --- src/drivers/driver_nl80211.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index e674d9d9e..2f30cda99 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -2440,6 +2440,13 @@ static void nl80211_tdls_oper_event(struct wpa_driver_nl80211_data *drv, } +static void nl80211_stop_ap(struct wpa_driver_nl80211_data *drv, + struct nlattr **tb) +{ + wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_UNAVAILABLE, NULL); +} + + static void nl80211_connect_failed_event(struct wpa_driver_nl80211_data *drv, struct nlattr **tb) { @@ -2664,6 +2671,9 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd, case NL80211_CMD_RADAR_DETECT: nl80211_radar_event(drv, tb); break; + case NL80211_CMD_STOP_AP: + nl80211_stop_ap(drv, tb); + break; default: wpa_dbg(drv->ctx, MSG_DEBUG, "nl80211: Ignored unknown event " "(cmd=%d)", cmd);