aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorTova Mussai <tova.mussai@intel.com>2017-08-21 16:42:19 (GMT)
committerJouni Malinen <j@w1.fi>2018-04-19 21:48:49 (GMT)
commitc4315e66207ba948b87cc641ce982784efc7bb19 (patch)
tree2ecada76d2c84e209de257f27ae87cda94c6537a /wpa_supplicant
parent86c998d37a7d8bd230fadc9c689698868754e08f (diff)
downloadhostap-c4315e66207ba948b87cc641ce982784efc7bb19.zip
hostap-c4315e66207ba948b87cc641ce982784efc7bb19.tar.gz
hostap-c4315e66207ba948b87cc641ce982784efc7bb19.tar.bz2
AP: Handle AP initalization failure in async flow
When AP initialization is completed in a callback (e.g., OBSS scan), wpa_supplicant_deinit_ap() is not called in case of failure. Fix this by calling setup_complete_cb in case of failure, too, which in turn calls wpa_supplicant_deinit_ap() if needed. Signed-off-by: Tova Mussai <tova.mussai@intel.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/ap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index fe7ffe1..9e4fc1c 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -633,6 +633,13 @@ static void wpas_ap_configured_cb(void *ctx)
{
struct wpa_supplicant *wpa_s = ctx;
+ wpa_printf(MSG_DEBUG, "AP interface setup completed - state %s",
+ hostapd_state_text(wpa_s->ap_iface->state));
+ if (wpa_s->ap_iface->state == HAPD_IFACE_DISABLED) {
+ wpa_supplicant_ap_deinit(wpa_s);
+ return;
+ }
+
#ifdef CONFIG_ACS
if (wpa_s->current_ssid && wpa_s->current_ssid->acs) {
wpa_s->assoc_freq = wpa_s->ap_iface->freq;