Commit d590a125 authored by Ayala Beker's avatar Ayala Beker Committed by Johannes Berg

cfg80211: scan PSC channels in case of scan with wildcard SSID

In case of scan request with wildcard SSID, or in case of more
than one SSID in scan request, need to scan PSC channels even though
all the co-located APs found during the legacy bands scan indicated
that all the APs in their ESS are co-located, as we might find different
networks on the PSC channels.
Signed-off-by: default avatarAyala Beker <ayala.beker@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20201129172929.736415a9ca5d.If5b3578ae85e11a707a5da07e66ba85928ba702c@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 3598ae87
...@@ -726,7 +726,7 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev) ...@@ -726,7 +726,7 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)
int n_channels, count = 0, err; int n_channels, count = 0, err;
struct cfg80211_scan_request *request, *rdev_req = rdev->scan_req; struct cfg80211_scan_request *request, *rdev_req = rdev->scan_req;
LIST_HEAD(coloc_ap_list); LIST_HEAD(coloc_ap_list);
bool need_scan_psc; bool need_scan_psc = true;
const struct ieee80211_sband_iftype_data *iftd; const struct ieee80211_sband_iftype_data *iftd;
rdev_req->scan_6ghz = true; rdev_req->scan_6ghz = true;
...@@ -770,20 +770,18 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev) ...@@ -770,20 +770,18 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)
(void *)&request->channels[n_channels]; (void *)&request->channels[n_channels];
/* /*
* PSC channels should not be scanned if all the reported co-located APs * PSC channels should not be scanned in case of direct scan with 1 SSID
* are indicating that all APs in the same ESS are co-located * and at least one of the reported co-located APs with same SSID
* indicating that all APs in the same ESS are co-located
*/ */
if (count) { if (count && request->n_ssids == 1 && request->ssids[0].ssid_len) {
need_scan_psc = false;
list_for_each_entry(ap, &coloc_ap_list, list) { list_for_each_entry(ap, &coloc_ap_list, list) {
if (!ap->colocated_ess) { if (ap->colocated_ess &&
need_scan_psc = true; cfg80211_find_ssid_match(ap, request)) {
need_scan_psc = false;
break; break;
} }
} }
} else {
need_scan_psc = true;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment