#include "blacklist.h"
#include "wpas_glue.h"
#include "wps_supplicant.h"
+#include "ibss_rsn.h"
static int wpa_supplicant_select_config(struct wpa_supplicant *wpa_s)
}
-static int wpa_supplicant_ssid_bss_match(struct wpa_ssid *ssid,
+static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
+ struct wpa_ssid *ssid,
struct wpa_scan_res *bss)
{
struct wpa_ie_data ie;
const u8 *rsn_ie, *wpa_ie;
int ret;
- ret = wpas_wps_ssid_bss_match(ssid, bss);
+ ret = wpas_wps_ssid_bss_match(wpa_s, ssid, bss);
if (ret >= 0)
return ret;
#ifdef CONFIG_WPS
if (ssid->ssid_len == 0 &&
- wpas_wps_ssid_wildcard_ok(ssid, bss))
+ wpas_wps_ssid_wildcard_ok(wpa_s, ssid, bss))
check_ssid = 0;
#endif /* CONFIG_WPS */
continue;
}
- if (!wpa_supplicant_ssid_bss_match(ssid, bss))
+ if (!wpa_supplicant_ssid_bss_match(wpa_s, ssid, bss))
continue;
wpa_printf(MSG_DEBUG, " selected WPA AP "
* with our mode. */
check_ssid = 1;
if (ssid->ssid_len == 0 &&
- wpas_wps_ssid_wildcard_ok(ssid, bss))
+ wpas_wps_ssid_wildcard_ok(wpa_s, ssid,
+ bss))
check_ssid = 0;
}
#endif /* CONFIG_WPS */
wpas_wps_notify_scan_results(wpa_s);
}
- if (wpa_s->conf->ap_scan == 2 || wpa_s->disconnected)
+ if ((wpa_s->conf->ap_scan == 2 && !wpas_wps_searching(wpa_s)) ||
+ wpa_s->disconnected)
return;
while (selected == NULL) {
wpa_printf(MSG_DEBUG, "No APs found - clear blacklist "
"and try again");
wpa_blacklist_clear(wpa_s);
+ wpa_s->blacklist_cleared++;
} else if (selected == NULL) {
break;
}
#endif /* CONFIG_IEEE80211R */
+#ifdef CONFIG_IBSS_RSN
+static void wpa_supplicant_event_ibss_rsn_start(struct wpa_supplicant *wpa_s,
+ union wpa_event_data *data)
+{
+ if (data == NULL)
+ return;
+ ibss_rsn_start(wpa_s->ibss_rsn, data->ibss_rsn_start.peer);
+}
+#endif /* CONFIG_IBSS_RSN */
+
+
void wpa_supplicant_event(void *ctx, wpa_event_type event,
union wpa_event_data *data)
{
wpa_supplicant_event_ft_response(wpa_s, data);
break;
#endif /* CONFIG_IEEE80211R */
+#ifdef CONFIG_IBSS_RSN
+ case EVENT_IBSS_RSN_START:
+ wpa_supplicant_event_ibss_rsn_start(wpa_s, data);
+ break;
+#endif /* CONFIG_IBSS_RSN */
default:
wpa_printf(MSG_INFO, "Unknown event %d", event);
break;