From patchwork Tue Feb 20 13:18:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Berg X-Patchwork-Id: 1901472 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=lKKaHMvF; 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=tpWIsQVy; 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 4TfKkc0b2jz23d0 for ; Wed, 21 Feb 2024 00:19:36 +1100 (AEDT) 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=wTa18eMdY2g0LkItOiGeAuDY6kP+2mlPrY23G65+TYA=; b=lKKaHMvF8uygQJ zoy1EEPIfZ6+v0pI6XeF93U3ZL0lDSfg/LU2fGyzXmRDd7ykIszjMjLZDUWRCCx1oL5ong4yr37Tj c06TsvFJPw96y23S4JJuWnfBd5x/d25wQ5ArDm8UOxl0/XfS4eaQahVQuw6TcuRLVLNAKUs2fdADp yXaxqlFYs9A/Zl1tsvrF2hHztPd+9Y5bD6WWtszKCOJ7OmLuzIP8DMotvrzcezy1b0Knn21zLvWEt h/3CZ4ZubpZ0O9jak3mBRwzRBd/RUHsjlGogzFEYTjtjnxQRoCQheF5JoXa7YH5RcZYgAkObbSOCk V3KdKpD3f86JMK+gFClw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcQ1p-0000000EpDW-1zBS; Tue, 20 Feb 2024 13:19:21 +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 1rcQ1a-0000000Ep1C-19ki for hostap@lists.infradead.org; Tue, 20 Feb 2024 13:19:09 +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=BJ56M+xuXzg0prSpkMF4xTCjWJ68NWQ36pJy5C9nln8=; t=1708435144; x=1709644744; b=tpWIsQVyXUKwYnAfNJ6XxUcUd6X2D5W3tbrX3D9BZjwyfkV uLs2gqYDq7TzMBYVrOy1M0nnrYOWVgELhUz8JRHTN2lOpioThEpUNohLsM2ZnozXjpBMalUTHI5Eq XndjDioAqImsqeB9EUqUqk0EHs8LopKTjp6mLAFUtkhk4Bz0uDY1HCTT1s8ttBxrskvt4R+5IR48g f3c0IHUyd2f7d7Iz0bIZit7OiOcfxzBJeT8K3kGCqKEKDVUtDWSRkLQbKNkVbcgX5GFAsiAo3Mcxo 2A6utUffGbG8ZBAEgnNebt5njBDYLoNts+sRHYxqI+WSha6/jDU253E5PCiloEKQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rcQ1V-00000000ugq-2UZg; Tue, 20 Feb 2024 14:19:01 +0100 From: benjamin@sipsolutions.net To: hostap@lists.infradead.org Cc: Benjamin Berg , Benjamin Berg Subject: [PATCH v2 06/20] Use for_each_link where possible Date: Tue, 20 Feb 2024 14:18:13 +0100 Message-ID: <20240220131827.17766-7-benjamin@sipsolutions.net> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240220131827.17766-1-benjamin@sipsolutions.net> References: <20240220131827.17766-1-benjamin@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240220_051906_335053_C055D8B2 X-CRM114-Status: GOOD ( 11.47 ) 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 This takes care of the places that the spatch did not catch already. Signed-off-by: Benjamin Berg --- wpa_supplicant/events.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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_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 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 T_SCC_BODY_TEXT_LINE No description available. 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 This takes care of the places that the spatch did not catch already. Signed-off-by: Benjamin Berg --- wpa_supplicant/events.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 42cde3c8a..cdc17b3c9 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -4034,12 +4034,9 @@ static int wpa_sm_set_ml_info(struct wpa_supplicant *wpa_s) wpa_mlo.valid_links = drv_mlo.valid_links; wpa_mlo.req_links = drv_mlo.req_links; - for (i = 0; i < MAX_NUM_MLD_LINKS; i++) { + for_each_link(drv_mlo.req_links, i) { struct wpa_bss *bss; - if (!(drv_mlo.req_links & BIT(i))) - continue; - bss = wpa_supplicant_get_new_bss(wpa_s, drv_mlo.links[i].bssid); if (!bss) { wpa_supplicant_update_scan_results(wpa_s); @@ -5863,13 +5860,10 @@ static void wpas_tid_link_map(struct wpa_supplicant *wpa_s, pos += res; if (!info->default_map) { - for (i = 0; i < MAX_NUM_MLD_LINKS && end > pos; i++) { + for_each_link(info->valid_links, i) { char uplink_map_str[9]; char downlink_map_str[9]; - if (!(info->valid_links & BIT(i))) - continue; - bitmap_to_str(info->t2lmap[i].uplink, uplink_map_str); bitmap_to_str(info->t2lmap[i].downlink, downlink_map_str);