[PATCH] bgscan: do not initialize bgscan if disabled by user
Ilan Peer
ilan.peer
Mon Mar 3 04:53:17 PST 2014
From: David Spinadel <david.spinadel at intel.com>
Do not initialize bgscan if the user explicitly set bgscan to
an empty string.
Without this patch the supplicant does initialize bgscan to
the first option if the string is empty.
Signed-off-by: David Spinadel <david.spinadel at intel.com>
---
wpa_supplicant/wpa_supplicant.c | 2 +-
wpa_supplicant/wpa_supplicant.conf | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 64e3036..8d2f68d 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -573,7 +573,7 @@ static void wpa_supplicant_start_bgscan(struct wpa_supplicant *wpa_s)
name = wpa_s->current_ssid->bgscan;
else
name = wpa_s->conf->bgscan;
- if (name == NULL)
+ if (name == NULL || os_strlen(name) == 0)
return;
if (wpas_driver_bss_selection(wpa_s))
return;
diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
index 442b44c..03c6f5f 100644
--- a/wpa_supplicant/wpa_supplicant.conf
+++ b/wpa_supplicant/wpa_supplicant.conf
@@ -603,6 +603,8 @@ fast_reauth=1
# bgscan="learn:<short bgscan interval in seconds>:<signal strength threshold>:
# <long interval>[:<database file name>]"
# bgscan="learn:30:-45:300:/etc/wpa_supplicant/network1.bgscan"
+# Explicitly disable bgscan by setting
+# bgscan=""
#
# This option can also be set outside of all network blocks for the bgscan
# parameter to apply for all the networks that have no specific bgscan
--
1.7.10.4
More information about the Hostap
mailing list