From b0786fba7100711835674d0d2be22b57abb99ece Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Tue, 26 Jun 2012 18:09:57 +0300 Subject: [PATCH] Add autoscan parameters support in config file Signed-hostap: Tomasz Bursztyka --- wpa_supplicant/config.c | 4 +++- wpa_supplicant/config.h | 9 +++++++++ wpa_supplicant/wpa_supplicant.conf | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index d3967cec3..80f87f474 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -1859,6 +1859,7 @@ void wpa_config_free(struct wpa_config *config) os_free(config->p2p_ssid_postfix); os_free(config->pssid); os_free(config->p2p_pref_chan); + os_free(config->autoscan); os_free(config); } @@ -2882,7 +2883,8 @@ static const struct global_parse_data global_fields[] = { { INT_RANGE(interworking, 0, 1), 0 }, { FUNC(hessid), 0 }, { INT_RANGE(access_network_type, 0, 15), 0 }, - { INT_RANGE(pbc_in_m1, 0, 1), 0 } + { INT_RANGE(pbc_in_m1, 0, 1), 0 }, + { STR(autoscan), 0 } }; #undef FUNC diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h index 3e4f22942..fd6aeb381 100644 --- a/wpa_supplicant/config.h +++ b/wpa_supplicant/config.h @@ -632,6 +632,15 @@ struct wpa_config { * a label in the AP). */ int pbc_in_m1; + + /** + * autoscan - Automatic scan parameters or %NULL if none + * + * This is an optional set of parameters for automatic scanning + * within an interface in following format: + * : + */ + char *autoscan; }; diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf index 1ac91c987..52e658108 100644 --- a/wpa_supplicant/wpa_supplicant.conf +++ b/wpa_supplicant/wpa_supplicant.conf @@ -225,6 +225,11 @@ fast_reauth=1 # of APs when using ap_scan=1 mode. #bss_max_count=200 +# Automatic scan +# This is an optional set of parameters for automatic scanning +# within an interface in following format: +#autoscan=: +# autoscan is like bgscan but on disconnected or inactive state. # filter_ssids - SSID-based scan result filtering # 0 = do not filter scan results (default)