[PATCH] Deinit AP while disassociating if in AP mode

Witold Sowa witold.sowa at gmail.com
Thu Aug 6 12:16:37 EDT 2009


Added wpa_supplicant_ap_deinit call in wpa_supplicant_disassociate
function what shoud turn off AP mode when disabling network.
---
 wpa_supplicant/wpa_supplicant.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index d03e9da..7e1cdeb 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1279,6 +1279,11 @@ void wpa_supplicant_disassociate(struct wpa_supplicant *wpa_s,
 			wpa_drv_disassociate(wpa_s, wpa_s->bssid, reason_code);
 		addr = wpa_s->bssid;
 	}
+
+#ifdef CONFIG_AP
+	wpa_supplicant_ap_deinit(wpa_s);
+#endif /* CONFIG_AP */
+
 	wpa_clear_keys(wpa_s, addr);
 	wpa_supplicant_mark_disassoc(wpa_s);
 	wpa_s->current_ssid = NULL;
@@ -2026,7 +2031,7 @@ struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
 		os_free(wpa_s);
 		return NULL;
 	}
-		
+
 	wpa_s->next = global->ifaces;
 	global->ifaces = wpa_s;
 
-- 
1.6.0.2


More information about the HostAP mailing list