From patchwork Mon Apr 8 13:07:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1920842 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=X5NAU+fk; 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=VfRhyaj2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VCqD74VcHz1yY8 for ; Mon, 8 Apr 2024 23:08:55 +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=hzQoR+cyp6eAajju4STfl5QZNQAGKqBJSmlp0C6erFY=; b=X5NAU+fkMwp55V ejrbIrLE468cmJMIcF1lGHQj5CoM2ki7qkPKx9hMD+OLkpHvzGwuaRSKVrhXU2S2kwBz9ohh8x0A+ wEHncrsBewc123VmCKbPmUX30ltcZEU8c1/WkLXCeshw4SGQZ8R+C6BCb2e9jMFWntbnb0ndOY9/0 z8/7LrjMqCfHP8RlEdMsGXacUx8qXercxhhZTXATLZZx8bGLj328EL3ATEhmrguAei922d/T1oA4Q ZkhAwCREkK7FbC9nypNg2om9LwL2/mhd0z8t0gqzJ2rGDmyzqc4ZUlJHWrs6bSPYEyMHNokmCB+pd 3NCEIKd21I1tld32j+wA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojn-0000000Fdyd-1r0f; Mon, 08 Apr 2024 13:08:39 +0000 Received: from mgamail.intel.com ([198.175.65.14]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtoje-0000000FduP-208j for hostap@lists.infradead.org; Mon, 08 Apr 2024 13:08:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712581710; x=1744117710; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RMKK8TYUr6/x5nnj8n2cjwHPIbi7VbRjNpnFZqyeia4=; b=VfRhyaj2vBlmGvCGTqIO2iLYiDeivXCCD6np/e4W0ozs8WRf2efON4pW GpGrLPGbevaJvcoI3aFj8SoyvNtyb0hMrxdAXYcoOnJ1W6QJG2jrzECHn GA22nEBcxO7oXujGYaSma7kUkzGYC/iLLgMp3tUQjTw2OE+gyFxp/rzwn ta7JwyUBkWZAbsXBXVDsWYWKPTbjLewi863yQCRHUouXMdAmBwrQSqdMs 8PCA8RalIBscbCIvc000091+A9aHqDPhzFrs4RzQM984quQh3BnEpD8RU zA7b8PjKqw8PHWfaa1WYPMNOyvUpQm/o/cfUC1K+YjHMAtIbEAzddPOVk Q==; X-CSE-ConnectionGUID: /sbSZXABS+ilSIOGJ1kxwg== X-CSE-MsgGUID: 3TgphKDhQfyHFU2HxT/x1w== X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="11688897" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="11688897" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:30 -0700 X-CSE-ConnectionGUID: 4LTLdjnoSyeq3yH5wrBZLg== X-CSE-MsgGUID: n7UjE8lNRB+uCIJv0JfKvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="50868837" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:30 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH 7/7] wpa_supplicant: Do not allow fast associate before scanning 6 GHz Date: Mon, 8 Apr 2024 16:07:01 +0300 Message-ID: <20240408130701.531194-7-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240408130701.531194-1-andrei.otcheretianski@intel.com> References: <20240408130701.531194-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-20240408_060830_652323_7A50ED08 X-CRM114-Status: GOOD ( 11.14 ) X-Spam-Score: -2.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: Ilan Peer In case the channel map was updated to include the 6 GHz but these channels were not scanned yet, do not allow fast associate. Signed-off-by: Ilan Peer --- wpa_supplicant/events.c | 10 ++++++---- wpa_supplicant/scan.c | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) Content analysis details: (-2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [198.175.65.14 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.5 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: Ilan Peer In case the channel map was updated to include the 6 GHz but these channels were not scanned yet, do not allow fast associate. Signed-off-by: Ilan Peer --- wpa_supplicant/events.c | 10 ++++++---- wpa_supplicant/scan.c | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index bfe3d85e8f..96054f264a 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -2852,6 +2852,9 @@ int wpa_supplicant_fast_associate(struct wpa_supplicant *wpa_s) wpa_s->conf->scan_res_valid_for_connect)) { wpa_printf(MSG_DEBUG, "Fast associate: Old scan results"); return -1; + } else if (wpa_s->crossed_6ghz_dom) { + wpa_printf(MSG_DEBUG, "Fast associate: crossed 6 GHz dom"); + return -1; } return wpas_select_network_from_last_scan(wpa_s, 0, 1, false, NULL); @@ -5234,11 +5237,10 @@ void wpa_supplicant_update_channel_list(struct wpa_supplicant *wpa_s, wpa_dbg(ifs, MSG_DEBUG, "Channel list changed - restart sched_scan"); wpas_scan_restart_sched_scan(ifs); - } else if (ifs->scanning && !was_6ghz_enabled && - ifs->is_6ghz_enabled) { - /* Look for APs in the 6 GHz band */ + } else if (!was_6ghz_enabled && ifs->is_6ghz_enabled) { wpa_dbg(ifs, MSG_INFO, - "Channel list changed - trigger 6 GHz-only scan"); + "Channel list changed: 6 GHz are enabled"); + ifs->crossed_6ghz_dom = true; } } diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 2db4d8b910..e591f22507 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -322,6 +322,12 @@ int wpa_supplicant_trigger_scan(struct wpa_supplicant *wpa_s, } wpa_s->last_scan_all_chan = !params->freqs; wpa_s->last_scan_non_coloc_6ghz = params->non_coloc_6ghz; + + if (wpa_s->crossed_6ghz_dom) { + wpa_printf(MSG_DEBUG, "First scan after crossing 6 GHz domain"); + wpa_s->crossed_6ghz_dom = false; + } + if (!ctx || radio_add_work(wpa_s, 0, "scan", next, wpas_trigger_scan_cb, ctx) < 0) {