]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Add stop AP mode event API
authorSameer Thalappil <sameert@qca.qualcomm.com>
Tue, 6 Aug 2013 20:28:40 +0000 (23:28 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 6 Aug 2013 20:28:40 +0000 (23:28 +0300)
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 <jouni@qca.qualcomm.com>

src/drivers/driver_nl80211.c

index e674d9d9ed9cc7a6b82c607167c6e75711d15adf..2f30cda99dd9159c3e80b944f89c432ce9e0ff0e 100644 (file)
@@ -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);