]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Indicate AP-DISABLED on main AP mode deinit path
authorJouni Malinen <j@w1.fi>
Sat, 14 Mar 2015 08:12:33 +0000 (10:12 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 14 Mar 2015 08:14:22 +0000 (10:14 +0200)
This event was previously used only when disabling AP mode operation
through hostapd control interface. Make this more consistent by
providing same indication when disabling hostapd interface through the
interface deinit path. This adds the event to the case where a full
hostapd radio instance is removed which also applies for the
wpa_supplicant AP mode operations.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/hostapd.c

index f6019ac20f0c759fc5de92476c1f7f23eaf81269..3e4e16b4f396a4ca0d04e9e12f79d7c696d03684 100644 (file)
@@ -1619,6 +1619,7 @@ static void hostapd_bss_deinit(struct hostapd_data *hapd)
        wpa_printf(MSG_DEBUG, "%s: deinit bss %s", __func__,
                   hapd->conf->iface);
        hostapd_bss_deinit_no_free(hapd);
+       wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
        hostapd_cleanup(hapd);
 }
 
@@ -1631,6 +1632,8 @@ void hostapd_interface_deinit(struct hostapd_iface *iface)
        if (iface == NULL)
                return;
 
+       hostapd_set_state(iface, HAPD_IFACE_DISABLED);
+
 #ifdef CONFIG_IEEE80211N
 #ifdef NEED_AP_MLME
        hostapd_stop_setup_timers(iface);