Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218362/?format=api
{ "id": 2218362, "url": "http://patchwork.ozlabs.org/api/patches/2218362/?format=api", "web_url": "http://patchwork.ozlabs.org/project/hostap/patch/20260401054901.3780435-16-peddolla.reddy@oss.qualcomm.com/", "project": { "id": 22, "url": "http://patchwork.ozlabs.org/api/projects/22/?format=api", "name": "HostAP Development", "link_name": "hostap", "list_id": "hostap.lists.infradead.org", "list_email": "hostap@lists.infradead.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260401054901.3780435-16-peddolla.reddy@oss.qualcomm.com>", "list_archive_url": null, "date": "2026-04-01T05:48:53", "name": "[RFC,15/23] nl80211: Factor out global event BSS lookup and prefer PD BSS by wdev", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "506dfb03d4b59e8bd5932045c2f3b1cf48b7ca46", "submitter": { "id": 93026, "url": "http://patchwork.ozlabs.org/api/people/93026/?format=api", "name": "Peddolla Harshavardhan Reddy", "email": "peddolla.reddy@oss.qualcomm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/hostap/patch/20260401054901.3780435-16-peddolla.reddy@oss.qualcomm.com/mbox/", "series": [ { "id": 498276, "url": "http://patchwork.ozlabs.org/api/series/498276/?format=api", "web_url": "http://patchwork.ozlabs.org/project/hostap/list/?series=498276", "date": "2026-04-01T05:48:44", "name": "PR: Add nl80211 support and ranging for Proximity Detection", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498276/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218362/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218362/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=HqoeRBWG;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=mlW18xZA;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=W59Lky7Z;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flvGh4Flbz1yHR\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 16:50:36 +1100 (AEDT)", "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w7oSs-0000000E0u5-0ny6;\n\tWed, 01 Apr 2026 05:50:06 +0000", "from mx0a-0031df01.pphosted.com ([205.220.168.131])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w7oSp-0000000E0pa-42OC\n\tfor hostap@lists.infradead.org;\n\tWed, 01 Apr 2026 05:50:05 +0000", "from pps.filterd (m0279867.ppops.net [127.0.0.1])\n\tby mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 6312OnaK3081379\n\tfor <hostap@lists.infradead.org>; Wed, 1 Apr 2026 05:50:03 GMT", "from mail-pl1-f197.google.com (mail-pl1-f197.google.com\n [209.85.214.197])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d8kdktehw-1\n\t(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n\tfor <hostap@lists.infradead.org>; Wed, 01 Apr 2026 05:50:03 +0000 (GMT)", "by mail-pl1-f197.google.com with SMTP id\n d9443c01a7336-2b2497cc190so4312295ad.0\n for <hostap@lists.infradead.org>;\n Tue, 31 Mar 2026 22:50:03 -0700 (PDT)", "from hu-peddolla-hyd.qualcomm.com ([202.46.23.25])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b24268aa4fsm129919665ad.36.2026.03.31.22.50.00\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 31 Mar 2026 22:50:01 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=yQTiKqonZ/FlyhuD1r5AU7myL+0wHFu2rX4k7zXS6J8=; b=HqoeRBWGlEpBFT\n\thZX6EFmZ6AuCezjH/3ryS9iN+Fy4q1tiIrmkv5ckq9WUAYNAdsYKg3SzXBngipXUVNheTzbI99z7h\n\to60XasnJfhVLVBUfdb96DJrVJku2LYsdVJGmZWT1vqqfw5MUGrR8c23DalKJkbnqtpT/KqFeSb7OW\n\ty2cvtN/Oga3OYc/jW5KYhrAGgBMmy4ynAfYvoCcPPq+ngS5iKVOm3xShVYhBnGgbaKgwpHaG1ERg8\n\tkaGaJBWBAk3a5yClvZwv/33mXTVkuYVaBwjcINuwi4u2nt2OzxOXBZpqjyymPRLxzeGxapgjuyXva\n\tqVO5NN4v41KG/yCx3KtQ==;", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n\tcc:content-transfer-encoding:date:from:in-reply-to:message-id\n\t:mime-version:references:subject:to; s=qcppdkim1; bh=NNhMTAoKiNm\n\t8WJm9FO52HgNhoB1n+8K7z7y0zEK/Xfw=; b=mlW18xZAXu8uAVlT1l0V4vF1806\n\tTPEWrPrk3zSouy5au+htujisfQVgplKp0C3FX/OL2llyyBHcnzr4E7W58xI9rYnK\n\tnhO49LYkjTn6sCMWB1lIR+qBYE9kR1OUtWWzvlGUKNUl9d7oBAEY49ObnK6lplD9\n\tnKrWnL9mA+FtWZR7rqPK5WWzTVj/srN/zrSPvuwkBdM2ZPKI11YpDJwGfw4/qcPJ\n\tc0/SZa0t86yNDd3LsNB3dwb15ZibnYLPB9nOlsqWKQD6d2DYL+YXNPj1hrtiB5yz\n\t8Nb1QYDyXS6+Vul1BBKQCNKyM66aglXtAVDuJ8Is7Q8vzyldfTE0Nv+AIFw==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1775022603; x=1775627403;\n darn=lists.infradead.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=NNhMTAoKiNm8WJm9FO52HgNhoB1n+8K7z7y0zEK/Xfw=;\n b=W59Lky7Znwp36g4uS1xag5X4ydaZHKXbhFihiNbvJxbdQvlCyv59K66De5racS/AGS\n bM0ygVttBSvI2j2zrOTOmqV5CHoFMNFGqFFLWTTkvVyxmLH1hbVOVtBAfXSGKdZqYrB/\n xto0YaOxw0JhLqBUOq86Klhbu0+oWgMqWJ+mk9ERUcg7H/hgZZjILKLtKaqJB2Lh0FIg\n DZjr3AyYQfL8QfT2p5gXNTfIoGSlX3lCKXWzUm1yyutQ+mD7hOXgHRj7x+X8WZAAWQ4B\n YHusugNeFsMNH5SdiABmPjyLkfycHsUBhwZvBKitvUMxO9ACWjiB7IE+fn6YGquiGQLB\n EvfQ==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775022603; x=1775627403;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=NNhMTAoKiNm8WJm9FO52HgNhoB1n+8K7z7y0zEK/Xfw=;\n b=o+0GU+mIU114QHE1p44Gp9x0ZwAtlc6RD96DQkELW0+ttJ3jnNoyosHKevjiJzRRUi\n ZAeoKrroYNcfcpSwBZNojm5gWABuxyK6xzY4Dt/5cqZ7qgnECUSBKm77FdJhkKzWz+0U\n eDu5tlL6PPqKqYEAwBEHhqI7n+0jY5BZQMSVbOCUDMXM1NNpiCJnz3ezDhh3OjRRN1R0\n Y9AJH/RCx9PL13bQDr1b21e8nMsgxSKrwWVrQG6ehBpr1viB0s7MN9KXHEq/0OnWFrZS\n QhrDhWBrY3ngzFt5Z+EJY093ExMhDvwKj6ECZ6eFIPgDPBR7x0LRNW0UW3gDwAHd1Tcq\n 9GKA==", "X-Gm-Message-State": "AOJu0Ywne8mVrlD0CaTlh+ODj3wmeQ5DY46t7U/m+qjSG/Ay2Iveg1SS\n\toLH1RwRnA1m9f8pgMEyf5PjRXUMhfYSZCqAEiDfkYLW/B55EP0UUiB8Gs6zkcPnOGMnpD7xQotl\n\tKR+EaGkqOoOyaNsAq0rvR2yY3gfcBvDMTSTGL1QtrfEtiDp/UYGnHnGeILccCRMZeSg1ARrY=", "X-Gm-Gg": "ATEYQzw2GQRf/Z2pSPiiVoYfrDZ6qJHXLnYdAsZsEwDvrCQWthH5yTuHaRAIIua5a8y\n\trFzsLlUSAi5VL7dke/RgBPsJHTC14FRw9yfd6eJZjDiV1XPrKbq19UHP/2RvjPFchn58tRrsagN\n\tSwMVrcSB1svm6pTXpUfZVkY1oU2Y7VMG15UqJmtdA0VV3idMhw43UldiBIyKRmX7su1ybFjjMKB\n\tDOMT1D550u2f0BW0bv3m6nHDQ70qVf66nmwb86gnWAaZa57COAj/UJE4ZUngrh8y5PDfW0vKDUE\n\t4NRx+EhlII7S4yYIFGnFPwrOe7i+Sm7ztFhO54EWahANnqjDLi08hkc1oARmVFb/U4zCSew9G41\n\txDsdWPx8uBrGRQSQ1gfXGJC6i7HxfiM+IFVPB5V7LL4cQ1SkENbRvssY=", "X-Received": [ "by 2002:a17:903:37c4:b0:2b0:b7c6:4ae7 with SMTP id\n d9443c01a7336-2b25ee7b6d9mr56098505ad.1.1775022602707;\n Tue, 31 Mar 2026 22:50:02 -0700 (PDT)", "by 2002:a17:903:37c4:b0:2b0:b7c6:4ae7 with SMTP id\n d9443c01a7336-2b25ee7b6d9mr56098225ad.1.1775022602175;\n Tue, 31 Mar 2026 22:50:02 -0700 (PDT)" ], "From": "Peddolla Harshavardhan Reddy <peddolla.reddy@oss.qualcomm.com>", "To": "hostap@lists.infradead.org", "Cc": "vjakkam@qti.qualcomm.com", "Subject": "[RFC PATCH 15/23] nl80211: Factor out global event BSS lookup and\n prefer PD BSS by wdev", "Date": "Wed, 1 Apr 2026 11:18:53 +0530", "Message-Id": "<20260401054901.3780435-16-peddolla.reddy@oss.qualcomm.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20260401054901.3780435-1-peddolla.reddy@oss.qualcomm.com>", "References": "<20260401054901.3780435-1-peddolla.reddy@oss.qualcomm.com>", "MIME-Version": "1.0", "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDAxMDA0NyBTYWx0ZWRfX2jSTXaWd2iKS\n 7Jx9EzudWRu8yyQC9r+ae5xHpJgv7rGlA89YY9o+B8i0BnPgO+SP+As+qs6Pt73HqL6vHs5pLH2\n WqtmiPwoyHApFGCfDktK25AdPXxKD/lvGW1UOpKgokXISgDtJkycjv6Qfd7Mn2lBNtEvc5fgkgb\n fx9htm6rYXbRPqlVWyFS0opW+mbqpv4u9P3LltSlIqg/qFlp8AMtfEjEGc6FTuuEsWsowU7/Ie3\n Y2Q9+dA9Hq4MdSBJbp/bI9ChuID9QCBvoYntBlQxjstYhXaJt6Pt0/EuwapKiZGfy8EYQlH4NMz\n uRU1IfRihzp+1+qnn8YmqPyYiU2Xn+5l7rdTIwX/FvV4fWpuoGp8U2Yx0yp/5JF6jSCf+AgNqEW\n nbZzdphLYmIQsxMWjq9UhtWL0IA8+04cJ9m0getdwa1U3Wtq5sLwJ8P9LsptTG962CZEOQRtdMa\n 9rbiGY6FpVlE6O3EqAA==", "X-Proofpoint-GUID": "Rz1zz7IMKHEtoiLx4MjbrgRsnqZWAutf", "X-Authority-Analysis": "v=2.4 cv=YsQChoYX c=1 sm=1 tr=0 ts=69ccb20b cx=c_pps\n a=cmESyDAEBpBGqyK7t0alAg==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17\n a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8\n a=B5sYRM_di8rwXBYXhw4A:9 a=1OuFwYUASf3TG4hYMiVC:22", "X-Proofpoint-ORIG-GUID": "Rz1zz7IMKHEtoiLx4MjbrgRsnqZWAutf", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-01_02,2026-03-31_02,2025-10-01_01", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n suspectscore=0 spamscore=0 bulkscore=0 clxscore=1015 impostorscore=0\n phishscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501\n malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc=\n route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001\n definitions=main-2604010047", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20260331_225004_005443_CAEB9992 ", "X-CRM114-Status": "GOOD ( 21.99 )", "X-Spam-Score": "0.2 (/)", "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n the administrator of that system for details.\n Content preview: From: Veerendranath Jakkam <vjakkam@qti.qualcomm.com>\n Introduce\n nl80211_get_event_bss() to centralize BSS selection for\n process_global_event().\n The helper first tries an exact ifindex match,\n then uses nl80211_get_pd_bss_by_wdev()\n so that events with a wd [...]\n Content analysis details: (0.2 points, 5.0 required)\n pts rule name description\n ---- ----------------------\n --------------------------------------------------\n -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low\n trust\n [205.220.168.131 listed in list.dnswl.org]\n 1.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [205.220.168.131 listed in\n bl.score.senderscore.com]\n 1.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The\n query to Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [205.220.168.131 listed in\n sa-trusted.bondedsender.org]\n 1.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [205.220.168.131 listed in\n sa-accredit.habeas.com]\n 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record\n -0.0 SPF_PASS SPF: sender matches SPF record\n 0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from\n envelope-from domain\n -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n author's\n domain\n -0.1 DKIM_VALID Message has at least one valid DKIM or DK\n signature\n -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n [score: 0.0000]", "X-BeenThere": "hostap@lists.infradead.org", "X-Mailman-Version": "2.1.34", "Precedence": "list", "List-Id": "<hostap.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/hostap>,\n <mailto:hostap-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/hostap/>", "List-Post": "<mailto:hostap@lists.infradead.org>", "List-Help": "<mailto:hostap-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/hostap>,\n <mailto:hostap-request@lists.infradead.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"Hostap\" <hostap-bounces@lists.infradead.org>", "Errors-To": "hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "From: Veerendranath Jakkam <vjakkam@qti.qualcomm.com>\n\nIntroduce nl80211_get_event_bss() to centralize BSS selection for\nprocess_global_event(). The helper first tries an exact ifindex match,\nthen uses nl80211_get_pd_bss_by_wdev() so that events with a wdev_id\nare delivered to the correct P2P Device (PD) BSS, and finally falls\nback to the existing bridge/wiphy/wdev matching rules.\n\nThis avoids duplicating the lookup logic, ensures PD BSS instances are\nused when appropriate, and keeps existing behavior for wiphy-wide and\nglobal events.\n\nSigned-off-by: Veerendranath Jakkam <vjakkam@qti.qualcomm.com>\n---\n src/drivers/driver_nl80211_event.c | 91 +++++++++++++++---------------\n 1 file changed, 47 insertions(+), 44 deletions(-)", "diff": "diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c\nindex 2fa6e9728..d71b06d5f 100644\n--- a/src/drivers/driver_nl80211_event.c\n+++ b/src/drivers/driver_nl80211_event.c\n@@ -4585,13 +4585,48 @@ static bool nl80211_drv_in_list(struct nl80211_global *global,\n }\n \n \n+static struct i802_bss *\n+nl80211_get_event_bss(struct wpa_driver_nl80211_data *drv, int ifidx,\n+\t\t int wiphy_idx_rx, int wiphy_idx_set,\n+\t\t u64 wdev_id, int wdev_id_set)\n+{\n+\tstruct i802_bss *bss;\n+\tint wiphy_idx = -1;\n+\n+\tif (ifidx != -1) {\n+\t\tfor (bss = drv->first_bss; bss; bss = bss->next) {\n+\t\t\tif (ifidx == bss->ifindex)\n+\t\t\t\treturn bss;\n+\t\t}\n+\t}\n+\n+\tbss = nl80211_get_pd_bss_by_wdev(drv, wdev_id, wdev_id_set);\n+\tif (bss)\n+\t\treturn bss;\n+\n+\tfor (bss = drv->first_bss; bss; bss = bss->next) {\n+\t\tif (wiphy_idx_set)\n+\t\t\twiphy_idx = nl80211_get_wiphy_index(bss);\n+\t\tif ((ifidx == -1 && !wiphy_idx_set && !wdev_id_set) ||\n+\t\t (bss->br_ifindex > 0 &&\n+\t\t nl80211_has_ifidx(drv, bss->br_ifindex, ifidx)) ||\n+\t\t (wiphy_idx_set && wiphy_idx == wiphy_idx_rx) ||\n+\t\t (wdev_id_set && bss->wdev_id_set &&\n+\t\t wdev_id == bss->wdev_id))\n+\t\t\treturn bss;\n+\t}\n+\n+\treturn NULL;\n+}\n+\n+\n int process_global_event(struct nl_msg *msg, void *arg)\n {\n \tstruct nl80211_global *global = arg;\n \tstruct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));\n \tstruct nlattr *tb[NL80211_ATTR_MAX + 1];\n \tstruct wpa_driver_nl80211_data *drv, *tmp;\n-\tint ifidx = -1, wiphy_idx = -1, wiphy_idx_rx = -1;\n+\tint ifidx = -1, wiphy_idx_rx = -1;\n \tstruct i802_bss *bss;\n \tu64 wdev_id = 0;\n \tint wdev_id_set = 0;\n@@ -4644,50 +4679,18 @@ int process_global_event(struct nl_msg *msg, void *arg)\n \t\t\t struct wpa_driver_nl80211_data, list) {\n \t\tunsigned int unique_drv_id = drv->unique_drv_id;\n \n-\t\t/* First pass: Check for exact ifindex match for events directed\n-\t\t * to a specific interface to avoid incorrect selection based on\n-\t\t * matching rules for bridged interfaces. */\n-\t\tif (ifidx != -1) {\n-\t\t\tfor (bss = drv->first_bss; bss; bss = bss->next) {\n-\t\t\t\tif (ifidx == bss->ifindex) {\n-\t\t\t\t\tdo_process_drv_event(bss, gnlh->cmd,\n-\t\t\t\t\t\t\t tb);\n-\t\t\t\t\treturn NL_SKIP;\n-\t\t\t\t}\n-\t\t\t}\n-\t\t}\n+\t\tbss = nl80211_get_event_bss(drv, ifidx, wiphy_idx_rx,\n+\t\t\t\t\t wiphy_idx_set, wdev_id,\n+\t\t\t\t\t wdev_id_set);\n+\t\tif (!bss)\n+\t\t\tcontinue;\n \n-\t\t/* Second pass: Check all other conditions including bridge */\n-\t\tfor (bss = drv->first_bss; bss; bss = bss->next) {\n-\t\t\tif (wiphy_idx_set)\n-\t\t\t\twiphy_idx = nl80211_get_wiphy_index(bss);\n-\t\t\tif ((ifidx == -1 && !wiphy_idx_set && !wdev_id_set) ||\n-\t\t\t (bss->br_ifindex > 0 &&\n-\t\t\t nl80211_has_ifidx(drv, bss->br_ifindex, ifidx)) ||\n-\t\t\t (wiphy_idx_set && wiphy_idx == wiphy_idx_rx) ||\n-\t\t\t (wdev_id_set && bss->wdev_id_set &&\n-\t\t\t wdev_id == bss->wdev_id)) {\n-\t\t\t\tprocessed = true;\n-\t\t\t\tdo_process_drv_event(bss, gnlh->cmd, tb);\n-\t\t\t\t/* There are two types of events that may need\n-\t\t\t\t * to be delivered to multiple interfaces:\n-\t\t\t\t * 1. Events for a wiphy, as it can have\n-\t\t\t\t * multiple interfaces.\n-\t\t\t\t * 2. \"Global\" events, like\n-\t\t\t\t * NL80211_CMD_REG_CHANGE.\n-\t\t\t\t *\n-\t\t\t\t * Terminate early only if the event is directed\n-\t\t\t\t * to a specific interface or wdev. */\n-\t\t\t\tif (ifidx != -1 || wdev_id_set)\n-\t\t\t\t\treturn NL_SKIP;\n-\t\t\t\t/* The driver instance could have been removed,\n-\t\t\t\t * e.g., due to NL80211_CMD_RADAR_DETECT event,\n-\t\t\t\t * so need to stop the loop if that has\n-\t\t\t\t * happened. */\n-\t\t\t\tif (!nl80211_drv_in_list(global, unique_drv_id))\n-\t\t\t\t\tbreak;\n-\t\t\t}\n-\t\t}\n+\t\tprocessed = true;\n+\t\tdo_process_drv_event(bss, gnlh->cmd, tb);\n+\t\tif (ifidx != -1 || wdev_id_set)\n+\t\t\treturn NL_SKIP;\n+\t\tif (!nl80211_drv_in_list(global, unique_drv_id))\n+\t\t\tbreak;\n \t}\n \n \tif (processed)\n", "prefixes": [ "RFC", "15/23" ] }