From patchwork Sun Apr 24 09:57:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 1621494 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=AchLt5v+; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VKJDYtVG; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KmMTb4Wlfz9s0w for ; Sun, 24 Apr 2022 18:57:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=W7NNburhIAusbmWPMeXtOkiiIVbTxje6nwKqCIStiRg=; b=AchLt5v+04GKcU 8WYwythlx86lxrUK6SQkwQKmB/9G9uE9+r+fkFTIe1fqvF5UkFU6wPqMn0Pb9t5CSZUP2CTx+4wA6 3YkyJ1p63M/w6JC8NeEKZ0Ryp+zWmT1lN00oLv/OtSCZ8DDEdc8WlIZWmCR9Ha2g72zw+oXT4M1Os tvepDvQJsAc6fbbyq3dI2Ib68UIFbdB8Q3QdJQs7NqKWD0KHdaBRUx88a1Sf8QUWKy38YzSiv+bK5 Im0aXF+J1OFA3X+5lFwgsb81hoFkbNvd2g2plX5K4grYhd/TyRjUSShF112zvFzQ+i5JyUfV8mN6T CJWUmuXPG9w4FpGXerFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1niY2N-006Bwx-TV; Sun, 24 Apr 2022 08:56:12 +0000 Received: from mga17.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1niY2K-006BvE-Lp for hostap@lists.infradead.org; Sun, 24 Apr 2022 08:56:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650790568; x=1682326568; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=I0PjdHGVyGI9qTPwLl6M01U4jGikdWqmO6ir5FROAxw=; b=VKJDYtVGyL0QuOoYi3e8tC9OGHLGygC5QeLDs57brqeWRAOv94+m7p/I 1HXyX0je0f6iDlnbnTEzpPuw9TL08wV8giblhVNJj3e3rF15LhUVxE8iP HY3yRX/peHRKgCWqwGlzsdmhPwNWMPPII5XESJo0GnxbnqIvr2huG1GHw VKybhV2nIQlI6zBBXLiiMP+68mmVNsCv4owbXia83zCpYh/PFHnDK68NN L/0UplFK2+4Pi264VSGBMJIDzL0D9QN53bdL/jx3I40kReNAWz3ct29QS mh1lRbmKJa47BU5kJie8CtNf3AQGYuWoGt7sABdqYfqcLg7DKtBM0LfBs g==; X-IronPort-AV: E=McAfee;i="6400,9594,10326"; a="245588610" X-IronPort-AV: E=Sophos;i="5.90,286,1643702400"; d="scan'208";a="245588610" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2022 01:56:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,286,1643702400"; d="scan'208";a="531597033" Received: from jed01829.jer.intel.com ([10.12.217.181]) by orsmga006.jf.intel.com with ESMTP; 24 Apr 2022 01:56:04 -0700 From: Ilan Peer To: hostap@lists.infradead.org Cc: Tova Mussai , Andrei Otcheretianski , Ilan Peer , Avraham Stern Subject: [PATCH v5 1/4] nl80211: set NL80211_SCAN_FLAG_COLOCATED_6GHZ in scan Date: Sun, 24 Apr 2022 12:57:52 +0300 Message-Id: <20220424095755.3379637-1-ilan.peer@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211130153943.3531922-1-andrei.otcheretianski@intel.com> References: <20211130153943.3531922-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220424_015608_800151_5E758CFE X-CRM114-Status: GOOD ( 14.49 ) X-Spam-Score: -2.7 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Tova Mussai Set NL80211_SCAN_FLAG_COLOCATED_6GHZ in the scan params to enable scanning for co-located AP's found in 2.4/5 GHz bands when not scanning passively. Do so only when collocated scanning is not disabled [...] Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.151 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Tova Mussai Set NL80211_SCAN_FLAG_COLOCATED_6GHZ in the scan params to enable scanning for co-located AP's found in 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 Signed-off-by: Andrei Otcheretianski Signed-off-by: Ilan Peer Signed-off-by: Avraham Stern --- src/drivers/driver.h | 10 ++++++++++ src/drivers/driver_nl80211_scan.c | 15 +++++++++++++++ wpa_supplicant/scan.c | 1 + 3 files changed, 26 insertions(+) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 31bf1407c0..80fec4c808 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -651,6 +651,16 @@ struct wpa_driver_scan_params { */ unsigned int p2p_include_6ghz:1; + /** + * non_coloc_6ghz - force scanning non-PSC 6GHz channels + * + * If this is set, the driver should scan non-PSC channels from the + * scan request even if no co-located AP was reported 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 diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c index 1316084805..8f75eaaef3 100644 --- a/src/drivers/driver_nl80211_scan.c +++ b/src/drivers/driver_nl80211_scan.c @@ -203,6 +203,21 @@ nl80211_scan_common(struct i802_bss *bss, u8 cmd, goto fail; } nla_nest_end(msg, ssids); + + /* + * If allowed, scan for 6GHz APs that are reported by other + * APs. + * Note that if the flag is not set and 6GHz channels are + * to be scanned, it is highly likely that non PSC channels + * would be scanned passively (due to the probe request + * transmission restrictions mandated by in Draft + * P802.11ax_D8.0, section 27.17.2.3). + */ + wpa_printf(MSG_DEBUG, "nl80211: non_coloc_6ghz=%u", + params->non_coloc_6ghz); + + if (!params->non_coloc_6ghz) + scan_flags |= NL80211_SCAN_FLAG_COLOCATED_6GHZ; } else { wpa_printf(MSG_DEBUG, "nl80211: Passive scan requested"); } diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index abd48edb7a..bdee538181 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -2885,6 +2885,7 @@ wpa_scan_clone_params(const struct wpa_driver_scan_params *src) params->duration = src->duration; params->duration_mandatory = src->duration_mandatory; params->oce_scan = src->oce_scan; + params->non_coloc_6ghz = src->non_coloc_6ghz; if (src->sched_scan_plans_num > 0) { params->sched_scan_plans = From patchwork Sun Apr 24 09:57:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 1621493 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=5GGFcdkw; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=TRy73siK; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KmMTW2fyYz9s0w for ; Sun, 24 Apr 2022 18:57:03 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SOeypVDEMZJit3Pm55Kyi3JZh9dB5d+7Mko2eCdnblw=; b=5GGFcdkwZladR2 Ki9vSVqPNdKrT0eP0fv4oUPtojXWzNe/zimmD1GzZcaVtQSMuLRWW0ARrcnuFG1uUxFPdEV7YN996 EeSKuiidUziTVwaHi1FMDor4WXY/+MfPtzdB5TKttNa4TC5XzWS+Swb3TSLJqVJxJMCU4DL+++ge8 ElTjN6d2fHewCEPF5U4HgwziGqC+uJXV82gG6oH29Sjjtxqa6mHauXAXQE6AROn/LRS3oyZozsjnW s1xMKo/DrR/M81cqUsWRozw7nK85eChLWeqenx3tOtFNVrp7qu05ix5Vkc2tiRjryc6ui/6SImkF4 8cZPBV7RN1HS3UqtJeJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1niY2b-006Bzm-Ay; Sun, 24 Apr 2022 08:56:25 +0000 Received: from mga17.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1niY2L-006Bvi-0Y for hostap@lists.infradead.org; Sun, 24 Apr 2022 08:56:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650790569; x=1682326569; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UEH3+nrGy+bmDEO1u2yRWHZeCkD79VWDEhuF1lK3DlI=; b=TRy73siK9NYOTiHKONhDZDg7aFO5btzYbr45XOsxDMX+5fIC+uXi2Rsw 7JtBHGTYUvXMNNUFEEDwbRUr1Rc+yqpg8Q0hJRhcMWVqz/UhVflktnGfv TWA933vmooCUuDBadiHxmbctObQH5ZEs6woUvszP7uwpmfORy05yp1Wi5 ZToYiiVyhD5kDPUQyv7cXdbAJOfKyZ0t5vb6faOJIhJ0s4Vc6mEcDs8NK yxj7CJdDzdMX49+ajBVwmGKS7tdKDe1b+5Mp8SZhOSOc7uwh6SXGhwbCi eEagm2NGD+TNPxoA82+NhmQlzeKOtoiSVX3QbWf+/g8QkbNXyfrT7aUaC g==; X-IronPort-AV: E=McAfee;i="6400,9594,10326"; a="245588613" X-IronPort-AV: E=Sophos;i="5.90,286,1643702400"; d="scan'208";a="245588613" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2022 01:56:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,286,1643702400"; d="scan'208";a="531597037" Received: from jed01829.jer.intel.com ([10.12.217.181]) by orsmga006.jf.intel.com with ESMTP; 24 Apr 2022 01:56:06 -0700 From: Ilan Peer To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH v5 2/4] scan: Add options to disable 6GHz collocated scanning Date: Sun, 24 Apr 2022 12:57:53 +0300 Message-Id: <20220424095755.3379637-2-ilan.peer@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220424095755.3379637-1-ilan.peer@intel.com> References: <20211130153943.3531922-1-andrei.otcheretianski@intel.com> <20220424095755.3379637-1-ilan.peer@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220424_015609_202922_286657AF X-CRM114-Status: GOOD ( 19.57 ) X-Spam-Score: -2.7 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: - Add a configuration option to disable 6GHz collocated scanning. - Add a parameter to the manual scan command to disable 6GHz collocated scanning. These options can be used to disable 6GHz collocated scan logic. Note that due to limitations on probe request transmissions mandated in Draft P802.11ax_D8.0 it is very likely that non PSC channels wo [...] Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.151 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org - Add a configuration option to disable 6GHz collocated scanning. - Add a parameter to the manual scan command to disable 6GHz collocated scanning. These options can be used to disable 6GHz collocated scan logic. Note that due to limitations on probe request transmissions mandated in Draft P802.11ax_D8.0 it is very likely that non PSC channels would be scanned passively. Signed-off-by: Ilan Peer --- wpa_supplicant/config.c | 1 + wpa_supplicant/config.h | 9 +++++++++ wpa_supplicant/config_file.c | 2 ++ wpa_supplicant/ctrl_iface.c | 7 +++++++ wpa_supplicant/p2p_supplicant.c | 1 + wpa_supplicant/scan.c | 7 +++++++ wpa_supplicant/wpa_supplicant.conf | 7 +++++++ wpa_supplicant/wpa_supplicant_i.h | 1 + 8 files changed, 35 insertions(+) diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index 782bb2197d..5a4a9732df 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -5287,6 +5287,7 @@ static const struct global_parse_data global_fields[] = { { INT_RANGE(pasn_corrupt_mic, 0, 1), 0 }, #endif /* CONFIG_TESTING_OPTIONS */ #endif /* CONFIG_PASN */ + { INT(non_coloc_6ghz), 0 }, }; #undef FUNC diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h index d22ef05fb8..721e214953 100644 --- a/wpa_supplicant/config.h +++ b/wpa_supplicant/config.h @@ -1699,6 +1699,15 @@ struct wpa_config { #endif /* CONFIG_TESTING_OPTIONS */ #endif /* CONFIG_PASN*/ + + /** + * non_coloc_6ghz - Whether to follow 6GHz collocated scan logic or not + * + * This parameter can be used to disable collocated 6GHz scan logic, + * resulting with passively scanning non PSC channels. By default, 6GHz + * collocated scan logic is enabled. + */ + int non_coloc_6ghz; }; diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index 163b480731..cf693baed9 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -1556,6 +1556,8 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config) if (config->wowlan_disconnect_on_deinit) fprintf(f, "wowlan_disconnect_on_deinit=%d\n", config->wowlan_disconnect_on_deinit); + if (config->non_coloc_6ghz) + fprintf(f, "non_coloc_6ghz=%d\n", config->non_coloc_6ghz); } #endif /* CONFIG_NO_CONFIG_WRITE */ diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 70538b578b..d1e0dc2eac 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -8837,6 +8837,7 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params, unsigned int manual_scan_only_new = 0; unsigned int scan_only = 0; unsigned int scan_id_count = 0; + unsigned int manual_non_coloc_6ghz = 0; int scan_id[MAX_SCAN_ID]; void (*scan_res_handler)(struct wpa_supplicant *wpa_s, struct wpa_scan_results *scan_res); @@ -8914,6 +8915,10 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params, os_strstr(params, "wildcard_ssid=1") != NULL; } + pos = os_strstr(params, "non_coloc_6ghz="); + if (pos) + manual_non_coloc_6ghz = !!atoi(pos + 15); + pos = params; while (pos && *pos != '\0') { if (os_strncmp(pos, "ssid ", 5) == 0) { @@ -8983,6 +8988,7 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params, wpa_s->manual_scan_use_id = manual_scan_use_id; wpa_s->manual_scan_only_new = manual_scan_only_new; wpa_s->scan_id_count = scan_id_count; + wpa_s->manual_non_coloc_6ghz = manual_non_coloc_6ghz; os_memcpy(wpa_s->scan_id, scan_id, scan_id_count * sizeof(int)); wpa_s->scan_res_handler = scan_res_handler; os_free(wpa_s->manual_scan_freqs); @@ -9006,6 +9012,7 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params, wpa_s->manual_scan_use_id = manual_scan_use_id; wpa_s->manual_scan_only_new = manual_scan_only_new; wpa_s->scan_id_count = scan_id_count; + wpa_s->manual_non_coloc_6ghz = manual_non_coloc_6ghz; os_memcpy(wpa_s->scan_id, scan_id, scan_id_count * sizeof(int)); wpa_s->scan_res_handler = scan_res_handler; os_free(wpa_s->manual_scan_freqs); diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index a996b436b4..80ef2a9e4d 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -2188,6 +2188,7 @@ do { \ d->go_venue_group = s->go_venue_group; d->go_venue_type = s->go_venue_type; d->p2p_add_cli_chan = s->p2p_add_cli_chan; + d->non_coloc_6ghz = s->non_coloc_6ghz; } diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index bdee538181..60c68e737a 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -1328,6 +1328,13 @@ ssid_list_set: } } + if (wpa_s->conf->non_coloc_6ghz || + (wpa_s->last_scan_req == MANUAL_SCAN_REQ && + wpa_s->manual_non_coloc_6ghz)) { + wpa_dbg(wpa_s, MSG_DEBUG, "Collocated 6GHz logic is disabled"); + params.non_coloc_6ghz = 1; + } + scan_params = ¶ms; scan: diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf index a1dc769c94..c34a9fc219 100644 --- a/wpa_supplicant/wpa_supplicant.conf +++ b/wpa_supplicant/wpa_supplicant.conf @@ -132,6 +132,13 @@ ap_scan=1 # 1: Do passive scans. #passive_scan=0 +# Whether to disable 6GHz collocates scan logic +# +# This parameter can be used to disable collocated 6GHz scan logic, +# resulting with passively scanning non PSC channels. By default, 6GHz +# collocated scan logic is enabled. +#non_coloc_6ghz=0 + # MPM residency # By default, wpa_supplicant implements the mesh peering manager (MPM) for an # open mesh. However, if the driver can implement the MPM, you may set this to diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index da3c36166a..e0c0dc06fc 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -884,6 +884,7 @@ struct wpa_supplicant { unsigned int own_scan_requested:1; unsigned int own_scan_running:1; unsigned int clear_driver_scan_cache:1; + unsigned int manual_non_coloc_6ghz:1; unsigned int manual_scan_id; int scan_interval; /* time in sec between scans to find suitable AP */ int normal_scans; /* normal scans run before sched_scan */ From patchwork Sun Apr 24 09:57:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 1621495 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=O3Bq0s3c; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=IWHtWead; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KmMTs6RJ9z9s0w for ; Sun, 24 Apr 2022 18:57:21 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tYq6WswswD3PqRVaSFQ+Hc0seOLRWSfo1HX8hapxhos=; b=O3Bq0s3c85I+3j BSDSsVIcPcIQ5IuqWT6PKlO3ojhpB4I7K5fMMcFPW4vQpi5Q5GbuPs298SJ4J57Kxf4czzkN6wf2V ASW69D+wKHzghuz70DlefMjD1jGUPgSL4xmcyx42w0C8gnsYa7hslc/yr3QGlPfxnwY1OlzsvQnb+ xYLWrUrVtZi0jWWykQqiGow4tMjXby42hY4n/whVr2KnYadzpDznFgpOByHXVHK+SlC7lHqVOHERt Hmmv5OUqu2ncHjX/vCVq3l2jswqPGZ8ix4Hw+V4Gfe84gTwI056R02wctCNdpJrJGWreDYgWIXT0+ JXgHhmtvJJO163HYMesw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1niY2n-006C3x-MG; Sun, 24 Apr 2022 08:56:37 +0000 Received: from mga17.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1niY2M-006Bw2-0r for hostap@lists.infradead.org; Sun, 24 Apr 2022 08:56:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650790570; x=1682326570; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/Jab/K6foWe3AYa3TrCpP0PgYbU69Ao3wKYflRkY+wc=; b=IWHtWeadJ5w738wVziHhE2zSC7zMm3SDncsAL18DYZhhcpOfb6Uh9bEx 11raSIzKd20r8DaACMPP9WKgdReeRyJvsyvaiSWXV+b2fwdBjYQnu5HU1 EQ/g5APyc2Eyfsm7vYwonnUecSizRhuB+VhmKhs0rAvtKJuxIcq1jEGrj z4iSbL+MnDQJ3zBmIw9kjFeIKWq9q0pMkYAp3MF78AJQXDbrIJ/URB+E0 4Ksxwnnwi/TRwZS+9CbC+3SR5NbztlwwHA8fbfNxiqlKut+jDfbfkLvaB +b914JqrRzpUGyENedNUIdtEYIpmzLhrxL2W7akC4q9R7iOXmZpShGe1q w==; X-IronPort-AV: E=McAfee;i="6400,9594,10326"; a="245588615" X-IronPort-AV: E=Sophos;i="5.90,286,1643702400"; d="scan'208";a="245588615" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2022 01:56:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,286,1643702400"; d="scan'208";a="531597041" Received: from jed01829.jer.intel.com ([10.12.217.181]) by orsmga006.jf.intel.com with ESMTP; 24 Apr 2022 01:56:07 -0700 From: Ilan Peer To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH v5 3/4] tests: Add coverage for testing disabling collocated 6GHz scan Date: Sun, 24 Apr 2022 12:57:54 +0300 Message-Id: <20220424095755.3379637-3-ilan.peer@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220424095755.3379637-1-ilan.peer@intel.com> References: <20211130153943.3531922-1-andrei.otcheretianski@intel.com> <20220424095755.3379637-1-ilan.peer@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220424_015610_116440_B701B76C X-CRM114-Status: UNSURE ( 8.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: - Extend 'wpas_config_file' test to cover 'non_coloc_6ghz' - Extend 'scan' test to cover 'non_coloc_6ghz' parsing. Signed-off-by: Ilan Peer --- tests/hwsim/test_scan.py | 3 +++ tests/hwsim/test_wpas_config.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.151 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org - Extend 'wpas_config_file' test to cover 'non_coloc_6ghz' - Extend 'scan' test to cover 'non_coloc_6ghz' parsing. Signed-off-by: Ilan Peer --- tests/hwsim/test_scan.py | 3 +++ tests/hwsim/test_wpas_config.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_scan.py b/tests/hwsim/test_scan.py index c6267606ee..ba4848289b 100644 --- a/tests/hwsim/test_scan.py +++ b/tests/hwsim/test_scan.py @@ -91,6 +91,9 @@ def test_scan(dev, apdev): logger.info("Active single-channel scan on AP's operating channel") check_scan_retry(dev[0], "freq=2412 passive=0 use_id=1", bssid) + logger.info("Disable collocated 6ghz scanning") + check_scan(dev[0], "freq=2457 non_coloc_6ghz=1 use_id=1") + @remote_compatible def test_scan_tsf(dev, apdev): """Scan and TSF updates from Beacon/Probe Response frames""" diff --git a/tests/hwsim/test_wpas_config.py b/tests/hwsim/test_wpas_config.py index 3cd7dfcf3b..4914fec81a 100644 --- a/tests/hwsim/test_wpas_config.py +++ b/tests/hwsim/test_wpas_config.py @@ -129,7 +129,8 @@ config_checks = [("ap_scan", "0"), ("p2p_device_random_mac_addr", "1"), ("p2p_device_persistent_mac_addr", "02:12:34:56:78:9a"), ("p2p_interface_random_mac_addr", "1"), - ("openssl_ciphers", "DEFAULT")] + ("openssl_ciphers", "DEFAULT"), + ("non_coloc_6ghz", "1")] def supported_param(capa, field): mesh_params = ["user_mpm", "max_peer_links", "mesh_max_inactivity"] From patchwork Sun Apr 24 09:57:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 1621496 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=O6lAkhZy; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=lrIuR4nY; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KmMV13Bmwz9s09 for ; Sun, 24 Apr 2022 18:57:29 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PpFsANmzUOhoHgq3ycamm7YWozYDm8cbuGWJkKoeVzQ=; b=O6lAkhZyihd4Oc dckx5xc0evIFKgzOeSGWLGpOODuou9wr/vAc4JVMaIv101aFdnbJ8UH7rvlvGmBp0BpmfeSSwRtPC 4l90lk9dCNIXN/SPOxRnFva8+mTglMemO04VQyIRWFkfJ/vqZKyNq/wUl7etkJ7jOt/xiAxX7/1lS qAEE21Cjo5qdpfdq9DmYi6q2tjWT8J6j7TqDJT7qDfCuCO6D8+d+La7WOvhsnpSGNDEtYCFKNmMk4 t6Mom5uEsu+F7tOlP085MHF+B+1RRlYJWCirQZH/Wp6Vd0rcg3NwLZnb+Gmg11xiFTLc2GQqbDeZM G0zFP2kXjlGaUYtEuCgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1niY30-006C8Z-HQ; Sun, 24 Apr 2022 08:56:50 +0000 Received: from mga17.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1niY2M-006BvE-6w for hostap@lists.infradead.org; Sun, 24 Apr 2022 08:56:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650790570; x=1682326570; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h8rJN5WjabMxqoB0MIhJUOM+czBRfhBQANLe6+Wmxk4=; b=lrIuR4nYMzviSBei5Hgo/RonxiRupeTtdEB1BR4vVq8febKwdsFLgtjM s9ZZHI/sVlv2TT/3cyBNUKOMbaiLA2geHg9qA7fZjdxposL541t853yK7 QXJwNhV3csPYu1/q/hW3+XOLbxKTSTC34B8+SWF2MmomDnezqv9KTh7Td 29UsiCTVrvr6h1xDUj+A37TJRbVBOuNzsuzvsEH7fcQnKqTdEkBs5DpIr ci5q3w7vCNWmqBJCtUZMsfSeWf2v1IIgyKPZFo4eziEsap7y/YAZIHIJa SAZQAOs1goEvrCivBAGBlU4ymApgdwVsr51rXijV8CVe6i7Be62HGmZ1n A==; X-IronPort-AV: E=McAfee;i="6400,9594,10326"; a="245588616" X-IronPort-AV: E=Sophos;i="5.90,286,1643702400"; d="scan'208";a="245588616" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2022 01:56:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,286,1643702400"; d="scan'208";a="531597048" Received: from jed01829.jer.intel.com ([10.12.217.181]) by orsmga006.jf.intel.com with ESMTP; 24 Apr 2022 01:56:08 -0700 From: Ilan Peer To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH v5 4/4] P2P: Do not use collocated scan logic when scanning 6GHz Date: Sun, 24 Apr 2022 12:57:55 +0300 Message-Id: <20220424095755.3379637-4-ilan.peer@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220424095755.3379637-1-ilan.peer@intel.com> References: <20211130153943.3531922-1-andrei.otcheretianski@intel.com> <20220424095755.3379637-1-ilan.peer@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220424_015610_290263_133F8FAF X-CRM114-Status: GOOD ( 10.29 ) X-Spam-Score: -2.7 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Passively scan 6GHz channels during P2P find full scan as P2P GOs are not expected to be published in RNR or other APs on the 2GHz and 5GHz bands. Signed-off-by: Ilan Peer --- wpa_supplicant/p2p_supplicant.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.151 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Passively scan 6GHz channels during P2P find full scan as P2P GOs are not expected to be published in RNR or other APs on the 2GHz and 5GHz bands. Signed-off-by: Ilan Peer --- wpa_supplicant/p2p_supplicant.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 80ef2a9e4d..e92b7ae35a 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -444,8 +444,16 @@ static int wpas_p2p_scan(void *ctx, enum p2p_scan_type type, int freq, num_req_dev_types, req_dev_types); if (wps_ie == NULL) goto fail; - if (!wpa_s->conf->p2p_6ghz_disable) + if (!wpa_s->conf->p2p_6ghz_disable) { params->p2p_include_6ghz = include_6ghz; + + /* + * passively scan non PSC channels without relying on collocated + * logic + */ + params->non_coloc_6ghz = include_6ghz; + } + switch (type) { case P2P_SCAN_SOCIAL: params->freqs = os_calloc(ARRAY_SIZE(social_channels_freq) + 1,