[PATCH] sme: Check for prev_bssid from sme_event_disassoc

Samuel Ortiz sameo
Wed Aug 11 09:37:52 PDT 2010


wpa_s->bssid is already cleared by mark_disassoc() when we're getting the
disassociation event. wpa_s->sme.prev_bssid holds the BSSID we need to check
for.

Signed-off-by: Samuel Ortiz <sameo at linux.intel.com>
---
 wpa_supplicant/sme.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index b5927c5..44e2c5a 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -448,7 +448,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 (!is_zero_ether_addr(wpa_s->sme.prev_bssid) &&
 	    !(wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)) {
 		/*
 		 * cfg80211/mac80211 can get into somewhat confused state if
@@ -458,7 +458,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);
 	}
 }
-- 
1.7.1

-- 
Intel Open Source Technology Centre
http://oss.intel.com/



More information about the Hostap mailing list