get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2218570/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2218570,
    "url": "http://patchwork.ozlabs.org/api/patches/2218570/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/hostap/patch/20260401052713.3761478-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": "<20260401052713.3761478-16-peddolla.reddy@oss.qualcomm.com>",
    "list_archive_url": null,
    "date": "2026-04-01T05:27:05",
    "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/20260401052713.3761478-16-peddolla.reddy@oss.qualcomm.com/mbox/",
    "series": [
        {
            "id": 498338,
            "url": "http://patchwork.ozlabs.org/api/series/498338/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/hostap/list/?series=498338",
            "date": "2026-04-01T05:26:59",
            "name": "[RFC,01/23] nl80211_copy.h changes related to Proximity Ranging",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498338/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218570/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218570/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=WV2Vpcms;\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=ibZmr9N5;\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=HLVqksnk;\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 4fm6KC218Wz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 01:08:30 +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 1w7wEf-0000000FNpB-3zbw;\n\tWed, 01 Apr 2026 14:07:57 +0000",
            "from mx0b-0031df01.pphosted.com ([205.220.180.131])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w7o84-0000000DzqC-1M1B\n\tfor hostap@lists.infradead.org;\n\tWed, 01 Apr 2026 05:28:37 +0000",
            "from pps.filterd (m0279869.ppops.net [127.0.0.1])\n\tby mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 6314ElKc1579382\n\tfor <hostap@lists.infradead.org>; Wed, 1 Apr 2026 05:28:35 GMT",
            "from mail-pf1-f198.google.com (mail-pf1-f198.google.com\n [209.85.210.198])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d8mr2sw6m-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:28:35 +0000 (GMT)",
            "by mail-pf1-f198.google.com with SMTP id\n d2e1a72fcca58-82cdaf0f934so2362996b3a.0\n        for <hostap@lists.infradead.org>;\n Tue, 31 Mar 2026 22:28:35 -0700 (PDT)",
            "from hu-peddolla-hyd.qualcomm.com ([202.46.23.25])\n        by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82ca843e1desm15021223b3a.4.2026.03.31.22.28.32\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 31 Mar 2026 22:28:33 -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=WV2Vpcms0AyT+F\n\t5/KvmY6mdbg9b3C5I7tVtl4x9eFUm771zaDbdm/ToxucaeKCTbsjjdsy/N3naUGY9IkJdIrSjC2Al\n\tUr4So0CLNEDr8EecAcqyjWLghb4X/HRnja3Rm3jwAh5h79ifHtJTX0biWye3ZMD6Gq2uH9Jyo+Wst\n\tQstwkPGoWextoYroNNMQBJdL+b8jn+6LQek460MpP7J9FCZxrHP2CtgWGdnr9SGROmEmDSeL5ReWm\n\tqnUuxzpvwnbHBt9oi+6ir9eHGQUCmU1Pkdb+K61DOzy14z/4fh6JH++T/e1QT9GUHGxwn8zZJ8Ouu\n\thkjWKhp2Ts0nVz/bmcMQ==;",
            "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=ibZmr9N5ogICHAGIf00xQdcGndk\n\tsC2Cn0RKYniL7xqXJXJkJBM/RnzgpYnX6ANU+RAlQSoNNcwteC3qTLRyOMyw+V0f\n\tItimyoN2fSjARz7v9sdIKe8OSVWm4eYM74XL0wDyMTVGqIV+BeFHEelDRYh8n64N\n\tFfebnMFE561jeiJ1ptVPDBmyaEfGmCX0ATLHxpWcC0YFWYkfMP8NNjuxStR2yNmR\n\tizOScG/E7AZA8qBBhxycOcv+l3ZWp00+RSBmYfdz+uXnWKYHNgjqJce2lMD2Tjdw\n\tnTB1yDcTCf7DiYtMEi9TgJMSZpt8kHIvpkt6jKPHxi5QkNytzG7dcMt10ZQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=oss.qualcomm.com; s=google; t=1775021314; x=1775626114;\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=HLVqksnkZCLUAPt2fEDJJ7MrdN88WXgkpvgq/ULwzH30qWVSdtol1YnFuCmsKU5jCj\n         XYkamu4WwH9CH3U+kEcHPb2BMDCoxWod5HCmU+cOx4vakLuef6qrVOEVqNoHUm/oYcVc\n         tH7zmznmUB19ksprnkWwQ+hYYzvVo+UJSJfHOkgCeZGiP7OLLVOuH/sly28dhmQYISqL\n         DYv8gA3zoYx33oLCMPY57DAxcBmmnuFJ+5nY8KydUoCjAZqZeaVSt56tOyPdGvet42FN\n         LjFRZHyufSM6qKp9bT412JkaCP5RPY/Nu/p5HdbuWgu2N494aSYGwdh3VCjjKPC5Tahk\n         G6Zw=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775021314; x=1775626114;\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=kTp2k9GFCYTKLWkdy5xVwJkgnFDnufjQeKaIIfQfuMPxr4PbgFI9C6IyHdjdOocJUk\n         g+cQ2zVMHL+99jSdJEVIqpxpwVgKnAvvdXo9bbOw/7kThj/AdihxmZ0zJ56X10DR65Ad\n         syqfiTrblu/9giD1OIvRAohsCBVXl2ef08BXhqJ6rYrqD2bbtJVNhAv/D5pUM1gV5g9V\n         4hY7scDtAF2ofWt61JnVLjiNCElz/j9Z8ZfM7xdwNQT1jxs6GEKhrlN1H/3eIRT3tjdq\n         lOeMfIv8uyvH1/S0FSG4X6UA8zP4OpIJ3RJm5stbUZixvAMW9pnwr+fPlZnfay763003\n         /VVQ==",
        "X-Gm-Message-State": "AOJu0Yw64htUcm1rJvf2RYNExsBrxyDSiSWROth9ik/Z/sd3AWt/5T3I\n\tdwLDxDAFQNsyYB1pM7cWIHByBkQTEuB/UdfN1ktb/xOzf2h7uAo7iEyNUaYON4l9NvoFFuIhqo2\n\tjySzpNwMbI2p4736imhBmBMpgk2NxaU09GOEi8eAeBqu/CEMafG0mPUor29q6zN2shWi8hOU=",
        "X-Gm-Gg": "ATEYQzz+abrGVoGYlpF7P5cSFEPe/bEEw1vFCkEY67EEcAu6nVHqi7IatagP3SF+j+A\n\t4f9ijSAr+whnFiYQ1GWGnKuyghsuYKIyKp1EewTo8loJvR5BTkUCCCLcUbVIX04rjuD9aDWPOl2\n\tBVSu+iNIznPqbSyvfxGk+NH2rD8mY059jR18ZM+aBeVM+uKJsd/avpchH+rEWDVoJ6sqGms6HUr\n\tVE+Y2fRou8++ZCdwBt4e1KdU91DOB/qoqE2zQ0E8Oe4e26SJrGWF2NWa26AsYG6vk8i5QEUke3r\n\tX5fyjnsnXfESSZhmdkKf633BJ6ccUMBU59qWQzGLTIzpo6FWHrzGi/wgPjRi81FxorFfP6Y/SFX\n\tmh63K/t/skd3bVHQ40YO0geLY0IgVvvLJHzKjj83QnvgQSFX2TELKDsM=",
        "X-Received": [
            "by 2002:a05:6a00:2355:b0:81f:3f03:6846 with SMTP id\n d2e1a72fcca58-82ce8af1e1emr2676175b3a.47.1775021314329;\n        Tue, 31 Mar 2026 22:28:34 -0700 (PDT)",
            "by 2002:a05:6a00:2355:b0:81f:3f03:6846 with SMTP id\n d2e1a72fcca58-82ce8af1e1emr2676148b3a.47.1775021313778;\n        Tue, 31 Mar 2026 22:28:33 -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 10:57:05 +0530",
        "Message-Id": "<20260401052713.3761478-16-peddolla.reddy@oss.qualcomm.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20260401052713.3761478-1-peddolla.reddy@oss.qualcomm.com>",
        "References": "<20260401052713.3761478-1-peddolla.reddy@oss.qualcomm.com>",
        "MIME-Version": "1.0",
        "X-Authority-Analysis": "v=2.4 cv=B+O0EetM c=1 sm=1 tr=0 ts=69ccad03 cx=c_pps\n a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17\n a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8\n a=B5sYRM_di8rwXBYXhw4A:9 a=IoOABgeZipijB_acs4fv:22",
        "X-Proofpoint-ORIG-GUID": "uPXTmqOwBclvQGMk_sV0i6c6So5jGPuJ",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDAxMDA0NCBTYWx0ZWRfX1cUth2hUMrL9\n JZRkdIuQlKMQgZdbY7mr+35sGWMoJAG/e1PbUin7nFw65k0sbjnMcqVxuIbNkciKTZl4+oMpp2a\n 6oqB3xVnOu22/Io475qjv581upRnSk6A49vZjerG7De825NwocXtUpBdSzVq8SJLWElxfwUTBCi\n rHy5kOh8nFvzKzz4/RHsS9WRIhwxZV4j24080iQ/nLpUB3dDJ0WWbg57jRtNuPEixnOseC2HqxY\n RJTOPJYQ1V1q/vhymNadZqEWG7j4A0QdhfVi8CTJMCtcBkP6T55KWrbbA4RA9pwLRJxbeEN1zph\n B9LlkQ8CNZtr5Ty0xRN/lUenxHpd9w4WnHg4d9O8AB2DcEcDJdr9xJwLD/OYcT8DkUyEg2eXF1c\n Y6kvPW/V6XSpBLaj/RnIqdvS7lrTTfl660wlmKaX7zwAybizHMmvfPSXoGVZD5TvZ6hcyQD9Oon\n +dASmBTrNset9UrFkQA==",
        "X-Proofpoint-GUID": "uPXTmqOwBclvQGMk_sV0i6c6So5jGPuJ",
        "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 priorityscore=1501 impostorscore=0 adultscore=0 malwarescore=0\n lowpriorityscore=0 spamscore=0 clxscore=1015 suspectscore=0 phishscore=0\n bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound\n adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001\n definitions=main-2604010044",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260331_222836_484084_67A3F408 ",
        "X-CRM114-Status": "GOOD (  21.71  )",
        "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.180.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.180.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.180.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.180.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-Mailman-Approved-At": "Wed, 01 Apr 2026 07:07:49 -0700",
        "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"
    ]
}