From patchwork Sun Apr 10 07:51:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 1615395 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=1xcKT7cm; 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=RBVj7LOC; 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 4KbjMd3qKlz9sG6 for ; Sun, 10 Apr 2022 16:51:57 +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=KLgskkCPITruT7Ha5JPkrk5AVwGUdyqd/WTrh0cscXM=; b=1xcKT7cm68w4HN z62hFZFkoY+R7y9LR4658pCiY3LjZZE8Pr7ycvejdYJpbjJNsmbu4ZGTqPchtU0SgsSfXZxzp/D94 czgFWe5JpFjfsbAdz9ZfJL6tQI6SAlGfyHbBmJ4F1WaVRf9jVmXMFcdNq/flSM3juq26g2W/ecdLl ePCpJSXJXyvoROr63x1i8p/TBaxCu3avwxC/iMWCJV5PKQQcFOrtbBJ+jK1E9A3Wo4/IYRug0jBDg 2kl8W0nd7fGOK7Z2PyFzODVsxOAPmlj2P95xQI2NfXRWlVycem+jNUYKhZe9UIe7Wl2D9+OPewpGd SQ0H4yujgOO31BN4TCpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndRPU-004KmZ-2J; Sun, 10 Apr 2022 06:50:56 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndRP8-004Kkl-Tr for hostap@lists.infradead.org; Sun, 10 Apr 2022 06:50:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649573434; x=1681109434; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=siBLnmfsdh41bAJNnL3wzdNCkuEjP/wFNKDniRQKd3Q=; b=RBVj7LOCac06tSW671eGI6m34zQkIS0WFtnkGM567mGpRHFSKNdnH9hm wwHhf9rGz+aGKDXJak6lB4wg/j18NQpsn49NignXUPKbPMbJbCZ6wUJ8M p66PcY2r3KV/n+pl6+iCbNAlZWjORPXWLz2CmHHRuMvd13Mg2nV/2GRGR 3NDoLmwsVomXBil7+LDa1tN0xX3DDm9l9X0CW+a+j+EsoW6e15LctryXy +t6YNeNis4yxpPvtLoVcPRrNGXjSMe5eEF549+GB6I5UIv0H1crrNgQNk 1hlQ7gDexILeSTNB+xp3KkuV8jMMjo5XgGCnggrq2XWBdAq+kAjxPm6+d Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10312"; a="262129165" X-IronPort-AV: E=Sophos;i="5.90,249,1643702400"; d="scan'208";a="262129165" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2022 23:50:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,249,1643702400"; d="scan'208";a="610589407" Received: from jed01829.jer.intel.com ([10.12.217.181]) by fmsmga008.fm.intel.com with ESMTP; 09 Apr 2022 23:50:29 -0700 From: Ilan Peer To: hostap@lists.infradead.org Cc: Tova Mussai , Andrei Otcheretianski , Ilan Peer , Avraham Stern Subject: [PATCH v3 1/4] nl80211: set NL80211_SCAN_FLAG_COLOCATED_6GHZ in scan Date: Sun, 10 Apr 2022 10:51:56 +0300 Message-Id: <20220410075159.2149687-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-20220409_235035_015972_A06134E4 X-CRM114-Status: GOOD ( 13.87 ) X-Spam-Score: -5.4 (-----) 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: (-5.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [192.55.52.115 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 | 11 +++++++++++ wpa_supplicant/scan.c | 1 + 3 files changed, 22 insertions(+) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 111e7e4081..0e31d6e3fc 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..31e3308081 100644 --- a/src/drivers/driver_nl80211_scan.c +++ b/src/drivers/driver_nl80211_scan.c @@ -203,6 +203,17 @@ 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. If the flag is not set and 6GHz channels are to be + * scanned, they will be scanned passively. + */ + 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 b0094ca6ca..31b694713b 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -2872,6 +2872,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 10 07:51:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 1615394 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=hYdLLq60; 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=Q5yMl5nt; 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 4KbjMZ6pXXz9sDX for ; Sun, 10 Apr 2022 16:51:54 +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=A94xsCd+lhtFAphQSOdRiPHeDs4W34M63kilQKPOiv8=; b=hYdLLq60+C2ueY todxaPc3S3w93KLSZ1S8XH4yEG48kKui8riZ6MoWR/q7vrK+Ll6nX7SDnB3tZa/G77Svx+J5BuTiV 7cHGfFmDc6AZWU89ZsqbnHPMzQMlHNp0E6EIg4ZNcFkT3qn3wZRcOT+3rOUTKgQ1pPFl5rPpFG0vK P4rzV7yIHELVM5awWmiRr2ttgaX2AydivYWbF6Gd8IHBvjqb3u6F6xQM725ofpMt1G3ZlKjZ0sbRk lCUEcwNau49h5JOvM0FtG0X57QzsS34gBQQ176aec19/vMVoValEUEPzq6XDMYhQCrVNqQKSQqPS7 oGBOzGx+W/Uzvjzj0A/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndRPL-004KmM-WA; Sun, 10 Apr 2022 06:50:48 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndRP8-004Kkm-Q0 for hostap@lists.infradead.org; Sun, 10 Apr 2022 06:50:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649573434; x=1681109434; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZfkWnaRWqrwy5tt+OCtNZgzShfKJh5qF63szLtGFdMQ=; b=Q5yMl5nttnsOEno6uxmA6MOzVybhvUL/QU2kYpGr09BfHA4AFqZQqYtN bgYi7XBKHe6MpM3MipW10NXxrUfC/6LZn+8bVMvjjLgsgjrz/6+DFes7A rEhMqUGhzco4MoLKnC/OMAbfBO63KzktmkHRwu9PUQ/Ot6HFX0wihjJ+w 2a8gp9iyoBHpnNNqQzEy8L8/8R4o1N8xZgsL4KC0U9BpEP7ssYvcAdNW3 mgRi/zFm9pk03sCt2VrOBG63nP4i4CZ51nQ13M23w94wOcXgKQzMctP4e V0jGWNXGUVbCvVMIKU/qpnqYerhPJVDYlMwYRAe147dzI3l8I3wwDDeTp g==; X-IronPort-AV: E=McAfee;i="6400,9594,10312"; a="262129167" X-IronPort-AV: E=Sophos;i="5.90,249,1643702400"; d="scan'208";a="262129167" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2022 23:50:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,249,1643702400"; d="scan'208";a="610589410" Received: from jed01829.jer.intel.com ([10.12.217.181]) by fmsmga008.fm.intel.com with ESMTP; 09 Apr 2022 23:50:30 -0700 From: Ilan Peer To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH v3 2/4] scan: Add a configuration option to disable 6GHz collocated scanning Date: Sun, 10 Apr 2022 10:51:57 +0300 Message-Id: <20220410075159.2149687-2-ilan.peer@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220410075159.2149687-1-ilan.peer@intel.com> References: <20211130153943.3531922-1-andrei.otcheretianski@intel.com> <20220410075159.2149687-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-20220409_235034_927382_2BF67584 X-CRM114-Status: GOOD ( 14.32 ) X-Spam-Score: -5.4 (-----) 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: This configuration option can be used to disable 6GHz collocated scan logic which would result with passively scanning 6GHz non PSC channels. Signed-off-by: Ilan Peer --- wpa_supplicant/config.c | 1 + wpa_supplicant/config.h | 9 +++++++++ wpa_supplicant/config_file.c | 2 ++ wpa_supplicant/p2p_supplicant.c | 1 + wpa_sup [...] Content analysis details: (-5.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [192.55.52.115 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 This configuration option can be used to disable 6GHz collocated scan logic which would result with passively scanning 6GHz non PSC channels. Signed-off-by: Ilan Peer --- wpa_supplicant/config.c | 1 + wpa_supplicant/config.h | 9 +++++++++ wpa_supplicant/config_file.c | 2 ++ wpa_supplicant/p2p_supplicant.c | 1 + wpa_supplicant/scan.c | 7 +++++++ 5 files changed, 20 insertions(+) diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index 58ed8bc0ae..5b9c9ed7df 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -5265,6 +5265,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 2dd586391e..9641656b14 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -1559,6 +1559,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/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 31b694713b..d7c73883e9 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -1328,6 +1328,13 @@ ssid_list_set: } } + if (!params.non_coloc_6ghz && wpa_s->conf->non_coloc_6ghz) { + wpa_dbg(wpa_s, MSG_DEBUG, + "Collocated 6GHz logic is disabled in configuration"); + + params.non_coloc_6ghz = 1; + } + scan_params = ¶ms; scan: