{"id":2198432,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2198432/?format=json","project":{"id":22,"url":"http://patchwork.ozlabs.org/api/1.0/projects/22/?format=json","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-34-andrei.otcheretianski@intel.com>","date":"2026-02-19T20:24:49","name":"[33/58] NAN: Add Tx status handling","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"5c1e683dd168dd21c4bf7bf0a5b3e067682b4ada","submitter":{"id":62065,"url":"http://patchwork.ozlabs.org/api/1.0/people/62065/?format=json","name":"Andrei Otcheretianski","email":"andrei.otcheretianski@intel.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/hostap/patch/20260219202514.5781-34-andrei.otcheretianski@intel.com/mbox/","series":[{"id":492721,"url":"http://patchwork.ozlabs.org/api/1.0/series/492721/?format=json","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/2198432/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=P14qHgRI;\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=VYFyj9Jg;\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=KFg6MvQr;\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 4fH4hk5mMgz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 20 Feb 2026 07:28:38 +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 1vtAd5-0000000Bywv-1p7w;\n\tThu, 19 Feb 2026 20:28:07 +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 1vtAco-0000000ByYc-2gqJ\n\tfor hostap@bombadil.infradead.org;\n\tThu, 19 Feb 2026 20:27:50 +0000","from mgamail.intel.com ([198.175.65.10])\n\tby desiato.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vtAcY-00000001pxP-0TfV\n\tfor hostap@lists.infradead.org;\n\tThu, 19 Feb 2026 20:27:40 +0000","from orviesa004.jf.intel.com ([10.64.159.144])\n  by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Feb 2026 12:27:05 -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:01 -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=iYwGkxnE/qPN4Uc5XGGsAtDbL5xMf5YuRTbPKoUXOmE=; b=P14qHgRII1uDpD\n\tqEDp4IpudjReHbEa7qmV2Dvo6XqveGCHHGkxWvI3xR0s93FMZw2FOeJlfDVmh0WBdLhZDcayGu5JV\n\tKgx0nOwtrwVspErksMF+HJqKnEfSGK7u6/CZMwVZIAT9B8bdSpFSOFN346ntOGIXlECC2Y2lJ5jmY\n\tFj1YK0XyZjFGD1QHqPCgAmgjJczSwgCfT8pDLWpVaONwu7loMz1/PHv31c9sfcm0PDGjJRr/rDVZf\n\tYjqroMAQr6VX0GrxhWxu2mhhTr4EqjijYyHu17C84ElpvoBD8JnKOtQWERPeCdiX4W0n9x1bGyWAh\n\tpo+Wl30GXZLJBEYd+28Q==;","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=3biVlaHjs6GhUphl9ne+xisF9t6I5wFkdllnYI2SHGk=; b=VYFyj9Jg6KxM4AwweGhmxk9Hul\n\t5LSlYgHqoNUAP6PJQ7Z0xRq+h6eSsYuLTXmH9xnwDEgKOEe99TMxYzcgXIWHDjM8JB3K+COY85cOj\n\tjNMQT8r5l/hzZDTm7SR8OVxCBee8I7EFmpq5xRo6UnS7yNznyDhaFz81mQKGXTop4Sdr38rsjVcFN\n\tFvTw+At4Ni9d9amrQBReS4MSsrVSK3PJ9oM3wqaleWXEYMHJCo16v71qMyzfqrEDupRVe/ytwPhpz\n\tbXigmzICOoJOweC3ZTR7FidWlbal/oxG7XO+9WfO5/s1PZS29LAJ6Hh6LiayGupxyZTwTHDL8kO28\n\tGVI9Qxyw==;","v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1771532855; x=1803068855;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=lhBVUQbbPEj9/rDW9cI5j3O41fwsODpfkefmvtvEiM4=;\n  b=KFg6MvQrF5eRtWzrmmIOtCvUIhDc+FnFr6hKuzthFCiEHVCoBgxMwjIw\n   FoLqJosY9L1rp/UJLTmhW/DAnDJ8ytmunZzTaP9H/IjIDJM1z3Sr1UzrQ\n   dBmP9fkVksVKlLe2J6RJ+bK3eimmdmic2f1ML6cEhOQdXdhalQJULLf16\n   fSOLzJfjlJ4BFVZn0wSnjV7/TfKY8jcT92hcPFvusi8NdRALQLRBLW7rn\n   noDqaIbr+ObIygq3sIN/QHh4jCqrxn8yQ6wJ1Se7ry9g29b1m70vx5bUQ\n   eYRtQzJRM2mOQaDbWWsjRm8hJ5Uh5MjAXpuqKz1n0/3zuHUTb8pvQnJAU\n   w==;"],"X-CSE-ConnectionGUID":["AOBxJ6oeTB+pFUSKgQPJuQ==","gO9Nu24JRU2Nn1NRfUfuWw=="],"X-CSE-MsgGUID":["aqnfoCBbRFSINPELjCpYRw==","iv676MqgQka9zJjJUam1gg=="],"X-IronPort-AV":["E=McAfee;i=\"6800,10657,11706\"; a=\"90040076\"","E=Sophos;i=\"6.21,300,1763452800\";\n   d=\"scan'208\";a=\"90040076\"","E=Sophos;i=\"6.21,300,1763452800\";\n   d=\"scan'208\";a=\"219153927\""],"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 33/58] NAN: Add Tx status handling","Date":"Thu, 19 Feb 2026 22:24:49 +0200","Message-ID":"<20260219202514.5781-34-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_202738_589176_B5ED0CDA ","X-CRM114-Status":"GOOD (  14.38  )","X-Spam-Score":"-2.5 (--)","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 handling of Tx\n status\n    notification for the NAN module: 1. If the NAN Action Frame (NAF) was not\n    acked, stop the NDP establishment. 2. If the NAF was acked,\n forward the notification\n    to NDP and NDL state machines. If they indicate error, stop the NDP establ\n    [...]\n Content analysis details:   (-2.5 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,\n                             medium trust\n                             [198.175.65.10 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_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 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.10 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.10 listed in\n sa-trusted.bondedsender.org]\n -0.0 DKIMWL_WL_HIGH         DKIMwl.org - High trust sender\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.10 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":"From: Ilan Peer <ilan.peer@intel.com>\n\nAdd handling of Tx status notification for the NAN\nmodule:\n\n1. If the NAN Action Frame (NAF) was not acked, stop\n   the NDP establishment.\n2. If the NAF was acked, forward the notification to\n   NDP and NDL state machines. If they indicate error,\n   stop the NDP establishment.\n3. If both state machines return with success, and both\n   indicate that they are done, complete the NDP establishment.\n\nSigned-off-by: Ilan Peer <ilan.peer@intel.com>\n---\n src/nan/nan.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++\n src/nan/nan.h |  3 ++-\n 2 files changed, 61 insertions(+), 1 deletion(-)","diff":"diff --git a/src/nan/nan.c b/src/nan/nan.c\nindex 43ff7d1686..6b705b0c92 100644\n--- a/src/nan/nan.c\n+++ b/src/nan/nan.c\n@@ -1410,3 +1410,62 @@ void nan_set_cluster_id(struct nan_data *nan, const u8 *cluster_id)\n {\n \tos_memcpy(nan->cluster_id, cluster_id, sizeof(nan->cluster_id));\n }\n+\n+/*\n+ * nan_tx_status - Notification of the result of a transmitted NAN Action Frame\n+ * @nan: NAN module context from nan_init()\n+ * @dst: Destination address of the transmitted frame\n+ * @data: The transmitted frame\n+ * @data_len: Length of the transmitted frame in octets\n+ * @acked: Whether the frame was acknowledged\n+ * Return 0 if the frame is a NAF and -1 if not.\n+ */\n+int nan_tx_status(struct nan_data *nan, const u8 *dst, const u8 *data,\n+\t\t  size_t data_len, u8 acked)\n+{\n+\tstruct nan_peer *peer;\n+\tconst struct ieee80211_mgmt *mgmt = (const struct ieee80211_mgmt *)data;\n+\tu8 subtype;\n+\tint ret;\n+\n+\tif (!nan_is_naf(nan, mgmt, data_len) || !dst)\n+\t\treturn -1;\n+\n+\twpa_printf(MSG_DEBUG,\n+\t\t   \"NAN: TX status: peer=\" MACSTR \" ,acked=%u\",\n+\t\t   MAC2STR(dst), acked);\n+\n+\tpeer = nan_get_peer(nan, dst);\n+\tif (!peer) {\n+\t\twpa_printf(MSG_DEBUG,\n+\t\t\t   \"NAN: TX status: peer not found\");\n+\t\treturn 0;\n+\t}\n+\n+\tsubtype = mgmt->u.action.u.naf.subtype;\n+\n+\tret = nan_ndp_naf_sent(nan, peer, subtype);\n+\tret |= nan_ndl_naf_sent(nan, peer, subtype);\n+\n+\tif (ret || peer->ndp_setup.status == NAN_NDP_STATUS_REJECTED ||\n+\t    !peer->ndl || peer->ndl->status == NAN_NDL_STATUS_REJECTED) {\n+\t\twpa_printf(MSG_DEBUG,\n+\t\t\t   \"NAN: TX status: stopping NDP establishment. ret=%d\",\n+\t\t\tret);\n+\n+\t\tif (peer->ndp_setup.ndp)\n+\t\t\tnan_ndp_disconnected(nan, peer,\n+\t\t\t\t\t     peer->ndp_setup.reason);\n+\t\treturn 0;\n+\t}\n+\n+\t/* Both state machines are done */\n+\tif (peer->ndp_setup.state == NAN_NDP_STATE_DONE &&\n+\t    peer->ndl->state == NAN_NDL_STATE_DONE) {\n+\t\twpa_printf(MSG_DEBUG, \"NAN: TX status:  NDP setup done\");\n+\n+\t\tnan_ndp_connected(nan, peer);\n+\t}\n+\n+\treturn 0;\n+}\ndiff --git a/src/nan/nan.h b/src/nan/nan.h\nindex 33614cf4b8..9d89800071 100644\n--- a/src/nan/nan.h\n+++ b/src/nan/nan.h\n@@ -417,5 +417,6 @@ bool nan_publish_instance_id_valid(struct nan_data *nan, u8 instance_id,\n void nan_set_cluster_id(struct nan_data *nan, const u8 *cluster_id);\n int nan_action_rx(struct nan_data *nan, const struct ieee80211_mgmt *mgmt,\n \t\t  size_t len);\n-\n+int nan_tx_status(struct nan_data *nan, const u8 *dst, const u8 *data,\n+\t\t  size_t data_len, u8 acked);\n #endif /* NAN_H */\n","prefixes":["33/58"]}