From 3727123269a1a380b51733049a8a9e1b63acf121 Mon Sep 17 00:00:00 2001 From: Eliad Peller Date: Thu, 19 Dec 2013 12:03:23 +0200 Subject: [PATCH] bgscan: Stop bgscan only on disassociation Stopping bgscan on any state other than COMPLETED results in bgscan reset (stop + start) on every rekeying operation. Signed-hostap: Eliad Peller --- wpa_supplicant/wpa_supplicant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 6f1137a8f..6390d130c 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -699,7 +699,7 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s, #ifdef CONFIG_BGSCAN if (state == WPA_COMPLETED) wpa_supplicant_start_bgscan(wpa_s); - else + else if (state < WPA_ASSOCIATED) wpa_supplicant_stop_bgscan(wpa_s); #endif /* CONFIG_BGSCAN */