All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 06/13] cfg80211: scan PSC channels in case of scan with wildcard SSID
Date: Sun, 29 Nov 2020 17:30:48 +0200	[thread overview]
Message-ID: <iwlwifi.20201129172929.736415a9ca5d.If5b3578ae85e11a707a5da07e66ba85928ba702c@changeid> (raw)
In-Reply-To: <20201129153055.1971298-1-luca@coelho.fi>

From: Ayala Beker <ayala.beker@intel.com>

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: Ayala Beker <ayala.beker@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 net/wireless/scan.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 3409f37d838b..5f92d85acf45 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -726,7 +726,7 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)
 	int n_channels, count = 0, err;
 	struct cfg80211_scan_request *request, *rdev_req = rdev->scan_req;
 	LIST_HEAD(coloc_ap_list);
-	bool need_scan_psc;
+	bool need_scan_psc = true;
 	const struct ieee80211_sband_iftype_data *iftd;
 
 	rdev_req->scan_6ghz = true;
@@ -770,20 +770,18 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)
 		(void *)&request->channels[n_channels];
 
 	/*
-	 * PSC channels should not be scanned if all the reported co-located APs
-	 * are indicating that all APs in the same ESS are co-located
+	 * PSC channels should not be scanned in case of direct scan with 1 SSID
+	 * 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) {
-		need_scan_psc = false;
-
+	if (count && request->n_ssids == 1 && request->ssids[0].ssid_len) {
 		list_for_each_entry(ap, &coloc_ap_list, list) {
-			if (!ap->colocated_ess) {
-				need_scan_psc = true;
+			if (ap->colocated_ess &&
+			    cfg80211_find_ssid_match(ap, request)) {
+				need_scan_psc = false;
 				break;
 			}
 		}
-	} else {
-		need_scan_psc = true;
 	}
 
 	/*
-- 
2.29.2


  parent reply	other threads:[~2020-11-29 15:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-29 15:30 [PATCH 00/13] cfg80211/mac80211 patches from our internal tree 2020-11-29 Luca Coelho
2020-11-29 15:30 ` [PATCH 01/13] mac80211: he: remove non-bss-conf fields from bss_conf Luca Coelho
2020-11-29 15:30 ` [PATCH 02/13] cfg80211: initialize rekey_data Luca Coelho
2020-11-29 15:30 ` [PATCH 03/13] mac80211: support MIC error/replay detected counters driver update Luca Coelho
2020-11-29 15:30 ` [PATCH 04/13] cfg80211: Parse SAE H2E only membership selector Luca Coelho
2020-11-29 15:30 ` [PATCH 05/13] mac80211: Skip entries with " Luca Coelho
2020-11-29 15:30 ` Luca Coelho [this message]
2020-11-29 15:30 ` [PATCH 07/13] cfg80211: Update TSF and TSF BSSID for multi BSS Luca Coelho
2020-11-29 15:30 ` [PATCH 08/13] nl80211: always accept scan request with the duration set Luca Coelho
2020-11-29 15:30 ` [PATCH 09/13] cfg80211: Save the regulatory domain when setting custom regulatory Luca Coelho
     [not found]   ` <CGME20201216102006eucas1p18cede9af63b9ad4aed211ecf47c9aa8f@eucas1p1.samsung.com>
2020-12-16 10:20     ` Marek Szyprowski
2020-12-17 13:25       ` Luca Coelho
2021-06-15 14:42   ` Nicolas Cavallari
2021-10-11 10:51     ` Kalle Valo
2021-10-11 14:09       ` Nicolas Cavallari
2021-10-12 10:24       ` Nicolas Cavallari
2022-02-03 22:30         ` Johannes Berg
2022-02-07 17:56           ` Nicolas Cavallari
2020-11-29 15:30 ` [PATCH 10/13] ieee80211: update reduced neighbor report TBTT info length Luca Coelho
2020-11-29 15:30 ` [PATCH 11/13] mac80211: set sdata state once vif is up after restart Luca Coelho
2020-11-29 15:30 ` [PATCH 12/13] mac80211: disallow band-switch during CSA Luca Coelho
2020-11-29 15:30 ` [PATCH 13/13] cfg80211: include block-tx flag in channel switch started event Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=iwlwifi.20201129172929.736415a9ca5d.If5b3578ae85e11a707a5da07e66ba85928ba702c@changeid \
    --to=luca@coelho.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.