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); } }