[RFC 3/3] wpa_supplicant: Add configuration parameter for 2040coex

Rajkumar Manoharan rmanohar
Wed Apr 18 06:44:10 PDT 2012


To enable 2040 coexistence report generation for 40MHz intolerance, use
the following option in wpa_supplicant config file.

report_2040coex=1

Signed-off-by: Rajkumar Manoharan <rmanohar at qca.qualcomm.com>
---
 wpa_supplicant/config.c         |    3 ++-
 wpa_supplicant/config.h         |    8 ++++++++
 wpa_supplicant/config_file.c    |    2 ++
 wpa_supplicant/wpa_supplicant.c |    3 +++
 4 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 2a166c7..ff3bf52 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -2871,7 +2871,8 @@ static const struct global_parse_data global_fields[] = {
 	{ INT_RANGE(disassoc_low_ack, 0, 1), 0 },
 	{ INT_RANGE(interworking, 0, 1), 0 },
 	{ FUNC(hessid), 0 },
-	{ INT_RANGE(access_network_type, 0, 15), 0 }
+	{ INT_RANGE(access_network_type, 0, 15), 0 },
+	{ INT(report_2040coex), 0 }
 };
 
 #undef FUNC
diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h
index 968f14b..bee3b21 100644
--- a/wpa_supplicant/config.h
+++ b/wpa_supplicant/config.h
@@ -602,6 +602,14 @@ struct wpa_config {
 	 * Homogeneous ESS. This is used only if interworking is enabled.
 	 */
 	u8 hessid[ETH_ALEN];
+
+	/**
+	 * report_2040coex - Generate 2040 coexistence report
+	 *
+	 * Allow the station to generate 2040 coexistence report if any of
+	 * 40 MHz intolerant AP found in the network.
+	 */
+	int report_2040coex;
 };
 
 
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 671f7d6..ecb41bf 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -842,6 +842,8 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
 		fprintf(f, "access_network_type=%d\n",
 			config->access_network_type);
 #endif /* CONFIG_INTERWORKING */
+	if (config->report_2040coex)
+		fprintf(f, "report_2040coex=%d\n", config->report_2040coex);
 }
 
 #endif /* CONFIG_NO_CONFIG_WRITE */
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 5d4de3c..25827d5 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -3249,6 +3249,9 @@ void wpa_supplicant_proc_40mhz_intolerant(struct wpa_supplicant *wpa_s)
 	u8 chan_list[P2P_MAX_CHANNELS], channel;
 	u8 num_channels = 0, i;
 
+	if (!wpa_s->conf->report_2040coex)
+		return;
+
 	if (!wpa_s->current_bss || wpa_s->wpa_state != WPA_COMPLETED)
 		return;
 
-- 
1.7.10




More information about the Hostap mailing list