Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2198438/?format=api
{ "id": 2198438, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2198438/?format=api", "project": { "id": 22, "url": "http://patchwork.ozlabs.org/api/1.0/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": "" }, "msgid": "<20260219202514.5781-52-andrei.otcheretianski@intel.com>", "date": "2026-02-19T20:25:07", "name": "[51/58] NAN: Add an API to get the potential availability of a peer", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "00c9c8f4eca063a272c13adf5c5f6981b6d5b211", "submitter": { "id": 62065, "url": "http://patchwork.ozlabs.org/api/1.0/people/62065/?format=api", "name": "Andrei Otcheretianski", "email": "andrei.otcheretianski@intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/hostap/patch/20260219202514.5781-52-andrei.otcheretianski@intel.com/mbox/", "series": [ { "id": 492721, "url": "http://patchwork.ozlabs.org/api/1.0/series/492721/?format=api", "date": "2026-02-19T20:24:21", "name": "NAN: Add NAN Data Path (NDP) support", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492721/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2198438/checks/", "tags": {}, "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=cnYAhNFd;\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=kvU51HbL;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=n33edrEf;\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 4fH4jK700Wz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 20 Feb 2026 07:29:09 +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 1vtAdc-0000000BzgC-1fpw;\n\tThu, 19 Feb 2026 20:28:40 +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 1vtAd9-0000000Bz3S-2WN7\n\tfor hostap@bombadil.infradead.org;\n\tThu, 19 Feb 2026 20:28:11 +0000", "from mgamail.intel.com ([198.175.65.18])\n\tby desiato.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vtAcw-00000001qIK-0OAq\n\tfor hostap@lists.infradead.org;\n\tThu, 19 Feb 2026 20:28:04 +0000", "from orviesa004.jf.intel.com ([10.64.159.144])\n by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Feb 2026 12:27:56 -0800", "from aotchere-mobl1.ger.corp.intel.com (HELO\n aotchere-mobl1.intel.com) ([10.245.246.171])\n by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Feb 2026 12:27:53 -0800" ], "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=Rq+OR5usglKCvZTrmegHs5XPwjtKyH20ZkEqElSUi8E=; b=cnYAhNFdo9J9Eb\n\tPQIIt3+sjb1+R0gVPfcjgJOjM4qGmGZKdXOmhJLwZDNB8abT7hoSQOTKM4/0VLlYUxTZdxYQf4+85\n\tfNyQ+qdOmEbVbuRsIP7X5vy0cUhX6M5/xAAV5klVxT7acgN1dOyTlaAh846T5ETd5vBuLO/5nZD7m\n\t296fx79eCAKIdpBS6Asrtyl/X/tRl4LqWA1KUA1+WWF12xk43kFqMIwyPqLrlA9FksHdYIOoZqiaC\n\tBuGFLEIKwNgvDrd74Vgkf83ybZbLiOJf9XYV18UXdhdYOaTZA/G8rVEkhSgc+vTKZ0adrazH4HVTm\n\t+XEXSemHYZQDmgYpF9Qg==;", "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=5m+6x/5vhfb94bwq7J2o7c7r5aOf0OUqM1HNj6NiCDM=; b=kvU51HbLcLgryfaYLwcAVUE1/Q\n\tIAQz4fonO9VIlfm+iJHefuXdtqVwFVq2yd7kwsv0NPbmCbFZGhw/aYTa8Dr3ZmsE9PRDLPsrPElkZ\n\ta0s2BnSCrJGaz9s9wBrR533fnzvGhJtDdiqgF4VR5mxW560yW7A/1pRMs70tkyBcoc7gW+9yMJan1\n\tT5gvXXdd2oEEHWMEyIAIpwdDTNZfxnFG70g3lJ5NShYHuC3+Ncse3RyYCdHtgmpci6+cG0KVQ17jT\n\tn7qs6K78+hq9eiETXv1Wi1MWuql7npJ10111Ljqk6XWlGVvZjRBXF4Tg4q7vsC0KXbP9DytQrN6Qz\n\tYLu0cvvQ==;", "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1771532879; x=1803068879;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=Z7gH6eOl3JeE3eGKjNNh6Olo7QrC/Q6L7fB1HxfJDQo=;\n b=n33edrEfL40o1eQ+ZiQ7S4cZGQbRxgDY3kqXC8RPZMpF8dWUGZTOh29E\n xXE6gbLFp+dejfVPSyzPNkSl0wcMvdqqGx2FtSF8eiD1KmGtG30SCetOi\n t1NFg9MIHslpgGlg5madnHbQskKP2yznwVzBhdyAqpJ/ULPfTmwYo6BxD\n Yb1Vvx707WIEGFjq2OaxEw0rSYrNoCI+aAUCAXBC5w+VP7HKAVDz4/EVA\n dmpkZFhg4u3WLBzi0xZ/0sTBK/JvbYwLZ6O1gg6FT3VL1WDsMc9vnZhVl\n WCIrv0ME9Ru5HNdQdjxGVaybQmWERlVAL91DTaHBxZtDGuqG/8Ek0fTb1\n g==;" ], "X-CSE-ConnectionGUID": [ "XXwqAfvZSEK2fOpDDTfhTw==", "+8jUcU+7SeKK7B/b7PTlvA==" ], "X-CSE-MsgGUID": [ "cT7kPNOIRFSZKU8KjMqADQ==", "j/rtGlUmSAqejlWhzUVc3g==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11706\"; a=\"72674076\"", "E=Sophos;i=\"6.21,300,1763452800\";\n d=\"scan'208\";a=\"72674076\"", "E=Sophos;i=\"6.21,300,1763452800\";\n d=\"scan'208\";a=\"219154106\"" ], "X-ExtLoop1": "1", "From": "Andrei Otcheretianski <andrei.otcheretianski@intel.com>", "To": "hostap@lists.infradead.org,\n\tvamsin@qti.qualcomm.com,\n\tvganneva@qti.qualcomm.com,\n\tmaheshkkv@google.com", "Cc": "Ilan Peer <ilan.peer@intel.com>", "Subject": "[PATCH 51/58] NAN: Add an API to get the potential availability of a\n peer", "Date": "Thu, 19 Feb 2026 22:25:07 +0200", "Message-ID": "<20260219202514.5781-52-andrei.otcheretianski@intel.com>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20260219202514.5781-1-andrei.otcheretianski@intel.com>", "References": "<20260219202514.5781-1-andrei.otcheretianski@intel.com>", "MIME-Version": "1.0", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20260219_202802_703338_1EB139ED ", "X-CRM114-Status": "GOOD ( 18.95 )", "X-Spam-Score": "-0.9 (/)", "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: From: Ilan Peer <ilan.peer@intel.com> Add an API to\n retrieve\n the potential availability of a peer device. In addition add a function to\n dump this schedule to a buffer in a readable form.\n Content analysis details: (-0.9 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 [198.175.65.18 listed in list.dnswl.org]\n 0.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 [198.175.65.18 listed in sa-accredit.habeas.com]\n 0.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 [198.175.65.18 listed in\n sa-trusted.bondedsender.org]\n 0.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 [198.175.65.18 listed in\n bl.score.senderscore.com]\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_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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from\n envelope-from domain\n 0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n not necessarily valid\n -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender", "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: Ilan Peer <ilan.peer@intel.com>\n\nAdd an API to retrieve the potential availability of a\npeer device.\n\nIn addition add a function to dump this schedule to a\nbuffer in a readable form.\n\nSigned-off-by: Ilan Peer <ilan.peer@intel.com>\n---\n src/nan/nan.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++\n src/nan/nan.h | 36 ++++++++++++++++++++++++++\n src/nan/nan_util.c | 55 +++++++++++++++++++++++++++++++++++++++\n 3 files changed, 155 insertions(+)", "diff": "diff --git a/src/nan/nan.c b/src/nan/nan.c\nindex 7037b61169..3364d4c1c5 100644\n--- a/src/nan/nan.c\n+++ b/src/nan/nan.c\n@@ -1993,3 +1993,67 @@ int nan_peer_get_schedule_info(struct nan_data *nan, const u8 *addr,\n \n \treturn 0;\n }\n+\n+/*\n+ * nan_peer_get_pot_avail - Get peer's potential availability entries\n+ * @nan: NAN module context from nan_init()\n+ * @addr: NAN MAC address of the peer\n+ * @pot_avail: On return would hold the potential availability entries.\n+ * Return 0 on success; -1 otherwise.\n+ */\n+int nan_peer_get_pot_avail(struct nan_data *nan, const u8 *addr,\n+\t\t\t struct nan_peer_potential_avail *pot_avail)\n+{\n+\tstruct nan_avail_entry *avail;\n+\tstruct nan_peer *peer;\n+\tu8 i;\n+\n+\tif (!nan || !pot_avail)\n+\t\treturn -1;\n+\n+\tos_memset(pot_avail, 0, sizeof(*pot_avail));\n+\n+\tpeer = nan_get_peer(nan, addr);\n+\tif (!peer)\n+\t\treturn -1;\n+\n+\tdl_list_for_each(avail, &peer->info.avail_entries,\n+\t\t\t struct nan_avail_entry, list) {\n+\t\tstruct pot_entry *pot;\n+\n+\t\tif (avail->type != NAN_AVAIL_ENTRY_CTRL_TYPE_POTENTIAL)\n+\t\t\tcontinue;\n+\n+\t\tif (pot_avail->n_maps == NAN_MAX_MAPS) {\n+\t\t\twpa_printf(MSG_DEBUG,\n+\t\t\t\t \"NAN: Too many potential maps stored\");\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tpot = &pot_avail->maps[pot_avail->n_maps++];\n+\t\tpot->rx_nss = avail->rx_nss;\n+\t\tpot->preference = avail->preference;\n+\t\tpot->utilization = avail->utilization;\n+\t\tpot->is_band = avail->band_chan_type == NAN_TYPE_BAND;\n+\n+\t\tfor (i = 0; i < avail->n_band_chan; i++, pot->n_band_chan++) {\n+\t\t\tif (pot->n_band_chan == NAN_MAX_CHAN_ENTRIES) {\n+\t\t\t\twpa_printf(MSG_DEBUG,\n+\t\t\t\t\t \"NAN: Too many band_chan entries stored for potential entry\");\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\tif (pot->is_band) {\n+\t\t\t\tpot->entries[i].band_id =\n+\t\t\t\t\tavail->band_chan[i].u.band_id;\n+\t\t\t} else {\n+\t\t\t\tpot->entries[i].op_class =\n+\t\t\t\t\tavail->band_chan[i].u.chan.op_class;\n+\t\t\t\tpot->entries[i].chan_bitmap =\n+\t\t\t\t\tle_to_host16(avail->band_chan[i].u.chan.chan_bitmap);\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\ndiff --git a/src/nan/nan.h b/src/nan/nan.h\nindex f174a1347e..eff9f81ea2 100644\n--- a/src/nan/nan.h\n+++ b/src/nan/nan.h\n@@ -355,6 +355,38 @@ struct nan_peer_schedule {\n \t} maps[NAN_MAX_MAPS];\n };\n \n+/**\n+ * struct nan_peer_potential_avail - NAN peer potential availability\n+ *\n+ * @n_maps: Number of maps\n+ * @maps: Array of maps\n+ * @is_band: Indicates whether the entries are bands or channels\n+ * @preference: Preference value for the availability entry\n+ * @utilization: Utilization value for the availability entry\n+ * @rx_nss: Number of spatial streams supported by the peer for RX during\n+ * the time indicated by the availability entry\n+ * @n_band_chan: Number of band/channel entries\n+ * @entries: Array of band/channel entries\n+ */\n+struct nan_peer_potential_avail {\n+\tu8 n_maps;\n+\tstruct pot_entry {\n+\t\tbool is_band;\n+\t\tu8 preference;\n+\t\tu8 utilization;\n+\t\tu8 rx_nss;\n+\n+\t\tu8 n_band_chan;\n+\t\tunion pot_band_chan{\n+\t\t\tu8 band_id;\n+\t\t\tstruct {\n+\t\t\t\tu8 op_class;\n+\t\t\t\tu16 chan_bitmap;\n+\t\t\t};\n+\t\t} entries[NAN_MAX_CHAN_ENTRIES];\n+\t} maps[NAN_MAX_MAPS];\n+};\n+\n struct nan_config {\n \tvoid *cb_ctx;\n \tu8 nmi_addr[ETH_ALEN];\n@@ -497,4 +529,8 @@ int nan_peer_get_schedule_info(struct nan_data *nan, const u8 *addr,\n \t\t\t struct nan_peer_schedule *sched);\n int nan_peer_dump_sched_to_buf(struct nan_peer_schedule *sched,\n \t\t\t char *buf, size_t buflen);\n+int nan_peer_get_pot_avail(struct nan_data *nan, const u8 *addr,\n+\t\t\t struct nan_peer_potential_avail *pot_avail);\n+int nan_peer_dump_pot_avail_to_buf(struct nan_peer_potential_avail *pot_avail,\n+\t\t\t\t char *buf, size_t buflen);\n #endif /* NAN_H */\ndiff --git a/src/nan/nan_util.c b/src/nan/nan_util.c\nindex 535a7c815f..5d8447a2a8 100644\n--- a/src/nan/nan_util.c\n+++ b/src/nan/nan_util.c\n@@ -1612,3 +1612,58 @@ err:\n \twpa_printf(MSG_DEBUG, \"NAN: Buffer too small to dump peer schedule\");\n \treturn -1;\n }\n+\n+\n+/**\n+ * nan_peer_dump_pot_avail_to_buf - Dump peer potential availability to a\n+ * buffer.\n+ *\n+ * @pot_avail: Peer potential availability\n+ * @buf: Output buffer\n+ * @buflen: Length of &buf in bytes\n+ *\n+ * Returns: The number of characters written to the buffer, or -1 on error,\n+ * which indicates that the buffer was too small.\n+ */\n+int nan_peer_dump_pot_avail_to_buf(struct nan_peer_potential_avail *pot_avail,\n+\t\t\t\t char *buf, size_t buflen)\n+{\n+\tu8 i, j;\n+\tint ret;\n+\tchar *pos = buf;\n+\tchar *end = buf + buflen;\n+\n+\tfor (i = 0; i < pot_avail->n_maps; i++) {\n+\t\tstruct pot_entry *pot = &pot_avail->maps[i];\n+\n+\t\tret = wpa_scnprintf(pos, end - pos,\n+\t\t\t\t \"entry[%u]: rx_nss=%u pref=%u util=%u\\n\",\n+\t\t\t\t i, pot->rx_nss, pot->preference,\n+\t\t\t\t pot->utilization);\n+\t\tif (os_snprintf_error(end - pos, ret))\n+\t\t\tgoto err;\n+\t\tpos += ret;\n+\n+\t\tfor (j = 0; j < pot->n_band_chan; j++) {\n+\t\t\tif (pot->is_band) {\n+\t\t\t\tret = wpa_scnprintf(pos, end - pos,\n+\t\t\t\t\t\t \"\\tband[%u]: band_id=%u\\n\",\n+\t\t\t\t\t\t j, pot->entries[j].band_id);\n+\t\t\t} else {\n+\t\t\t\tret = wpa_scnprintf(pos, end - pos,\n+\t\t\t\t\t\t \"\\tchan[%u]: op_class=%u chan_bitmap=0x%04x\\n\",\n+\t\t\t\t\t\t j, pot->entries[j].op_class,\n+\t\t\t\t\t\t pot->entries[j].chan_bitmap);\n+\t\t\t}\n+\t\t\tif (os_snprintf_error(end - pos, ret))\n+\t\t\t\tgoto err;\n+\t\t\tpos += ret;\n+\t\t}\n+\t}\n+\n+\treturn pos - buf;\n+err:\n+\twpa_printf(MSG_DEBUG,\n+\t\t \"NAN: Buffer too small to dump peer potential availability\");\n+\treturn -1;\n+}\n", "prefixes": [ "51/58" ] }