aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-09-02 17:18:48 (GMT)
committerJouni Malinen <j@w1.fi>2012-09-02 17:18:48 (GMT)
commita594e2a9ab469e2d89f9dbd54b8aaf0f47dc66dc (patch)
tree5e94cc7b43c5c9fe4efe0e35a7b7c5825d1711b1 /wpa_supplicant/events.c
parent620c783753bddd37988269314862dc7e4a62f700 (diff)
downloadhostap-a594e2a9ab469e2d89f9dbd54b8aaf0f47dc66dc.zip
hostap-a594e2a9ab469e2d89f9dbd54b8aaf0f47dc66dc.tar.gz
hostap-a594e2a9ab469e2d89f9dbd54b8aaf0f47dc66dc.tar.bz2
Interworking: Skip extra scan after network auto-select
If the scan results from before ANQP fetch are fresh (less than five seconds old), do not run a new scan when selecting the BSS after having used Interworking network selection. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index ee0ebe2..6dd5787 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1035,8 +1035,6 @@ static int wpa_supplicant_need_to_roam(struct wpa_supplicant *wpa_s,
static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
union wpa_event_data *data)
{
- struct wpa_bss *selected;
- struct wpa_ssid *ssid = NULL;
struct wpa_scan_results *scan_res;
int ap = 0;
#ifndef CONFIG_NO_RANDOM_POOL
@@ -1150,6 +1148,15 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
wpa_scan_results_free(scan_res);
+ return wpas_select_network_from_last_scan(wpa_s);
+}
+
+
+int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s)
+{
+ struct wpa_bss *selected;
+ struct wpa_ssid *ssid = NULL;
+
selected = wpa_supplicant_pick_network(wpa_s, &ssid);
if (selected) {