From patchwork Mon Apr 29 11:51:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Berg X-Patchwork-Id: 1928947 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=y3D0uL+T; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=BvKT7fZi; 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 4VShXV6Bjkz23tZ for ; Mon, 29 Apr 2024 21:52:42 +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=ludFsx56xP+yF65b/whnEKUGGSFG/2ai9XYhjPY5jeA=; b=y3D0uL+TN24XBi mQnGccVboU0zWMibWWctsAvc2i807hQKpGzNp+M7bsEtURhgLC3DQbyI3ENKV8e6kFBVRz5m3a05f H2BFBC4cZoTmrjyZ1bbVR5bN1MYnKVO2nRhNt4wQgRdlurpZmaEPTiUKy32Z07G6HMD9usRjJfUeq /vmQpZsVWwNzU8Vdf7VTiSn3zKwURR5XqF20PHGPTfwiEiL3eADSSVD1668gPhyhLfFSsoRb34o0V mhzOGJtj7J1/heg1UL9JjsdiiIk53HWfCzxcaCS3tGBXLwaZ0MtgCGsA3+uiU9vVzDMEav6j+3YZH OPn9jLEjsmpP+cfH2uQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1PYX-00000002XGd-2CXh; Mon, 29 Apr 2024 11:52:25 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1PYK-00000002X8H-199X for hostap@lists.infradead.org; Mon, 29 Apr 2024 11:52:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=gqTiOWs3RNmSYHF7tISEzbAo95Aj0Jsk+sHM7VjItMM=; t=1714391530; x=1715601130; b=BvKT7fZiiv+4LwT+nToINEv7/2MfGvEpFDZ7Kcze2E7PRNZ eDQILNTpcEnNGjOWJZiETMMyEJTU8ksQkrbX65StRe+vatvvuO2BVMLeVyzT99Z0fnd6SXyTan6fr IwQNoTdbWpCemgp0KnqsoLI2z25KqoGt+14HB/7zl/tNSPL+RHKz9AgqI8wJV0NxGxvXWx5CFsogV JSZqsy4Bwvo3DBj1kPyK9RqmCE5wtrT0FIsZTh0MCSVtQS/kDUit4H1OJxC1AXTktFrIC47omNZMb knxF1GIbaT8/zc/nn5SiucAYQMfoPyDeFr9ww0KOdBpznIhPVNaBegtRtKWSlMdA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1s1PYG-0000000CNIg-2zr1; Mon, 29 Apr 2024 13:52:08 +0200 From: benjamin@sipsolutions.net To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 05/16] WNM: Remove unused age parameter for neighbor comparison Date: Mon, 29 Apr 2024 13:51:46 +0200 Message-ID: <20240429115157.211073-6-benjamin@sipsolutions.net> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240429115157.211073-1-benjamin@sipsolutions.net> References: <20240429115157.211073-1-benjamin@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240429_045212_419624_E9CC65CE X-CRM114-Status: GOOD ( 12.54 ) X-Spam-Score: -0.2 (/) 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: Benjamin Berg compare_scan_neighbor_results was taking an age paramter to check whether the BSS has been seen recently. This was used historically in a codepath when no new scan was done. However, the logic was cha [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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_EF Message has a valid DKIM or DK signature from envelope-from domain 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: Benjamin Berg compare_scan_neighbor_results was taking an age paramter to check whether the BSS has been seen recently. This was used historically in a codepath when no new scan was done. However, the logic was changed in commit 20ed289a785c ("WNM: Clean up old scan data processing") and the parameter is not used at all anymore as it is replaced by a different logic. Remove it. Signed-off-by: Benjamin Berg --- wpa_supplicant/wnm_sta.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c index 721baeddb..d3bc03202 100644 --- a/wpa_supplicant/wnm_sta.c +++ b/wpa_supplicant/wnm_sta.c @@ -740,7 +740,7 @@ static struct wpa_bss * find_better_target(struct wpa_bss *a, } static struct wpa_bss * -compare_scan_neighbor_results(struct wpa_supplicant *wpa_s, os_time_t age_secs, +compare_scan_neighbor_results(struct wpa_supplicant *wpa_s, enum mbo_transition_reject_reason *reason) { u8 i; @@ -777,19 +777,6 @@ compare_scan_neighbor_results(struct wpa_supplicant *wpa_s, os_time_t age_secs, continue; } - if (age_secs) { - struct os_reltime now; - - if (os_get_reltime(&now) == 0 && - os_reltime_expired(&now, &target->last_update, - age_secs)) { - wpa_printf(MSG_DEBUG, - "Candidate BSS is more than %ld seconds old", - age_secs); - continue; - } - } - /* * TODO: Could consider allowing transition to another ESS if * PMF was enabled for the association. @@ -1198,7 +1185,7 @@ int wnm_scan_process(struct wpa_supplicant *wpa_s, bool pre_scan_check) wpa_s->wnm_transition_scan = false; /* Compare the Neighbor Report and scan results */ - bss = compare_scan_neighbor_results(wpa_s, 0, &reason); + bss = compare_scan_neighbor_results(wpa_s, &reason); /* * If this is a pre-scan check, returning 0 will trigger a scan and