From: Samuel Ortiz Date: Wed, 18 Aug 2010 18:23:26 +0000 (+0300) Subject: sme: Check for prev_bssid from sme_event_disassoc X-Git-Tag: hostap-1-bp~1230 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e26053a2cffe400275dc57faf8681eea236809c;p=thirdparty%2Fhostap.git sme: Check for prev_bssid from sme_event_disassoc wpa_s->bssid is already cleared by mark_disassoc() when we're getting the disassociation event for the case where wpa_supplicant requested disassociation. wpa_s->sme.prev_bssid holds the BSSID we need to check for, so use that instead. Signed-off-by: Samuel Ortiz --- diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 7cf3cc139..5604e97cb 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -474,7 +474,7 @@ void sme_event_disassoc(struct wpa_supplicant *wpa_s, union wpa_event_data *data) { wpa_printf(MSG_DEBUG, "SME: Disassociation event received"); - if (!is_zero_ether_addr(wpa_s->bssid) && + if (wpa_s->sme.prev_bssid_set && !(wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)) { /* * cfg80211/mac80211 can get into somewhat confused state if @@ -484,7 +484,7 @@ void sme_event_disassoc(struct wpa_supplicant *wpa_s, */ wpa_printf(MSG_DEBUG, "SME: Deauthenticate to clear driver " "state"); - wpa_drv_deauthenticate(wpa_s, wpa_s->bssid, + wpa_drv_deauthenticate(wpa_s, wpa_s->sme.prev_bssid, WLAN_REASON_DEAUTH_LEAVING); } }