From patchwork Mon Apr 11 14:21:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 1615745 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=AeKbg78J; 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=XV94Ad/8; 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 4KcTzB31Pyz9sCD for ; Mon, 11 Apr 2022 23:21:58 +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=AeKbg78JcszHsQ ANcue4DpGhp38B1JcOcL4auoV5jco+/BslBpX0z2uRdwix/LSDnmmJIih67is8ZM3yTPPIAghl7PF JdhP7h/gnzXV9vwMtjMaD08jjT74JwcnbjUj2KZwZtA6Sy5tQ7sgsecUbjccRUMUX42c/85ssp4NJ OF4HdERQZFLF0S0FJe5aqoVAVDeO9ETri1iF2TGZ+eRrXWLTf6DwIbg8dlweBVk5b1CDTOm/B0odG GUY2tRrwLLeAN/oO8XVW/ivhbSvEdij22lff36S4ac+AeqklJOEHv3YuYpPZcppZOHDZ/Po2RJ6hw R3rorlhkEo1Sp59smofw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndtyN-0097dF-NL; Mon, 11 Apr 2022 13:20:51 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndtyC-0097Zc-OS for hostap@lists.infradead.org; Mon, 11 Apr 2022 13:20:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649683240; x=1681219240; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=siBLnmfsdh41bAJNnL3wzdNCkuEjP/wFNKDniRQKd3Q=; b=XV94Ad/8BcASTqRWb3mNiMZj6beGNrqWIBCRtg3TLEgO17aht6dIcl3Y 47fvBuIW2tA1eE0Blw4aDrbneD78Xx+zDWRQnZ5GThXLrHk3MdzplfpIN jx1w+5PzRdKblhXDAN37yCPJkUkHoaShQs5l6X+Tw4U3a5KOD3EGb8W2e vKp//Z83jxwtqyheuSyVLWYHToxWQABfvHXdqGmxGI7UGyX0tfVhESihv f54XicyRlDfWaWQoos1K8RaJWZloO73JCViPgXImAoArPQMM3AHgxK1Xx HMu+3sl7gXuRGt6EFiYgfTYsEkLeuUlCz5ZzGZ73ulpfpKQgYtY25mgPA A==; X-IronPort-AV: E=McAfee;i="6400,9594,10313"; a="287121349" X-IronPort-AV: E=Sophos;i="5.90,251,1643702400"; d="scan'208";a="287121349" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2022 06:20:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,251,1643702400"; d="scan'208";a="801710567" Received: from jed01829.jer.intel.com ([10.12.217.181]) by fmsmga006.fm.intel.com with ESMTP; 11 Apr 2022 06:20:30 -0700 From: Ilan Peer To: hostap@lists.infradead.org Cc: Tova Mussai , Andrei Otcheretianski , Ilan Peer , Avraham Stern Subject: [PATCH v4 1/4] nl80211: set NL80211_SCAN_FLAG_COLOCATED_6GHZ in scan Date: Mon, 11 Apr 2022 17:21:58 +0300 Message-Id: <20220411142201.2770618-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-20220411_062040_870393_88C8FD20 X-CRM114-Status: GOOD ( 15.22 ) 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.88 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.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [192.55.52.88 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -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 =