diff mbox series

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

Message ID 20220411142201.2770618-2-ilan.peer@intel.com
State Changes Requested
Headers show
Series [v4,1/4] nl80211: set NL80211_SCAN_FLAG_COLOCATED_6GHZ in scan | expand

Commit Message

Ilan Peer April 11, 2022, 2:21 p.m. UTC
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@intel.com>
---
 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 +++++++
 wpa_supplicant/wpa_supplicant.conf | 7 +++++++
 6 files changed, 27 insertions(+)

Comments

Jouni Malinen April 18, 2022, 3:19 p.m. UTC | #1
On Mon, Apr 11, 2022 at 05:21:59PM +0300, Ilan Peer wrote:
> This configuration option can be used to disable 6GHz collocated scan
> logic which would result with passively scanning 6GHz non PSC channels.

Is this really something we should do as a configuration option? Is the
default behavior to scan only the 6 GHz channels that are either PSC or
that have been determined to have a BSS based on neighbor report? And is
that somehow conditional on active vs. passive scanning?

I could understand having a need for a specific SCAN command that will
scan all 6 GHz channels passively, but it would seem more reasonable to
do that with a SCAN control interface command argument instead of a
configuration parameter that applies to all scan operations. Isn't it
way too slow to scan all non-PSC channels on the 6 GHz using a passive
scan for normal use?
Ilan Peer April 20, 2022, 6:40 a.m. UTC | #2
Hi,

> -----Original Message-----
> From: Jouni Malinen <j@w1.fi>
> Sent: Monday, April 18, 2022 18:20
> To: Peer, Ilan <ilan.peer@intel.com>
> Cc: hostap@lists.infradead.org
> Subject: Re: [PATCH v4 2/4] scan: Add a configuration option to disable 6GHz
> collocated scanning
> 
> On Mon, Apr 11, 2022 at 05:21:59PM +0300, Ilan Peer wrote:
> > This configuration option can be used to disable 6GHz collocated scan
> > logic which would result with passively scanning 6GHz non PSC channels.
> 
> Is this really something we should do as a configuration option? Is the default
> behavior to scan only the 6 GHz channels that are either PSC or that have
> been determined to have a BSS based on neighbor report? And is that
> somehow conditional on active vs. passive scanning?
> 
> I could understand having a need for a specific SCAN command that will scan
> all 6 GHz channels passively, but it would seem more reasonable to do that
> with a SCAN control interface command argument instead of a configuration
> parameter that applies to all scan operations. Isn't it way too slow to scan all
> non-PSC channels on the 6 GHz using a passive scan for normal use?
> 

This was requested as testing option by Ben. I agree that extending the scan command to
force passively scanning 6GHz channels makes more sense. I'll prepare such a change.

Regards,

Ilan.
Ben Greear April 20, 2022, 3:52 p.m. UTC | #3
On 4/19/22 11:40 PM, Peer, Ilan wrote:
> Hi,
> 
>> -----Original Message-----
>> From: Jouni Malinen <j@w1.fi>
>> Sent: Monday, April 18, 2022 18:20
>> To: Peer, Ilan <ilan.peer@intel.com>
>> Cc: hostap@lists.infradead.org
>> Subject: Re: [PATCH v4 2/4] scan: Add a configuration option to disable 6GHz
>> collocated scanning
>>
>> On Mon, Apr 11, 2022 at 05:21:59PM +0300, Ilan Peer wrote:
>>> This configuration option can be used to disable 6GHz collocated scan
>>> logic which would result with passively scanning 6GHz non PSC channels.
>>
>> Is this really something we should do as a configuration option? Is the default
>> behavior to scan only the 6 GHz channels that are either PSC or that have
>> been determined to have a BSS based on neighbor report? And is that
>> somehow conditional on active vs. passive scanning?
>>
>> I could understand having a need for a specific SCAN command that will scan
>> all 6 GHz channels passively, but it would seem more reasonable to do that
>> with a SCAN control interface command argument instead of a configuration
>> parameter that applies to all scan operations. Isn't it way too slow to scan all
>> non-PSC channels on the 6 GHz using a passive scan for normal use?
>>
> 
> This was requested as testing option by Ben. I agree that extending the scan command to
> force passively scanning 6GHz channels makes more sense. I'll prepare such a change.


I don't know enough about this particular issue to have an opinion about how it is implemented,
I just need a way to let ax210 driver work with the upstream ax210 patch that changed scanning
behaviour for 6E channels, since it broke my STA associating to a vendor's AP.

Thanks,
Ben
Ilan Peer April 24, 2022, 9:02 a.m. UTC | #4
Hi,

> >
> > This was requested as testing option by Ben. I agree that extending
> > the scan command to force passively scanning 6GHz channels makes more
> sense. I'll prepare such a change.
> 
> 
> I don't know enough about this particular issue to have an opinion about how
> it is implemented, I just need a way to let ax210 driver work with the
> upstream ax210 patch that changed scanning behaviour for 6E channels,
> since it broke my STA associating to a vendor's AP.
> 

How are you setting up these APs?

- Are they active on PSC channels and transmitting FILS DF or Unsolicited probe responses every 20 TUs?
  In this case, all these changes should not really makes a difference.
- Are the active on non PSC channels with an AP on 2/5GHz advertising their presence on 6GHz channel?

Thanks in advance,

Ilan.
diff mbox series

Patch

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 9e71185323..0ab588b40f 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:
diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
index 6619d6ba7f..1f7537cb66 100644
--- a/wpa_supplicant/wpa_supplicant.conf
+++ b/wpa_supplicant/wpa_supplicant.conf
@@ -132,6 +132,13 @@  ap_scan=1
 # 1:  Do passive scans.
 #passive_scan=0
 
+# Whether to disable 6GHz collocates scan logic
+#
+# 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.
+#non_coloc_6ghz=0
+
 # MPM residency
 # By default, wpa_supplicant implements the mesh peering manager (MPM) for an
 # open mesh. However, if the driver can implement the MPM, you may set this to