diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2012-06-26 18:55:41 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-06-26 18:55:41 +0300 |
commit | 7c865c68536825d91e64e1545a1f6ed51526ebff (patch) | |
tree | 351542f8291633891dfb2796720c666d7e49eafe /wpa_supplicant/events.c | |
parent | b0786fba7100711835674d0d2be22b57abb99ece (diff) | |
download | external_wpa_supplicant_8_ti-7c865c68536825d91e64e1545a1f6ed51526ebff.zip external_wpa_supplicant_8_ti-7c865c68536825d91e64e1545a1f6ed51526ebff.tar.gz external_wpa_supplicant_8_ti-7c865c68536825d91e64e1545a1f6ed51526ebff.tar.bz2 |
Add automatic scanning support
Like bgscan, autoscan is an optional module based feature to automate
scanning but while disconnected or inactive.
Instead of requesting directly a scan, it only sets the scan_interval
and the sched_scan_interval. So, if the driver supports sched_scan,
autoscan will be able to tweak its interval. Otherwise, the tweaked
scan_interval will be used. If scan parameters needs to be tweaked, an
autoscan_params pointer in wpa_s will provide those. So req_scan /
req_sched_scan will not set the scan parameters as they usually do, but
instead will use this pointer.
Modules will not have to request a scan directly, like bgscan does.
Instead, it will need to return the interval it wants after each
notification.
Signed-hostap: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r-- | wpa_supplicant/events.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 19c8280..513a8e8 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -35,6 +35,7 @@ #include "gas_query.h" #include "p2p_supplicant.h" #include "bgscan.h" +#include "autoscan.h" #include "ap.h" #include "bss.h" #include "scan.h" @@ -1095,6 +1096,11 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s, return 0; } + if (autoscan_notify_scan(wpa_s, scan_res)) { + wpa_scan_results_free(scan_res); + return 0; + } + if (wpa_s->disconnected) { wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED); wpa_scan_results_free(scan_res); |