Skip to content

Commit 19d067c

Browse files
AviSterngregkh
authored andcommitted
cfg80211: don't add non transmitted BSS to 6GHz scanned channels
[ Upstream commit 5666ee1 ] 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>
1 parent 55c93a8 commit 19d067c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

net/wireless/scan.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,12 @@ static bool cfg80211_find_ssid_match(struct cfg80211_colocated_ap *ap,
702702

703703
for (i = 0; i < request->n_ssids; i++) {
704704
/* wildcard ssid in the scan request */
705-
if (!request->ssids[i].ssid_len)
705+
if (!request->ssids[i].ssid_len) {
706+
if (ap->multi_bss && !ap->transmitted_bssid)
707+
continue;
708+
706709
return true;
710+
}
707711

708712
if (ap->ssid_len &&
709713
ap->ssid_len == request->ssids[i].ssid_len) {
@@ -829,6 +833,9 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)
829833
!cfg80211_find_ssid_match(ap, request))
830834
continue;
831835

836+
if (!request->n_ssids && ap->multi_bss && !ap->transmitted_bssid)
837+
continue;
838+
832839
cfg80211_scan_req_add_chan(request, chan, true);
833840
memcpy(scan_6ghz_params->bssid, ap->bssid, ETH_ALEN);
834841
scan_6ghz_params->short_ssid = ap->short_ssid;

0 commit comments

Comments
 (0)