aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-11-05 14:55:30 (GMT)
committerJouni Malinen <j@w1.fi>2012-11-05 14:58:00 (GMT)
commit07783eaaa05c07e2c0071780ed3ebf7d0abfe4b5 (patch)
tree6b4f155be72427fbd8622d132ed04964a27fb9c1 /wpa_supplicant/events.c
parent42d235477f2345003b76e4de1f397e21c2fa5b76 (diff)
downloadhostap-07783eaaa05c07e2c0071780ed3ebf7d0abfe4b5.zip
hostap-07783eaaa05c07e2c0071780ed3ebf7d0abfe4b5.tar.gz
hostap-07783eaaa05c07e2c0071780ed3ebf7d0abfe4b5.tar.bz2
Use deauthentication instead of disassociation if not associated
cfg80211/mac80211 may reject disassociation command if association has not yet been formed. Use deauthentication in cases where it is possible that we are associating at the moment the command is issued. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 1aa9c21..42c4dea 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1609,7 +1609,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
if (wpa_drv_get_bssid(wpa_s, bssid) < 0) {
wpa_dbg(wpa_s, MSG_ERROR, "Failed to get BSSID");
- wpa_supplicant_disassociate(
+ wpa_supplicant_deauthenticate(
wpa_s, WLAN_REASON_DEAUTH_LEAVING);
return;
}
@@ -1627,7 +1627,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
wpa_clear_keys(wpa_s, bssid);
}
if (wpa_supplicant_select_config(wpa_s) < 0) {
- wpa_supplicant_disassociate(
+ wpa_supplicant_deauthenticate(
wpa_s, WLAN_REASON_DEAUTH_LEAVING);
return;
}