From patchwork Thu Aug 29 07:28:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cermak Dominik X-Patchwork-Id: 1978277 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=T9F2bWG2; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=joynext.com header.i=@joynext.com header.a=rsa-sha256 header.s=selector2 header.b=H+upYk4v; 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 4WvXwF0QKDz1ydy for ; Thu, 29 Aug 2024 17:29:14 +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:Message-ID:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=A2enrCpc7SrfyI3YwAebWRjEY5txDUNBFKKvTC3u2X8=; b=T9F2bWG2HW41b4 HwUq505eXwtWkfTeTMI/rbWpqfiiz6sm4K0fDWozQxfJ4XW7ybf9/IJ0IAnrsWH6JoXiYfv2U7MrY zymstdZkCSQIMDrryyIS7SXm5pt1c7Gn2TQ817yQ1chwiEw2yvftW4O53qJkgFY+1jl62n607iabm ntynIFHK7Nd28P8evYQ1y9UGOGxEW6eDTf4j7nSN/F2NlsVkkwK3gnT0cwAfTi//vtsMpAp48oiWv SPLzq9w1Th1Zmw+FhQmVYFxWao1hp1733ZNhsNKJBXLZJIkBfLdnFTkWfwXzx87kFHjRjjhRaoekh 8gyZRzahg0UrH74MsKxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjZa4-00000000xKF-1RzC; Thu, 29 Aug 2024 07:28:32 +0000 Received: from mail-dbaeur03on20605.outbound.protection.outlook.com ([2a01:111:f403:260d::605] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjZa0-00000000xGl-32Y5 for hostap@lists.infradead.org; Thu, 29 Aug 2024 07:28:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AY1rvjWXu812MbimXfKHq0fkX4kXHS/9IFSyjUUt8pmECv0sYPHNABUXdFEJA5Zw75+poffEox4Tl3+vkqgB+F33zixH3A+JA68uI5zXIzjhtBVA/VLCMHvPLl3JID/lZMfNRYs2m278hLoadWPLvtLNlxDAkQpDZ/grnsPX4Q1w8GVDWaqeCBYq807YGrkQK3VSShOPu3LXBh92i3I7Ll9nKC7parayyo/A3uD0e18Xzwp15/Rzrb2HDLl+9d7BQFmu7ScE7borTjZnGA60cTle1prKuI16F6lvYD+4fiLPfL2BlHKdvkBFtb1QMJMr/ad6smv1SMy4lY8q0fOOIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/30pZrhWe4HTpjvzTklfGNJqnLqpVyhSGlwuv92BtP4=; b=vYyANn721tir0uovLgVNBXZ1Rd+utveCNyQxsEtgMPB5Ok+4DW63UWbX5zIqkgPOw7wVstlo2Wv7glmh94s9IjJnPjii3ENW078M7ztVga1PUqbo70nuMIZxXfAhI+xX/gTiWfzHsBhrAhEqWkS1syLJHk+6uzYkeCiWwmWNLumOny7sdoOAJ8t+iIEZY5wJNwhvPne+JDCteNYCQD6+WOgZp08IhvQ00Ir1cWSewAfpB2tLGwtgdq8Lpjt4hpqY1+UYFj044oHau0mTk5e2UyB5O0YccJ5jJ4pq3PW4Bw+40MN6UH9SMQgGsb4oxWs10/sCytBaom70kr2PV7L3mQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 178.249.31.61) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=joynext.com; dmarc=bestguesspass action=none header.from=joynext.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joynext.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/30pZrhWe4HTpjvzTklfGNJqnLqpVyhSGlwuv92BtP4=; b=H+upYk4vN3j6JKJHBgfmUZzeqzM8A0/bC92foF223nCcOrFXx0c6YlnRYlXFgCHFsshj/MHQfBmBTuJYePoesjqHIK9KUnvfSBeMd2HXugAEp1DTeRlrG7EUfoG5ZIx8CGTbPd/ue9JuhKdTUrI0SsSjnQiXSclk8PYXYJ050YRxktns1KzCaBkEh50l/44pW5S7c6ONRXJE65Yqs0QTkc1weQZYToIdN85UrE+Gg7h5G/bSo87D+m+bHWjqC/B3Ee+y+jLl4Pxnf3RqBgRcYBTSp0GZhEqD1M/Nzt6fEmV4iJKaQFVC3VAwxlIVqnZo60NDdVR/mC5ssCTFjpvwRg== Received: from DU2PR04CA0037.eurprd04.prod.outlook.com (2603:10a6:10:234::12) by AS4P189MB1920.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:4b8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.27; Thu, 29 Aug 2024 07:28:21 +0000 Received: from DB3PEPF0000885B.eurprd02.prod.outlook.com (2603:10a6:10:234:cafe::9b) by DU2PR04CA0037.outlook.office365.com (2603:10a6:10:234::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.27 via Frontend Transport; Thu, 29 Aug 2024 07:28:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 178.249.31.61) smtp.mailfrom=joynext.com; dkim=none (message not signed) header.d=none;dmarc=bestguesspass action=none header.from=joynext.com; Received-SPF: Pass (protection.outlook.com: domain of joynext.com designates 178.249.31.61 as permitted sender) receiver=protection.outlook.com; client-ip=178.249.31.61; helo=mail.joynext.com; pr=C Received: from mail.joynext.com (178.249.31.61) by DB3PEPF0000885B.mail.protection.outlook.com (10.167.242.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Thu, 29 Aug 2024 07:28:20 +0000 Received: from dedrevmex03.Joynext.com (10.61.8.146) by DEDREVMEX04.Joynext.com (10.61.8.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 29 Aug 2024 09:28:20 +0200 Received: from dedrevmex03.Joynext.com ([fe80::611c:637f:4f37:e22]) by dedrevmex03.Joynext.com ([fe80::611c:637f:4f37:e22%15]) with mapi id 15.02.1544.011; Thu, 29 Aug 2024 09:28:20 +0200 From: Cermak Dominik To: "hostap@lists.infradead.org" Subject: [PATCH] nl80211: Pass "global" events to all interfaces Thread-Topic: [PATCH] nl80211: Pass "global" events to all interfaces Thread-Index: Adr55LJEewEjl4p4QXK/n6dv/2bnZA== Date: Thu, 29 Aug 2024 07:28:20 +0000 Message-ID: Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.61.128.29] MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB3PEPF0000885B:EE_|AS4P189MB1920:EE_ X-MS-Office365-Filtering-Correlation-Id: 20f730da-27d5-4a20-72e1-08dcc7fc28c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?q?o/bh0BkVMRa1EIWNPyVWsa5t6TPFCAx?= =?utf-8?q?Bv6/WvCMYyaq01rzY9K4Ttx4g58TMc4GuC8uQWIdm5asplJvlwViO7Xh0cecLjbPE?= =?utf-8?q?Ez5CNgWxgvvuu7mnp5aa79SASrAFkT0w+h0b5ntFKwxyg4v935bTaAPbnsEPxWHLK?= =?utf-8?q?nI3lwLSM/pwdU9ax5QTYYEpvz0fKuLR6FEVHdwzUFCd/CstfUN9xzuTYnCgK3Agyi?= =?utf-8?q?q5rkP7UVh7jpyhSexfkrT/08eHAP3fxpxSvQ/7fz1RWxoaxdKdFGyZLRI43QMQyl6?= =?utf-8?q?mfidkW1GehIsVGisGuKtQ+MdUcIngP2ltp++dQ2tEqUID5QI5QQszDSdADadeUoJ1?= =?utf-8?q?xjFe8TjAJTk0iXZQzKYRjvD31p2sAAy0wO7ujw0TyNkMyuDVf8FMPPapujRAf0hiK?= =?utf-8?q?fw783B7P+nwNWjBHdOJOVhGc1aJ7a25uYB7B+mP1BwJ1biUMewEF0pk6q+PsAXmhE?= =?utf-8?q?ZdCO7/04oZvYtx+MiIMjaUuTzKuvQ752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vKgKNKlXDgXc+zmYXAAG3NTrMMoPeIDB8q?= =?utf-8?q?kr9eIY1eVcr?= X-Forefront-Antispam-Report: CIP:178.249.31.61;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.joynext.com;PTR:ip-178-249-31-61.static.reverse.dsi.net;CAT:NONE;SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: joynext.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 07:28:20.8217 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 20f730da-27d5-4a20-72e1-08dcc7fc28c0 X-MS-Exchange-CrossTenant-Id: b953e8d2-f5f3-4cff-a9b1-e5b91ce608ad X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b953e8d2-f5f3-4cff-a9b1-e5b91ce608ad;Ip=[178.249.31.61];Helo=[mail.joynext.com] X-MS-Exchange-CrossTenant-AuthSource: DB3PEPF0000885B.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4P189MB1920 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240829_002828_797956_41607D13 X-CRM114-Status: GOOD ( 14.64 ) X-Spam-Score: -2.1 (--) 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: Extending commit f136837202393a7e1f3182e9efdbf1aaa0c1a5c2. We got connection failures because of outdated channel information. That's because the NL80211_CMD_REG_CHANGE event is important for all interfaces, but the early termination still kicks in because it [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 ARC_SIGNED Message has a ARC signature 0.0 ARC_VALID Message has a valid ARC signature -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -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 Extending commit f136837202393a7e1f3182e9efdbf1aaa0c1a5c2. We got connection failures because of outdated channel information. That's because the NL80211_CMD_REG_CHANGE event is important for all interfaces, but the early termination still kicks in because it is not directed to a specific wiphy. Therefore from three interfaces, only one got the updated channel list. Fix this by changing the early termination logic to only apply to events directed either to a specific interface index for wdev. Signed-off-by: Dominik Cermak --- src/drivers/driver_nl80211_event.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index 903207067..8e79b5848 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -4257,7 +4257,13 @@ int process_global_event(struct nl_msg *msg, void *arg) wdev_id == bss->wdev_id)) { processed = true; do_process_drv_event(bss, gnlh->cmd, tb); - if (!wiphy_idx_set) + /* There are two types of events that may need to be + * delivered to multiple interfaces: + * 1. Events for a wiphy, as it can have multiple interfaces. + * 2. "Global" events, like NL80211_CMD_REG_CHANGE. + * Or in other words, terminate early only if it is + * directed to a specific interface or wdev. */ + if (ifidx != 1 || wdev_id_set) return NL_SKIP; /* The driver instance could have been removed, * e.g., due to NL80211_CMD_RADAR_DETECT event,