aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorDavid Spinadel <david.spinadel@intel.com>2014-03-03 12:53:17 (GMT)
committerJouni Malinen <j@w1.fi>2014-03-04 20:26:19 (GMT)
commit268043d55f4c3391481c2606ebee1ffe8963622d (patch)
tree0a180648bdeb3274dc620a78ecfd830c6b588dc7 /wpa_supplicant
parentadef89480d7fa3c5d18f4d680f665e3d42de9886 (diff)
downloadhostap-268043d55f4c3391481c2606ebee1ffe8963622d.zip
hostap-268043d55f4c3391481c2606ebee1ffe8963622d.tar.gz
hostap-268043d55f4c3391481c2606ebee1ffe8963622d.tar.bz2
bgscan: Do not initialize bgscan if disabled by user
Do not initialize bgscan if the user explicitly set bgscan to an empty string. Without this patch wpa_supplicant tries to initialize bgscan to the first option if the string is empty. Signed-off-by: David Spinadel <david.spinadel@intel.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_supplicant.c2
-rw-r--r--wpa_supplicant/wpa_supplicant.conf2
2 files changed, 3 insertions, 1 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index ad1a03e..0829d09 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 || name[0] == '\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