[PATCH] nl80211: set NL80211_SCAN_FLAG_COLOCATED_6GHZ in scan

Peer, Ilan ilan.peer at intel.com
Mon Dec 13 22:38:45 PST 2021


Hi,

> -----Original Message-----
> From: Hostap <hostap-bounces at lists.infradead.org> On Behalf Of Jouni
> Malinen
> Sent: Saturday, December 11, 2021 13:21
> To: Otcheretianski, Andrei <andrei.otcheretianski at intel.com>
> Cc: hostap at lists.infradead.org; Mussai, Tova <tova.mussai at intel.com>
> Subject: Re: [PATCH] nl80211: set NL80211_SCAN_FLAG_COLOCATED_6GHZ
> in scan
> 
> On Tue, Nov 30, 2021 at 05:39:43PM +0200, Andrei Otcheretianski wrote:
> > Set NL80211_SCAN_FLAG_COLOCATED_6GHZ in the scan params to enable
> > scanning for co-located AP's found in 2.4/5 GHz bands.
> 
> > diff --git a/src/drivers/driver_nl80211_scan.c
> > b/src/drivers/driver_nl80211_scan.c
> > @@ -300,6 +300,9 @@ nl80211_scan_common(struct i802_bss *bss, u8
> cmd,
> > +	/* scan for 6ghz colocated APs that reported by other APs */
> > +	scan_flags |= NL80211_SCAN_FLAG_COLOCATED_6GHZ;
> > +
> >  	if (scan_flags &&
> >  	    nla_put_u32(msg, NL80211_ATTR_SCAN_FLAGS, scan_flags))
> 
> Is it really correct to do this unconditionally? Wouldn't this result in undesired
> extra latency in scanning when the 6 GHz band is not used (e.g., for most P2P
> use cases) or when there is an explicit configuration (e.g., SETBAND) to
> disable use of the 6 GHz band?
> 

Without this flag, when user space requests the kernel to scan 6GHz channels, the 6GHz
non-PSC channels would be scanned passively which is not desired. Setting this flag
instructs the kernel to only scan non-PSC channels if relevant information was found in the
RNR elements on previously found BSSs (e.g., matching SSID etc.). Thus, I think that this
flag should always be set if not scanning passively. I'll prepare a fix that does not set this flag
for passive scan.

As for use cases that 6GHz are not used, additional logic is indeed needed to avoid scanning
these channels.

Regards,

Ilan.





More information about the Hostap mailing list