]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Set NL80211_SCAN_FLAG_COLOCATED_6GHZ in scan
authorTova Mussai <tova.mussai@intel.com>
Sun, 24 Apr 2022 09:57:52 +0000 (12:57 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 7 May 2022 18:37:08 +0000 (21:37 +0300)
Set NL80211_SCAN_FLAG_COLOCATED_6GHZ in the scan parameters to enable
scanning for co-located APs discovered based on neighbor reports from
the 2.4/5 GHz bands when not scanning passively. Do so only when
collocated scanning is not disabled by higher layer logic.

Signed-off-by: Tova Mussai <tova.mussai@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
src/drivers/driver.h
src/drivers/driver_nl80211_scan.c
wpa_supplicant/scan.c

index 5e204655c5ee1735151aeedc61dbb35fb8b7a247..677b729d5d4afad0bca91da3b99a476febe5f2f3 100644 (file)
@@ -667,6 +667,16 @@ struct wpa_driver_scan_params {
         */
        unsigned int p2p_include_6ghz:1;
 
+       /**
+        * non_coloc_6ghz - Force scanning of non-PSC 6 GHz channels
+        *
+        * If this is set, the driver should scan non-PSC channels from the
+        * scan request even if neighbor reports from 2.4/5 GHz APs did not
+        * report a co-located AP on these channels. The default is to scan
+        * non-PSC channels only if a co-located AP was reported on the channel.
+        */
+       unsigned int non_coloc_6ghz:1;
+
        /*
         * NOTE: Whenever adding new parameters here, please make sure
         * wpa_scan_clone_params() and wpa_scan_free_params() get updated with
index b82e5af2a2eda3ce7c29c0e6b474b69895a26dcb..c31ed6eb1248645b44ca9ed4836358a456caa39b 100644 (file)
@@ -203,6 +203,21 @@ nl80211_scan_common(struct i802_bss *bss, u8 cmd,
                                goto fail;
                }
                nla_nest_end(msg, ssids);
+
+               /*
+                * If allowed, scan for 6 GHz APs that are reported by other
+                * APs. Note that if the flag is not set and 6 GHz channels are
+                * to be scanned, it is highly likely that non-PSC channels
+                * would be scanned passively (due to the Probe Request frame
+                * transmission restrictions mandated in IEEE Std 802.11ax-2021,
+                * 26.17.2.3 (Scanning in the 6 GHz band). Passive scanning of
+                * all non-PSC channels would take a significant amount of time.
+                */
+               if (!params->non_coloc_6ghz) {
+                       wpa_printf(MSG_DEBUG,
+                                  "nl80211: Scan co-located APs on 6 GHz");
+                       scan_flags |= NL80211_SCAN_FLAG_COLOCATED_6GHZ;
+               }
        } else {
                wpa_printf(MSG_DEBUG, "nl80211: Passive scan requested");
        }
index abd48edb7ad18ba35a7dafe3e4cee6c4af0a3f13..ce29d9953f20cd4dcc03336c7518478359be0e3f 100644 (file)
@@ -2915,6 +2915,7 @@ wpa_scan_clone_params(const struct wpa_driver_scan_params *src)
        params->relative_adjust_band = src->relative_adjust_band;
        params->relative_adjust_rssi = src->relative_adjust_rssi;
        params->p2p_include_6ghz = src->p2p_include_6ghz;
+       params->non_coloc_6ghz = src->non_coloc_6ghz;
        return params;
 
 failed: