From dad153d16bc66f92609ee90549770c66549c1c3d Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 21 May 2013 19:37:55 +0300 Subject: [PATCH] Try to use fast-associate on ENABLE_NETWORK This makes ENABLE_NETWORK behave similarily to SELECT_NETWORK by allowing a scan to be skipped if recent scan results are available. Signed-hostap: Jouni Malinen --- wpa_supplicant/wpa_supplicant.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 8d967acd3..248bf0ebd 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1803,7 +1803,8 @@ void wpa_supplicant_enable_network(struct wpa_supplicant *wpa_s, wpa_supplicant_cancel_sched_scan(wpa_s); } - wpa_supplicant_req_scan(wpa_s, 0, 0); + if (wpa_supplicant_fast_associate(wpa_s) != 1) + wpa_supplicant_req_scan(wpa_s, 0, 0); } }