[PATCH v3 2/4] scan: Add a configuration option to disable 6GHz collocated scanning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This configuration option can be used to disable 6GHz collocated scan
logic which would result with passively scanning 6GHz non PSC channels.

Signed-off-by: Ilan Peer <ilan.peer@xxxxxxxxx>
---
 wpa_supplicant/config.c         | 1 +
 wpa_supplicant/config.h         | 9 +++++++++
 wpa_supplicant/config_file.c    | 2 ++
 wpa_supplicant/p2p_supplicant.c | 1 +
 wpa_supplicant/scan.c           | 7 +++++++
 5 files changed, 20 insertions(+)

diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 58ed8bc0ae..5b9c9ed7df 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -5265,6 +5265,7 @@ static const struct global_parse_data global_fields[] = {
 	{ INT_RANGE(pasn_corrupt_mic, 0, 1), 0 },
 #endif /* CONFIG_TESTING_OPTIONS */
 #endif /* CONFIG_PASN */
+	{ INT(non_coloc_6ghz), 0 },
 };
 
 #undef FUNC
diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h
index d22ef05fb8..721e214953 100644
--- a/wpa_supplicant/config.h
+++ b/wpa_supplicant/config.h
@@ -1699,6 +1699,15 @@ struct wpa_config {
 
 #endif /* CONFIG_TESTING_OPTIONS */
 #endif /* CONFIG_PASN*/
+
+	/**
+	 * non_coloc_6ghz - Whether to follow 6GHz collocated scan logic or not
+	 *
+	 * This parameter can be used to disable collocated 6GHz scan logic,
+	 * resulting with passively scanning non PSC channels. By default, 6GHz
+	 * collocated scan logic is enabled.
+	 */
+	int non_coloc_6ghz;
 };
 
 
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 2dd586391e..9641656b14 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -1559,6 +1559,8 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
 	if (config->wowlan_disconnect_on_deinit)
 		fprintf(f, "wowlan_disconnect_on_deinit=%d\n",
 			config->wowlan_disconnect_on_deinit);
+	if (config->non_coloc_6ghz)
+		fprintf(f, "non_coloc_6ghz=%d\n", config->non_coloc_6ghz);
 }
 
 #endif /* CONFIG_NO_CONFIG_WRITE */
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index a996b436b4..80ef2a9e4d 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -2188,6 +2188,7 @@ do {                                    \
 	d->go_venue_group = s->go_venue_group;
 	d->go_venue_type = s->go_venue_type;
 	d->p2p_add_cli_chan = s->p2p_add_cli_chan;
+	d->non_coloc_6ghz = s->non_coloc_6ghz;
 }
 
 
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 31b694713b..d7c73883e9 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -1328,6 +1328,13 @@ ssid_list_set:
 		}
 	}
 
+	if (!params.non_coloc_6ghz && wpa_s->conf->non_coloc_6ghz) {
+		wpa_dbg(wpa_s, MSG_DEBUG,
+			"Collocated 6GHz logic is disabled in configuration");
+
+		params.non_coloc_6ghz = 1;
+	}
+
 	scan_params = &params;
 
 scan:
-- 
2.25.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux