Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218370/?format=api
{ "id": 2218370, "url": "http://patchwork.ozlabs.org/api/patches/2218370/?format=api", "web_url": "http://patchwork.ozlabs.org/project/hostap/patch/20260401054901.3780435-24-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-24-peddolla.reddy@oss.qualcomm.com>", "list_archive_url": null, "date": "2026-04-01T05:49:01", "name": "[RFC,23/23] provisioning-ranging: Add dedicated ranging socket and timeout handling", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "9d37a845b4b95007db32e71ef363059140130f23", "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-24-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/2218370/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218370/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=f8P4MHkC;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256\n header.s=desiato.20200630 header.b=FrulQ/c4;\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=I8idcWcc;\n\tdkim=neutral header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=JGGJf3+a;\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 4flvJ44W8bz1yGH\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 16:51:48 +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 1w7oTs-0000000E2P5-0lUy;\n\tWed, 01 Apr 2026 05:51:08 +0000", "from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w7oTg-0000000E26w-02h4\n\tfor hostap@bombadil.infradead.org;\n\tWed, 01 Apr 2026 05:50:56 +0000", "from mx0a-0031df01.pphosted.com ([205.220.168.131])\n\tby desiato.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w7oTC-0000000HABR-0P19\n\tfor hostap@lists.infradead.org;\n\tWed, 01 Apr 2026 05:50:52 +0000", "from pps.filterd (m0279864.ppops.net [127.0.0.1])\n\tby mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 6313VFIX1459000\n\tfor <hostap@lists.infradead.org>; Wed, 1 Apr 2026 05:50:18 GMT", "from mail-pj1-f70.google.com (mail-pj1-f70.google.com\n [209.85.216.70])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d8uhg0ft6-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:18 +0000 (GMT)", "by mail-pj1-f70.google.com with SMTP id\n 98e67ed59e1d1-35c1874336aso18725884a91.3\n for <hostap@lists.infradead.org>;\n Tue, 31 Mar 2026 22:50:18 -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.15\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 31 Mar 2026 22:50:16 -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=sPEtJmnA9H8mZSbRCNHWd+YPj/RXuIHEopRqLSbxwm0=; b=f8P4MHkCjbgi9a\n\tAO/Hi1rD4YHIBXhLX1FsH7tU1p/FFQLcW5jp/H1Hcgf21tT2dr8DRtlurJeyWgbdbM/qaNFXblalF\n\tHUR65IwpdpmZ14Y6a6fv76v4qH2mIIAPGAicMKbbqHVVjpgNCPOROuftgKqTpXLCzVCn8oblT1jkQ\n\tQMb3RUXbAmkPacMkvKNjte0oEXuvCsPFf++lpKiEBAtvv+/sbFvwRNfkGlqt48M4R5ej1/wAf+eHe\n\t8voVekA6+E203YXtnouxr3D7hdV/OkkXlmggCj4RZL4kYSFAfcfZ4NwRrE8JRzMS6OsMNMles2IxU\n\tXjGL2nt3411x0WdpyvYA==;", "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version\n\t:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:\n\tContent-Type:Content-ID:Content-Description;\n\tbh=FeCJ6Z4h/ZLgplqVXAoFjugG2uvRLCMIy4pA25S/MkI=; b=FrulQ/c49Zou9U7FORnDaqDWTZ\n\tceCtRxsiMThLn7++DnloxyoL9v6V1p3KUNa8+C9Pv5qhWwHWJgXmn9qfKGH2VSu0zQ1IQCdAV+/SO\n\tYmbfyFTtmj7yZHVXhYOs0Z86AxNCWerfyUukKTwwmUy40M/HzloJt0aHXn3f5CaMYvrm45wMFz16X\n\tswP0BMNHYygDs9f9Go3JtDsxFhR5FidqElTdHeW8mvWZED1TXBuLiQ1c/pqM6R8Ymv/7T+QXoGkdK\n\taHSq2Cmb830d/wVUUNdmApi5UcSSVBYHEa37jKt3OUiTPg8FOEjC+0IVorU5H8iVZoL+J1paNIzx+\n\tBdLGv4QQ==;", "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=FeCJ6Z4h/ZL\n\tgplqVXAoFjugG2uvRLCMIy4pA25S/MkI=; b=I8idcWccPBf/t90xKuvdnK+puD8\n\tXcnabOSC1qODm9JNKtGizpV8co/Cs7VwPXhe90bguEsx/HHxZLjrdREYLbmvZNb/\n\tb9JXwi3dyUzza5UJJL8MvXP9/i8KVvwW5SLqt/EuYwF7+gpkH5unKolZPz7x2b8J\n\twQIzyLoY8AgoZVT0RqA3jk+NemiTl9XSpAWcsUz38P5znijLwvaePJFm2+NWUmxg\n\t1aNllhmDNCQrhhrQplNebYAfvrYcJjye0z8VJutXc3diOuZQvQ1mdlb4Kt23tn0S\n\tTwDm9w4crPO+IvrN4TfemZ8DKxbfFNsgnytoRlicjZoIRR2eimTAxey22xQ==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1775022618; x=1775627418;\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=FeCJ6Z4h/ZLgplqVXAoFjugG2uvRLCMIy4pA25S/MkI=;\n b=JGGJf3+aRNvb8pN+YALirZAJ87h6BLojZOQ5Vm+hvmEWlM6EGbczdqx9n3ajA3F2/h\n GrEbSXYCVTCzEYfg1PJFsDPebm1TDqhpP8ZBB5sOkRubD6zUzBg5FfVSd9aPWXtAbH7t\n MmFPM+sz+aMMDmjxad5jvtDokM1svxfLtShGVSchZQt9PpBf9e7WGWZXmfs8BPzeymFd\n A/m2iPnK8ynSq7OMgqi033X26DQv/dTsOxe7HvxGKZCP5cVQP6NJbckR7GWFKETwZT1I\n 93R84fkWB4O6jSssv+GY1f2NVzBu7bAYDsORikVg7zFIwCMfUdoVdFZ50Vvyo5kMFx+s\n 9oRg==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775022618; x=1775627418;\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=FeCJ6Z4h/ZLgplqVXAoFjugG2uvRLCMIy4pA25S/MkI=;\n b=Wno+7FbeC0VaILI0rBz8m3afkQ0KjZZ11TEWyfoWhMeSfUCZaOHxrSJ4nj46qhqADg\n TYZIEe8VRj8Zqav59iGp8QFdtcg4ci3iT8UhFWZcDjpxJ6DJXR0U+xtLE6SkZ2UC9yhP\n wP0CYcShOaMMgqUUvftYXeGglrHxr4uyNaV+ovD5ao1jzEAYAj8EEHWb0BvSPVss0Ek4\n K8hccsnZYU1CoAdXPemkBc7+DMyPIBWskMsKhXXlUElTGVaboxtAAS6TLpg88oFHy6Gj\n uNJvMthnC01yPdMf8VP1dMEq+k1xtN+jzGZe1TeXepmQE6keSUfrwUTTeLkIbSeMa+ER\n zwAg==", "X-Gm-Message-State": "AOJu0YwKGRtZG6aiHFBgOeCzTZLDqraFAvJzI7aKTbEFjgYahWulsRch\n\tO5YfSjvb+LC0XU+bHsJ00iPEKeqv93cFwz3WWewrNlvNiKd38Vlo1C/fdwZiODTy3oNwr8Ypc+H\n\tQIPrKPEh/hy3qy5kCSqFMzF836QHhWvHyjQ0gc8x/hAZJd1Q2PqkafUwZ45+Kn4TkkRyfSnE=", "X-Gm-Gg": "ATEYQzxgLV14beSWNyjss+mMt4ZWzmxqs7lUUxJAimhTnzMVs8DAlMo45IYpacL6cnk\n\t356mFxt1ruNzy4BlHRECuXPtATHT5wFza+fuVQPjIf9cOGV/S2qJkn6UlZrEK4BDpzlrmyOIRkB\n\tr+8s0pBHKKsjrmtLCJ5YwBL39L2OY5ZuDOWqXyr6HtCvqVdRvRmE6m97Qz+1TN79Q54Xoj8X8TE\n\t7Q/LbegE62BWQWB773wDg5vCSk45OdwbVD4O0xEUoHqxVrzBeAIDBvzxh9rUKYDMEPanOgLCXDG\n\t5f84r1rvwI7gt3biPegj/o5KFFuJKPfPpFmVpAtyInpXFUZYP3hHh/3xVGugzqbq7oX0GHe8q2Z\n\tZ1mpCwda95yunbfrw6DreCtiW3TR7h2TPxokFLr4vSWtH8/L1jDjuV4I=", "X-Received": [ "by 2002:a17:90b:37cf:b0:359:974a:3d65 with SMTP id\n 98e67ed59e1d1-35dc6f605aamr2021635a91.16.1775022617702;\n Tue, 31 Mar 2026 22:50:17 -0700 (PDT)", "by 2002:a17:90b:37cf:b0:359:974a:3d65 with SMTP id\n 98e67ed59e1d1-35dc6f605aamr2021607a91.16.1775022617129;\n Tue, 31 Mar 2026 22:50:17 -0700 (PDT)" ], "From": "Peddolla Harshavardhan Reddy <peddolla.reddy@oss.qualcomm.com>", "To": "hostap@lists.infradead.org", "Cc": "vjakkam@qti.qualcomm.com", "Subject": "[RFC PATCH 23/23] provisioning-ranging: Add dedicated ranging socket\n and timeout handling", "Date": "Wed, 1 Apr 2026 11:19:01 +0530", "Message-Id": "<20260401054901.3780435-24-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": "AW1haW4tMjYwNDAxMDA0NyBTYWx0ZWRfX2KoPNN0QaNcL\n 1RtVvrR5U4lDk0dx6gPiW6k82kwoU13EYP0noO1rh92AYf5TwYiQf96rzuSzXWA1TOxkuJyBfRZ\n XcFsDR9D+Tvs3ObT+SIRihJAZusBHXaIebJos3FLxuBAL450Pp99zmclpABcnSW+zpLlPM4LOTM\n oE2KIjcsStKTUntbLzB90mXizyi/VwdSn88d9uvVn7BTlului4QcM0b8N9jf/6nTvTvRPv9RpR/\n U4FFCzCfisVdwd9rEJPM++Uk9i+2ECHjM4gy/UuaSCDiy/FVJ2PbaxPZ1MpZf3f+AzflcuKENGz\n FuLuhWhaJeJivios9V2vyncU36hT7nQicVVBryWfoSDJ+dX47wdn25Ne0y57gdEYPpC1Glyl5/I\n oewfH0QQiCaT8nlkhKPweGXtZPVy8F1NLYMnC1lyLIYaItMBbDEVg8E8zyuwxqc14GUv2sd12dr\n kLK3oC0N0IrDBpHVtEQ==", "X-Authority-Analysis": "v=2.4 cv=YcawJgRf c=1 sm=1 tr=0 ts=69ccb21a cx=c_pps\n a=0uOsjrqzRL749jD1oC5vDA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17\n a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8\n a=cLWFh1L1g1jej2EwSaUA:9 a=mQ_c8vxmzFEMiUWkPHU9:22", "X-Proofpoint-GUID": "KBNnse7Nl-EHE2gi40PyAkbsbeDe6kC9", "X-Proofpoint-ORIG-GUID": "KBNnse7Nl-EHE2gi40PyAkbsbeDe6kC9", "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 phishscore=0 priorityscore=1501 adultscore=0 clxscore=1015 suspectscore=0\n malwarescore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2604010047", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20260401_065040_085431_33047760 ", "X-CRM114-Status": "GOOD ( 24.91 )", "X-Spam-Score": "2.1 (++)", "X-Spam-Report": "Spam detection software,\n running on the system \"desiato.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: Use a dedicated netlink socket for ranging commands and\n track\n it in struct pr_data as ranging_sock. Create the socket when starting\n ranging\n and pass it down to the driver via wpa_drv_start_peer_measur [...]\n Content analysis details: (2.1 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 -0.0 SPF_PASS SPF: sender matches SPF record\n 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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.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 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_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]", "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": "Use a dedicated netlink socket for ranging commands and track it in\nstruct pr_data as ranging_sock. Create the socket when starting\nranging and pass it down to the driver via wpa_drv_start_peer_measurement()\nand wpa_drv_register_ranging_eloop().\n\nAdd wpas_pr_ranging_socket_timeout() to close the ranging socket,\nfree PASN ranging parameters, and clean up the PR interface when a\ncontinuous ranging session times out. Ensure this timeout is canceled\non:\n\n- ranging start failures\n- successful completion of peer measurement\n- PASN success transitioning into ranging\n- ROC cancel / PR interface cleanup\n\nOn measurement completion and error paths, explicitly destroy the\nranging socket and clear pr_pasn_params, and call wpas_pr_pd_stop()\nto stop the PD wdev. Also cancel the PASN timeout once PASN succeeds\nto avoid premature PR cleanup while ranging is in progress.\n\nThis avoids leaking the ranging socket and prevents use-after-free\nissues when the PR interface is removed while a timeout is still\npending.\n\nSigned-off-by: Peddolla Harshavardhan Reddy <peddolla.reddy@oss.qualcomm.com>\n---\n src/common/proximity_ranging.h | 3 ++\n wpa_supplicant/pr_supplicant.c | 99 ++++++++++++++++++++++++++++++++--\n 2 files changed, 99 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/common/proximity_ranging.h b/src/common/proximity_ranging.h\nindex 6f597410f..b845b4213 100644\n--- a/src/common/proximity_ranging.h\n+++ b/src/common/proximity_ranging.h\n@@ -584,6 +584,9 @@ struct pr_data {\n \n \t/* PR PASN request tracking - similar to pasn_params in wpa_supplicant */\n \tstruct pr_pasn_ranging_params *pr_pasn_params;\n+\n+\t/* Dedicated netlink socket for ranging commands */\n+\tvoid *ranging_sock;\n };\n \n /* PR Device Identity Resolution Attribute parameters */\ndiff --git a/wpa_supplicant/pr_supplicant.c b/wpa_supplicant/pr_supplicant.c\nindex 787fbc354..df093fdd0 100644\n--- a/wpa_supplicant/pr_supplicant.c\n+++ b/wpa_supplicant/pr_supplicant.c\n@@ -377,6 +377,36 @@ static void wpas_pr_pasn_result(void *ctx, u8 role, u8 protocol_type,\n }\n \n \n+static void wpas_pr_ranging_socket_timeout(void *eloop_ctx, void *timeout_ctx)\n+{\n+\tstruct wpa_supplicant *wpa_s = eloop_ctx;\n+\tstruct pr_data *pr = wpa_s->global->pr;\n+\n+\twpa_printf(MSG_DEBUG,\n+\t\t \"PR: Ranging session timeout - closing socket and cleaning up\");\n+\n+\t/* Close the ranging socket */\n+\tif (pr && pr->ranging_sock) {\n+\t\twpa_drv_destroy_ranging_handle(wpa_s, &pr->ranging_sock);\n+\t\tpr->ranging_sock = NULL;\n+\t\twpa_printf(MSG_DEBUG, \"PR: Ranging socket closed by timeout\");\n+\t}\n+\n+\t/* Free ranging params */\n+\tif (pr && pr->pr_pasn_params) {\n+\t\tos_free(pr->pr_pasn_params);\n+\t\tpr->pr_pasn_params = NULL;\n+\t}\n+\n+\t/*\n+\t * Clean up the PR interface now that the ranging session has ended.\n+\t * This is the normal completion path when a session timeout is\n+\t * configured.\n+\t */\n+\twpas_pr_cleanup_interface(wpa_s->global);\n+}\n+\n+\n /**\n * wpas_pr_trigger_ranging - Trigger ranging measurement after PASN auth\n * @wpa_s: Pointer to wpa_supplicant data\n@@ -410,6 +440,16 @@ static int wpas_pr_trigger_ranging(struct wpa_supplicant *wpa_s,\n \t\treturn -1;\n \t}\n \n+\tif (!pr->ranging_sock) {\n+\t\tpr->ranging_sock = wpa_drv_create_ranging_handle(wpa_s);\n+\t\tif (!pr->ranging_sock) {\n+\t\t\twpa_printf(MSG_ERROR,\n+\t\t\t\t \"PR: Failed to create ranging socket\");\n+\t\t\treturn -1;\n+\t\t}\n+\t\twpa_printf(MSG_DEBUG, \"PR: Created ranging socket\");\n+\t}\n+\n \tparams = pr->pr_pasn_params;\n \n \twpa_printf(MSG_DEBUG,\n@@ -465,17 +505,40 @@ static int wpas_pr_trigger_ranging(struct wpa_supplicant *wpa_s,\n \n \t/* Call driver operation to start peer measurement */\n \tif (wpa_drv_start_peer_measurement(wpa_s, peer_addr, freq, op_channel,\n-\t\t\t\t\t channel_width, params, NULL) < 0) {\n+\t\t\t\t\t channel_width, params,\n+\t\t\t\t\t pr->ranging_sock) < 0) {\n \t\twpa_printf(MSG_ERROR, \"PR: Failed to start peer measurement\");\n \t\tgoto fail;\n \t}\n \n+\t/* Register ranging socket with eloop to receive measurement results */\n+\twpa_drv_register_ranging_eloop(wpa_s, &pr->ranging_sock);\n+\n \twpa_printf(MSG_DEBUG, \"PR: Successfully triggered ranging measurement\");\n \n+\t/* Start session timeout timer if continuous ranging session time is set */\n+\tif (params->continuous_ranging_session_time > 0) {\n+\t\tunsigned int timeout_sec = params->continuous_ranging_session_time / 1000;\n+\t\tunsigned int timeout_usec = (params->continuous_ranging_session_time % 1000) * 1000;\n+\n+\t\twpa_printf(MSG_DEBUG,\n+\t\t\t \"PR: Starting ranging socket timeout timer for %u ms\",\n+\t\t\t params->continuous_ranging_session_time);\n+\n+\t\teloop_cancel_timeout(wpas_pr_ranging_socket_timeout, wpa_s, NULL);\n+\t\teloop_register_timeout(timeout_sec, timeout_usec,\n+\t\t\t\t wpas_pr_ranging_socket_timeout, wpa_s, NULL);\n+\t}\n+\n \treturn 0;\n \n fail:\n \t/* Clean up on failure */\n+\teloop_cancel_timeout(wpas_pr_ranging_socket_timeout, wpa_s, NULL);\n+\tif (pr->ranging_sock) {\n+\t\twpa_drv_destroy_ranging_handle(wpa_s, &pr->ranging_sock);\n+\t\tpr->ranging_sock = NULL;\n+\t}\n \tos_free(pr->pr_pasn_params);\n \tpr->pr_pasn_params = NULL;\n \treturn -1;\n@@ -499,9 +562,25 @@ static void wpas_pr_ranging_params(void *ctx, const u8 *dev_addr,\n \t\t\t\t protocol_type, freq, op_channel, bw,\n \t\t\t\t format_bw);\n \n+\twpa_printf(MSG_DEBUG, \"PR: Attempting to start ranging\");\n+\n+\t/*\n+\t * PASN succeeded - cancel the PASN timeout so it does not fire and\n+\t * prematurely stop the PD wdev while ranging is in progress.\n+\t * Cleanup will happen either when the session timeout fires or when\n+\t * the final measurement result is received.\n+\t */\n+\teloop_cancel_timeout(wpas_pr_pasn_timeout, wpa_s, NULL);\n+\twpa_printf(MSG_DEBUG,\n+\t\t \"PR: PASN succeeded, cancelled PASN timeout before ranging\");\n+\n \t/* Trigger ranging measurement after successful PASN authentication */\n-\twpas_pr_trigger_ranging(wpa_s, peer_addr, freq, op_class, op_channel,\n-\t\t\t\tformat_bw, protocol_type);\n+\tif (wpas_pr_trigger_ranging(wpa_s, peer_addr, freq, op_class, op_channel,\n+\t\t\t\t format_bw, protocol_type) < 0) {\n+\t\twpa_printf(MSG_DEBUG,\n+\t\t\t \"PR: Failed to trigger ranging, stopping PD wdev\");\n+\t\twpas_pr_pd_stop(wpa_s);\n+\t}\n }\n \n \n@@ -733,6 +812,13 @@ void wpas_pr_pd_stop(struct wpa_supplicant *wpa_s)\n \twpa_printf(MSG_DEBUG, \"PR: Stopping PD wdev addr=\" MACSTR,\n \t\t MAC2STR(wpa_s->pd_addr));\n \n+\teloop_cancel_timeout(wpas_pr_ranging_socket_timeout, wpa_s, NULL);\n+\tif (pr && pr->ranging_sock) {\n+\t\twpa_drv_destroy_ranging_handle(wpa_s, &pr->ranging_sock);\n+\t\tpr->ranging_sock = NULL;\n+\t\twpa_printf(MSG_DEBUG, \"PR: Ranging socket closed\");\n+\t}\n+\n \tif (pr && pr->pr_pasn_params) {\n \t\tos_free(pr->pr_pasn_params);\n \t\tpr->pr_pasn_params = NULL;\n@@ -806,10 +892,17 @@ void wpas_pr_measurement_result(struct wpa_supplicant *wpa_s,\n \t\twpa_msg(wpa_s, MSG_INFO, PR_EVENT_PEER_MEASUREMENT_COMPLETE\n \t\t\t\"addr=\" MACSTR \" status=%u\",\n \t\t\tMAC2STR(result->addr), result->status);\n+\t\teloop_cancel_timeout(wpas_pr_ranging_socket_timeout, wpa_s,\n+\t\t\t\t NULL);\n \t\tif (pr) {\n+\t\t\tif (pr->ranging_sock) {\n+\t\t\t\twpa_drv_destroy_ranging_handle(wpa_s, &pr->ranging_sock);\n+\t\t\t\tpr->ranging_sock = NULL;\n+\t\t\t}\n \t\t\tos_free(pr->pr_pasn_params);\n \t\t\tpr->pr_pasn_params = NULL;\n \t\t}\n+\t\twpas_pr_pd_stop(wpa_s);\n \t\treturn;\n \t}\n \n", "prefixes": [ "RFC", "23/23" ] }