From cf4783e35fb4861181c275a3dbd607b58c7d4067 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 11 Apr 2010 19:27:41 +0300 Subject: [PATCH] Deauthenticate instead of disassociate on disconnect command This clears up authentication state in the driver and in case of cfg80211, unlocks the BSS entry for the previously used AP. --- wpa_supplicant/ctrl_iface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index aa2778b7c..9db5f75e8 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -1829,7 +1829,8 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, } else if (os_strcmp(buf, "DISCONNECT") == 0) { wpa_s->reassociate = 0; wpa_s->disconnected = 1; - wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING); + wpa_supplicant_deauthenticate(wpa_s, + WLAN_REASON_DEAUTH_LEAVING); } else if (os_strcmp(buf, "SCAN") == 0) { wpa_s->scan_req = 2; wpa_supplicant_req_scan(wpa_s, 0, 0);