aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/autoscan.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-06-26 16:52:46 (GMT)
committerJouni Malinen <j@w1.fi>2012-06-26 16:52:46 (GMT)
commit992189991ca99e89208a1bad4cb4305e115dd66f (patch)
tree3f80d58ceb305bfdb6cbfdc34c2697bf92c895bc /wpa_supplicant/autoscan.c
parent460b36d0c0c30c42ed5337378959a88e9a108213 (diff)
downloadhostap-992189991ca99e89208a1bad4cb4305e115dd66f.zip
hostap-992189991ca99e89208a1bad4cb4305e115dd66f.tar.gz
hostap-992189991ca99e89208a1bad4cb4305e115dd66f.tar.bz2
Start autoscan for first connection attempt
Use wpa_supplicant_set_state() to initialize state to DISCONNECT so that autoscan gets initialized properly. This needs a change in autoscan_init() to avoid extra scan request that would postpone the first scan request when an interface is added. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/autoscan.c')
-rw-r--r--wpa_supplicant/autoscan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wpa_supplicant/autoscan.c b/wpa_supplicant/autoscan.c
index bac8df6..d0c040a 100644
--- a/wpa_supplicant/autoscan.c
+++ b/wpa_supplicant/autoscan.c
@@ -43,7 +43,7 @@ static void request_scan(struct wpa_supplicant *wpa_s)
}
-int autoscan_init(struct wpa_supplicant *wpa_s)
+int autoscan_init(struct wpa_supplicant *wpa_s, int req_scan)
{
const char *name = wpa_s->conf->autoscan;
const char *params;
@@ -88,6 +88,8 @@ int autoscan_init(struct wpa_supplicant *wpa_s)
wpa_printf(MSG_DEBUG, "autoscan: Initialized module '%s' with "
"parameters '%s'", ops->name, params);
+ if (!req_scan)
+ return 0;
/*
* Cancelling existing scan requests, if any.