From e5ad96b745c66620c70ff94be645a72fab6ea9c8 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 26 Nov 2010 17:37:22 +0200 Subject: [PATCH] SME: Optimize recovery from assocication command failures mac80211 can indicate this mainly because of channel selection conflicts with other vifs. If there is another BSS on another channel, we should try to connect to it instead. --- wpa_supplicant/sme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 02b76395b..7312c656e 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -396,7 +396,8 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode, if (wpa_drv_associate(wpa_s, ¶ms) < 0) { wpa_msg(wpa_s, MSG_INFO, "Association request to the driver " "failed"); - wpa_supplicant_req_scan(wpa_s, 5, 0); + wpas_connection_failed(wpa_s, wpa_s->pending_bssid); + os_memset(wpa_s->pending_bssid, 0, ETH_ALEN); return; }