Patchwork [1/7] Adding autoscan parameters support in config file

login
register
mail settings
Submitter Tomasz Bursztyka
Date June 26, 2012, 8:05 a.m.
Message ID <1340697952-4209-2-git-send-email-tomasz.bursztyka@linux.intel.com>
Download mbox | patch
Permalink /patch/167328/
State Accepted
Commit b0786fba7100711835674d0d2be22b57abb99ece
Headers show

Comments

Tomasz Bursztyka - June 26, 2012, 8:05 a.m.
Signed-hostap: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
---
 wpa_supplicant/config.c            |    4 +++-
 wpa_supplicant/config.h            |    9 +++++++++
 wpa_supplicant/wpa_supplicant.conf |    5 +++++
 3 files changed, 17 insertions(+), 1 deletions(-)

Patch

diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index d3967ce..80f87f4 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 3e4f229..fd6aeb3 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:
+	 * <autoscan module name>:<module parameters>
+	 */
+	char *autoscan;
 };
 
 
diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
index 1ac91c9..52e6581 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 module name>:<module parameters>
+# autoscan is like bgscan but on disconnected or inactive state.
 
 # filter_ssids - SSID-based scan result filtering
 # 0 = do not filter scan results (default)