From: Jouni Malinen Date: Sun, 11 Dec 2011 16:30:47 +0000 (+0200) Subject: Disassociate when starting WPS search X-Git-Tag: aosp-jb-start~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9d87c3357bb7042fd4dc6858403fe5464698d01;p=thirdparty%2Fhostap.git Disassociate when starting WPS search Previously, the WPS scans could have been done in associated state if we happened to be associated when the request to use WPS was received. This can slow down scanning and end up in unexpected state if no WPS association is tried. Avoid these issues by disconnecting when WPS search is started. Signed-hostap: Jouni Malinen --- diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c index 89694525b..870aff5b8 100644 --- a/wpa_supplicant/wps_supplicant.c +++ b/wpa_supplicant/wps_supplicant.c @@ -794,6 +794,10 @@ static void wpas_wps_reassoc(struct wpa_supplicant *wpa_s, { struct wpa_ssid *ssid; + if (wpa_s->current_ssid) + wpa_supplicant_deauthenticate( + wpa_s, WLAN_REASON_DEAUTH_LEAVING); + /* Mark all other networks disabled and trigger reassociation */ ssid = wpa_s->conf->ssid; while (ssid) {