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.
This commit is contained in:
Jouni Malinen 2010-11-26 17:37:22 +02:00 committed by Jouni Malinen
parent c55f774d00
commit e5ad96b745

View file

@ -396,7 +396,8 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
if (wpa_drv_associate(wpa_s, &params) < 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;
}