From patchwork Thu Aug 29 08:01:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cermak Dominik X-Patchwork-Id: 1978290 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=Bt8NoqEL; 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=PI7qMU8z; 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 4WvYds3M78z1yZ9 for ; Thu, 29 Aug 2024 18:01:53 +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=Nti+bWhCZdArNtgCHCb/m8LC2iNDIl+vlUZNI2ZPQ+k=; b=Bt8NoqELnoYwsG POsI8ztSKziRCtldKTKM13JDX1S1rX/6YKrg8E/vsU3llarM0SNj1puXxh0bHDTHoK8YuBYP+nffi p6AiGiWtLk4gay9v3YhM55me21qQ6i61NR+diI64T4uin8Uf3qAjAYmk3Orwpmt5grQJCMKf+S59r 6sgo+ojW3P9oph85ZfuogEVBeG0JVI07ANNRnyiqP5zGGoNvChUVN7i73KlgdxOCrMPEafTv9yUvz hf98RWMZpDfPrGqcL/wgiR4xlC5dCtJrLR/l11MzIP99dif6PhDVGNUhNpJs5/qFkyYr0PKNh8X53 Ro4l+NFruw3nSqO3R42Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sja60-000000013yQ-35Cd; Thu, 29 Aug 2024 08:01:32 +0000 Received: from mail-db8eur05on2060c.outbound.protection.outlook.com ([2a01:111:f400:7e1a::60c] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sja5v-000000013wC-350l for hostap@lists.infradead.org; Thu, 29 Aug 2024 08:01:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CaywxNhjB9QpJkLrAizo5D5oMnsqjMIULnFNqm/h5EoWMIcPykaI2NKs5adarOOsjPX/rsg2GMgVIF7PAP9wn4PvZSyNfEGAiylf8ZZbcDkmzbwh+zqFU0uKUzrwakGcOjkHvlB3OGxkRmWeB/P4oPaHP+oCWsv8HSlGQb9deSRE4QAX47VmWckRT0mhC6Fl2nlXzyv0pkiKZjatJOlMvSPR68CsHkQQ2fgaOR8yta7xp2jqAHc7Fwc1NqVzeQyVinZXeZKvZu89DPSAXZPTtlqxh9Yt1SlqYTcJckQ4IrWHsS1cMdm3IaA8hrxROBXn/TifGRdNo8LID0EDazVmNQ== 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=Jqnz5lYcasrOZpLfIcYQuzK33VwrV91pSyQi4reP4sc=; b=BLuWMWvSv2ZLDlYl2WtY38QK8rUr5yilYrT845aB78z4Xbg+W8Q5KekWWycBOqDg6ajWjLws7Awm+X3T430dHFj7+yqWZ06cK5snZAZ0lxklcQ5JBOUkirAbOlg4yMqD+ZTwOgLCaFDtQa8PdgdYxXe+DsjRCaQUzXx3yJY8X3YM5NXKwXFzjV1Ma+hXa1MNsihNSaUYadQmHdgWq0Z02kMtqQzIpTX34I0s57+S2qBDVjRycM/LiZiY6Z5aKHz8lB2mScxXj59W//xsb8j7fBRwH5r8mlAD6JZP5II1f0DcDkjBpcxvZoxv4uHMRuWzsq950oFhesmdHkV144utmQ== 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=Jqnz5lYcasrOZpLfIcYQuzK33VwrV91pSyQi4reP4sc=; b=PI7qMU8zxeyqUatVlGndmAD+fax+SofGUkVd0HZDtlO8mD72bTVZLs+ngk3jdRXUeDdpewZ+MXAypNVKn4buxwLdm5QXysIqxgcTb3HAU29xFwEx/SUvG7hqI0blWlYmhwJoUhMaKGHBCWQ67GZS2d4soXVvv0oCoX/393BG8VTNUyFgCHOStZqF/L/wzvjgNMxzcuW4FAOYmUW1gGuIUbzSjENshv8BaPo54T/dGAHGpFPuCOfWtmrpeTqxgttHcyCbJBBkcUNmDqBFOxIjUpZist9XTsknsuRabcEBSRCtffhRBSFI88Yb4MC4pt0A1ul0M65vpC55VIoxPt27uQ== Received: from DU7P189CA0009.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:552::24) by DB8P189MB1126.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:168::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.28; Thu, 29 Aug 2024 08:01:22 +0000 Received: from DB1PEPF000509E7.eurprd03.prod.outlook.com (2603:10a6:10:552:cafe::47) by DU7P189CA0009.outlook.office365.com (2603:10a6:10:552::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.20 via Frontend Transport; Thu, 29 Aug 2024 08:01:22 +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 DB1PEPF000509E7.mail.protection.outlook.com (10.167.242.57) 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 08:01:21 +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 10:01:21 +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 10:01:21 +0200 From: Cermak Dominik To: "hostap@lists.infradead.org" Subject: [PATCH v2] nl80211: Pass "global" events to all interfaces Thread-Topic: [PATCH v2] nl80211: Pass "global" events to all interfaces Thread-Index: Adr56Yce0Q4OhVtaQ16MHJMVKb8UBw== Date: Thu, 29 Aug 2024 08:01:21 +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: DB1PEPF000509E7:EE_|DB8P189MB1126:EE_ X-MS-Office365-Filtering-Correlation-Id: 3253a7e5-a35e-4cbc-43d5-08dcc800c591 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?q?DUcCn95RIs1GMAzLt1cFYsytgOtSmfd?= =?utf-8?q?GC6Jbt4jMjWkaBo13cqTQs5a9HUP551bnky4R5fhHtSLDda0WukFRiknW7zFbRGBB?= =?utf-8?q?CbI9CLYDowG/BcWa9XVFh9K+KlpdZbqd6txGR83tZN0xv+7kYa1ERX9+ZHfNefnXz?= =?utf-8?q?0NVxUSlZt4vkiroZAGmDARAVWybTXZLI0vsvN24ezFooAjs1XWTdk2kZz2+U3VkYw?= =?utf-8?q?o1kpICusXPASfMxxVgcd/B55qq6QCZIrOaEx5KQAcrQLffqoO3PM3RL5cR9PeQkxz?= =?utf-8?q?fz3j+sp2bEJEUvYOu3k8vLFcsK4+oB46vURbcpMDwrJXzrSLRTIBS47IQxT6xtAsj?= =?utf-8?q?2MF0UsP8Vz8vn3LWYidQ6NKxRpDxeHo+1bo37eyUC/j9NoFnnEzy4XcLSEh5EFazP?= =?utf-8?q?0HzDSjd/f1xiLvCfel0JrwwGBu3BjO8GplhCvVtKu7VsFw8ngZkWdr39nNmiF1pzu?= =?utf-8?q?Xzj7HBvZ2mlK9sKW43T1O23mkwmRCvyHx4N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KI3vPfrkI9vuJfVX8vraGvryrvNzngI5pYsBi2Df?= =?utf-8?q?kEWn1ADtta3?= 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)(376014)(82310400026)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: joynext.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 08:01:21.9329 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3253a7e5-a35e-4cbc-43d5-08dcc800c591 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: DB1PEPF000509E7.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8P189MB1126 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240829_010127_843298_B1285F0F X-CRM114-Status: GOOD ( 14.91 ) 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_PASS SPF: HELO matches 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,