wpa_supplicant AP: Disable AP mode on disassoc paths

Regardless of how the AP mode is disabled, wpa_supplicant_ap_deinit()
must be called. Make sure this happens on all paths by calling the
deinit function from wpa_supplicant_mark_disassoc().
This commit is contained in:
Jouni Malinen 2011-07-05 16:38:30 +03:00
parent 4f525d8e5b
commit ca62e114aa
2 changed files with 5 additions and 0 deletions

View file

@ -475,6 +475,7 @@ void wpa_supplicant_ap_deinit(struct wpa_supplicant *wpa_s)
wpa_s->current_ssid = NULL;
wpa_s->assoc_freq = 0;
wpa_s->reassociated_connection = 0;
#ifdef CONFIG_P2P
if (wpa_s->ap_iface->bss)
wpa_s->ap_iface->bss[0]->p2p_group = NULL;

View file

@ -118,6 +118,10 @@ void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s)
wpa_s->ibss_rsn = NULL;
#endif /* CONFIG_IBSS_RSN */
#ifdef CONFIG_AP
wpa_supplicant_ap_deinit(wpa_s);
#endif /* CONFIG_AP */
if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED)
return;