]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
cfg80211: don't add non transmitted BSS to 6GHz scanned channels
authorAvraham Stern <avraham.stern@intel.com>
Wed, 2 Feb 2022 08:49:37 +0000 (10:49 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 09:59:09 +0000 (11:59 +0200)
BugLink: https://bugs.launchpad.net/bugs/1969107
[ Upstream commit 5666ee154f4696c011dfa8544aaf5591b6b87515 ]

When adding 6GHz channels to scan request based on reported
co-located APs, don't add channels that have only APs with
"non-transmitted" BSSes if they only match the wildcard SSID since
they will be found by probing the "transmitted" BSS.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220202104617.f6ddf099f934.I231e55885d3644f292d00dfe0f42653269f2559e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 19d067c10b7157fc006be1ce0e770ba300642415)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/wireless/scan.c

index adc0d14cfd8609e49628d4e00eeff5f475ded4e9..8e1e578d64bc0882b9c3fd2a42276bf0a8988700 100644 (file)
@@ -702,8 +702,12 @@ static bool cfg80211_find_ssid_match(struct cfg80211_colocated_ap *ap,
 
        for (i = 0; i < request->n_ssids; i++) {
                /* wildcard ssid in the scan request */
-               if (!request->ssids[i].ssid_len)
+               if (!request->ssids[i].ssid_len) {
+                       if (ap->multi_bss && !ap->transmitted_bssid)
+                               continue;
+
                        return true;
+               }
 
                if (ap->ssid_len &&
                    ap->ssid_len == request->ssids[i].ssid_len) {
@@ -829,6 +833,9 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)
                    !cfg80211_find_ssid_match(ap, request))
                        continue;
 
+               if (!request->n_ssids && ap->multi_bss && !ap->transmitted_bssid)
+                       continue;
+
                cfg80211_scan_req_add_chan(request, chan, true);
                memcpy(scan_6ghz_params->bssid, ap->bssid, ETH_ALEN);
                scan_6ghz_params->short_ssid = ap->short_ssid;