{"id":2229897,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2229897/?format=json","web_url":"http://patchwork.ozlabs.org/project/hostap/patch/20260428200639.40243-75-andrei.otcheretianski@intel.com/","project":{"id":22,"url":"http://patchwork.ozlabs.org/api/1.1/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":"<20260428200639.40243-75-andrei.otcheretianski@intel.com>","date":"2026-04-28T20:06:15","name":"[74/97] wpa_supplicant: Handle NAN ULW notification","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"bd1cdfbcf58f486253e2e4ec295a08662270504f","submitter":{"id":62065,"url":"http://patchwork.ozlabs.org/api/1.1/people/62065/?format=json","name":"Andrei Otcheretianski","email":"andrei.otcheretianski@intel.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/hostap/patch/20260428200639.40243-75-andrei.otcheretianski@intel.com/mbox/","series":[{"id":501927,"url":"http://patchwork.ozlabs.org/api/1.1/series/501927/?format=json","web_url":"http://patchwork.ozlabs.org/project/hostap/list/?series=501927","date":"2026-04-28T20:05:05","name":"NAN: Group keys support, schedule update and more","version":1,"mbox":"http://patchwork.ozlabs.org/series/501927/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2229897/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2229897/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=RY8jOoao;\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=QKVxHP1u;\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=VS6kXbrh;\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 4g4sBW2tY6z1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 06:15:47 +1000 (AEST)","from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wHopx-00000002Mld-24GG;\n\tTue, 28 Apr 2026 20:15:17 +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 1wHol4-00000002FwQ-0oB8\n\tfor hostap@bombadil.infradead.org;\n\tTue, 28 Apr 2026 20:10:14 +0000","from mgamail.intel.com ([198.175.65.16])\n\tby desiato.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wHokl-00000003ySq-0BMn\n\tfor hostap@lists.infradead.org;\n\tTue, 28 Apr 2026 20:09:57 +0000","from fmviesa001.fm.intel.com ([10.60.135.141])\n  by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Apr 2026 13:09:09 -0700","from iapp347.iil.intel.com (HELO 87c02287900a.iil.intel.com)\n ([10.167.28.6])\n  by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Apr 2026 13:09:08 -0700"],"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=NMlA9PZF2lUjLFyATziqWO/cOLgyU0+2jwsgvmoviRQ=; b=RY8jOoaon7z6zM\n\tzdm6Ml/mVngubPYainxg9kCps6xeFJhZE41gYt1o94YZfk0fpLYMRdaOOND2hrI0qBlKzkI+QgHMI\n\tSYphlx7wXu6qQvw+pNnkIsWVr5JXjdh88skhn1gMqFzvxQ26Yu1j7Qu6f/oCPUWQIbMigzgNQveNZ\n\t8EPQ/vRTHu9Z5cgAWOBypcfvNpR09zWDyEltUJhL72tHw7Ckkdug7iIoVZhblouqEFjDRSqVcMV/Y\n\tOWDDydPirArE+EiG0vezRwktZyAMs7QX5Te2HqjEwUlrAXML448xYz7dLMQUHvagvOSYoP8MA/dGU\n\tn7tuw+IP49Qfrfst4c4Q==;","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=XlljBDBPLOWb4Lbat9PJ3erQpz6m2vXsAIMQRUB5bHs=; b=QKVxHP1ue/p1FsDTDrbLdVZrIu\n\tZGkkVeJm2W/cwldM/7w/fnc5V1ZJyAKaCn89GyjLt4NadCFFw6KPubS4WOFba1yW8Q9FreSsP9Uil\n\thfmenEcthzQ/bpOqyQgT2IpPrDKXwacm3kyYT3E4cQeXDNAYSyadOLl/L8604HxJV/04QWHm0gKGy\n\t/oXSVooyW60qUoDIcRZ1HXQOl6VpCbUF6cLeoLp5XTLTIraQieGzSu1dih/KUccFZa6BdOcrIOeFv\n\tcpgdmxCOimqB0GB42vusrb2Bqh6B0lfjj+3b9ARcZJ2FUXa35SaUDbkveo3vMWwmH5GQbbJ25XLXi\n\tVq6A52qQ==;","v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1777406995; x=1808942995;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=yo3I2suuohDW08Yd+ePqxK8iz9c2vyIi9XkfwuRB6b8=;\n  b=VS6kXbrhcyCChVvgPKQGKtWfvuB5QkQWvaxo07puBoE9pJxRpjHjRkQu\n   gO4kIRm9v6rgzO2vJ/8frnq2Hb4hLFKys0CxFgyEaNdtOsnWULOpkyRPC\n   alGMrKWea/OKetL+fLF8L5GS9LYuN6lYZeW3OxLIoQ+1RIDGEuj4WSGK9\n   Umzmp6VbUFOAUKjJ21tpzhas/bej7oFNvxu24tUvzCIgWJrWTyBZbxAPi\n   ihOl3fseAYaAHPE6nr4rqPMrWzu3yjmX1EfWd9b6CURPB/0rSL7XcwfIR\n   q8RYLHN6DukRMaZ9hW+U84o99buNdCRdUDYiWysUS0PNrp/VvQrKj0RCB\n   Q==;"],"X-CSE-ConnectionGUID":["5Zph5UtTR6ylvhrcNJvtqA==","zay3DrdERW2rld4IPCeu6g=="],"X-CSE-MsgGUID":["w/QULJXaRkqsO64cv1cMBA==","cGnDD7xaQP2QEnczC254ww=="],"X-IronPort-AV":["E=McAfee;i=\"6800,10657,11770\"; a=\"78519530\"","E=Sophos;i=\"6.23,204,1770624000\";\n   d=\"scan'208\";a=\"78519530\"","E=Sophos;i=\"6.23,204,1770624000\";\n   d=\"scan'208\";a=\"257610773\""],"X-ExtLoop1":"1","From":"Andrei Otcheretianski <andrei.otcheretianski@intel.com>","To":"hostap@lists.infradead.org","Cc":"vamsin@qti.qualcomm.com,\n\tmaheshkkv@google.com,\n\tAvraham Stern <avraham.stern@intel.com>","Subject":"[PATCH 74/97] wpa_supplicant: Handle NAN ULW notification","Date":"Tue, 28 Apr 2026 23:06:15 +0300","Message-ID":"<20260428200639.40243-75-andrei.otcheretianski@intel.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260428200639.40243-1-andrei.otcheretianski@intel.com>","References":"<20260428200639.40243-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-20260428_210956_153024_014A6205 ","X-CRM114-Status":"GOOD (  19.85  )","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: Avraham Stern <avraham.stern@intel.com> When the\n driver\n    notifies about a ULW attribute,\n add the ULW attribute to NAN frames together\n    with the NAN availability attribute. Signed-off-by: Avraham Stern\n <avraham.stern@intel.com>\n    --- src/drivers/driver.h | 21 +++++++++++++++++\n src/drivers/driver_common.c\n    | 1 + wpa_supplicant/events.c | 4 ++++ wpa_supplicant/nan_supplicant.\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.16 listed in list.dnswl.org]\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_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: Avraham Stern <avraham.stern@intel.com>\n\nWhen the driver notifies about a ULW attribute, add the ULW attribute\nto NAN frames together with the NAN availability attribute.\n\nSigned-off-by: Avraham Stern <avraham.stern@intel.com>\n---\n src/drivers/driver.h              | 21 +++++++++++++++++\n src/drivers/driver_common.c       |  1 +\n wpa_supplicant/events.c           |  4 ++++\n wpa_supplicant/nan_supplicant.c   | 38 ++++++++++++++++++++++++++++++-\n wpa_supplicant/nan_supplicant.h   |  6 +++++\n wpa_supplicant/wpa_supplicant_i.h |  1 +\n 6 files changed, 70 insertions(+), 1 deletion(-)","diff":"diff --git a/src/drivers/driver.h b/src/drivers/driver.h\nindex c38ad98d6a..36ae970ba9 100644\n--- a/src/drivers/driver.h\n+++ b/src/drivers/driver.h\n@@ -6507,6 +6507,14 @@ enum wpa_event_type {\n \t * update has been completed by the driver/firmware.\n \t */\n \tEVENT_NAN_SCHED_UPDATE_DONE,\n+\n+\t/**\n+\t * EVENT_NAN_ULW_UPDATE - NAN ULW blob update\n+\t *\n+\t * This event is used to notify wpa_supplicant that the device ULW blob\n+\t * has changed and can be attached to outgoing NAN frames.\n+\t */\n+\tEVENT_NAN_ULW_UPDATE,\n };\n \n \n@@ -7537,6 +7545,19 @@ union wpa_event_data {\n \tstruct nan_sched_update_done_info {\n \t\tbool success;\n \t} nan_sched_update_done_info;\n+\n+\t/**\n+\t * struct nan_ulw_update_info - Data for EVENT_NAN_ULW_UPDATE\n+\t * @ulw: Pointer to ULW blob data, containing one or more Unaligned\n+\t *\tSchedule attributes as defined in the Wi-Fi Aware (TM) 4.0\n+\t *\tspecification Table 109, including attribute header for each\n+\t *\tattribute.\n+\t * @ulw_len: ULW blob length in bytes\n+\t */\n+\tstruct nan_ulw_update_info {\n+\t\tconst u8 *ulw;\n+\t\tsize_t ulw_len;\n+\t} nan_ulw_update_info;\n };\n \n /**\ndiff --git a/src/drivers/driver_common.c b/src/drivers/driver_common.c\nindex 5a3a07a89e..5835095d22 100644\n--- a/src/drivers/driver_common.c\n+++ b/src/drivers/driver_common.c\n@@ -106,6 +106,7 @@ const char * event_to_string(enum wpa_event_type event)\n \tE2S(NAN_NEXT_DW);\n \tE2S(INCUMBT_SIG_INTF_DETECTED);\n \tE2S(NAN_SCHED_UPDATE_DONE);\n+\tE2S(NAN_ULW_UPDATE);\n \t}\n \n \treturn \"UNKNOWN\";\ndiff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c\nindex dcf1af5f49..0157820aee 100644\n--- a/wpa_supplicant/events.c\n+++ b/wpa_supplicant/events.c\n@@ -7655,6 +7655,10 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,\n \tcase EVENT_NAN_SCHED_UPDATE_DONE:\n \t\twpas_nan_sched_update_done(wpa_s, data);\n \t\tbreak;\n+\tcase EVENT_NAN_ULW_UPDATE:\n+\t\twpas_nan_ulw_update(wpa_s, data->nan_ulw_update_info.ulw,\n+\t\t\t\t    data->nan_ulw_update_info.ulw_len);\n+\t\tbreak;\n #endif /* CONFIG_NAN */\n \tdefault:\n \t\twpa_msg(wpa_s, MSG_INFO, \"Unknown event %d\", event);\ndiff --git a/wpa_supplicant/nan_supplicant.c b/wpa_supplicant/nan_supplicant.c\nindex c5626d7dcc..25e746d4c6 100644\n--- a/wpa_supplicant/nan_supplicant.c\n+++ b/wpa_supplicant/nan_supplicant.c\n@@ -1467,6 +1467,8 @@ void wpas_nan_deinit(struct wpa_supplicant *wpa_s)\n \tos_memset(&wpa_s->nan_disallowed_freqs, 0,\n \t\t  sizeof(wpa_s->nan_disallowed_freqs));\n \tclear_sched_config(&wpa_s->nan_sched_update.sched);\n+\twpabuf_free(wpa_s->nan_ulw_attr);\n+\twpa_s->nan_ulw_attr = NULL;\n \n \twpa_s->nan = NULL;\n }\n@@ -3355,6 +3357,7 @@ static void wpas_nan_de_add_extra_attrs(void *ctx, struct wpabuf *buf)\n \tstruct wpa_supplicant *wpa_s = ctx;\n \tstruct nan_schedule sched;\n \tu32 map_ids = (BIT(wpa_s->nan_capa.num_radios) - 1) << 1;\n+\tint i;\n \n \tif (!wpas_nan_ndp_allowed(wpa_s) || !map_ids)\n \t\treturn;\n@@ -3365,8 +3368,18 @@ static void wpas_nan_de_add_extra_attrs(void *ctx, struct wpabuf *buf)\n \t\t\t\t\t wpa_s->schedule_sequence_id,\n \t\t\t\t\t map_ids, sched.n_chans,\n \t\t\t\t\t sched.chans, buf, true);\n-\n \tnan_pairing_add_attrs(wpa_s->nan, buf);\n+\n+\tif (!wpa_s->nan_ulw_attr)\n+\t\treturn;\n+\n+\t/* Add ULW attribute only if there are committed availability entries */\n+\tfor (i = 0; i < sched.n_chans; i++) {\n+\t\tif (sched.chans[i].committed.len) {\n+\t\t\twpabuf_put_buf(buf, wpa_s->nan_ulw_attr);\n+\t\t\tbreak;\n+\t\t}\n+\t}\n }\n \n \n@@ -3429,6 +3442,29 @@ void wpas_nan_sched_update_done(struct wpa_supplicant *wpa_s,\n }\n \n \n+void wpas_nan_ulw_update(struct wpa_supplicant *wpa_s,\n+\t\t\t const u8 *ulw, size_t ulw_len)\n+{\n+\tif (!wpas_nan_ready(wpa_s))\n+\t\treturn;\n+\n+\twpabuf_free(wpa_s->nan_ulw_attr);\n+\tif (ulw && ulw_len) {\n+\t\twpa_s->nan_ulw_attr = wpabuf_alloc_copy(ulw, ulw_len);\n+\t\tif (!wpa_s->nan_ulw_attr) {\n+\t\t\twpa_printf(MSG_ERROR,\n+\t\t\t\t   \"NAN: Failed to allocate ULW attribute buffer\");\n+\t\t\treturn;\n+\t\t}\n+\n+\t\twpa_hexdump(MSG_DEBUG, \"NAN: ULW update\", ulw, ulw_len);\n+\t} else {\n+\t\twpa_printf(MSG_DEBUG, \"NAN: ULW update cleared\");\n+\t\twpa_s->nan_ulw_attr = NULL;\n+\t}\n+}\n+\n+\n #ifdef CONFIG_PASN\n \n static int wpas_nan_pasn_update_station(struct wpa_supplicant *wpa_s,\ndiff --git a/wpa_supplicant/nan_supplicant.h b/wpa_supplicant/nan_supplicant.h\nindex 3105dc54f0..415934fc35 100644\n--- a/wpa_supplicant/nan_supplicant.h\n+++ b/wpa_supplicant/nan_supplicant.h\n@@ -26,6 +26,8 @@ void wpas_nan_cluster_join(struct wpa_supplicant *wpa_s,\n void wpas_nan_next_dw(struct wpa_supplicant *wpa_s, u32 freq);\n void wpas_nan_sched_update_done(struct wpa_supplicant *wpa_s,\n \t\t\t\tconst union wpa_event_data *data);\n+void wpas_nan_ulw_update(struct wpa_supplicant *wpa_s,\n+\t\t\t const u8 *ulw, size_t ulw_len);\n int wpas_nan_sched_config_map(struct wpa_supplicant *wpa_s, const char *cmd);\n int wpas_nan_ndp_request(struct wpa_supplicant *wpa_s, char *cmd);\n void wpas_nan_rx_naf(struct wpa_supplicant *wpa_s,\n@@ -93,6 +95,10 @@ static inline void wpas_nan_sched_update_done(struct wpa_supplicant *wpa_s,\n \t\t\t\t\t      const union wpa_event_data *data)\n {}\n \n+static inline void wpas_nan_ulw_update(struct wpa_supplicant *wpa_s,\n+\t\t\t\t       const u8 *ulw, size_t ulw_len)\n+{}\n+\n static inline void wpas_nan_rx_naf(struct wpa_supplicant *wpa_s,\n \t\t\t\t   const struct ieee80211_mgmt *mgmt,\n \t\t\t\t   size_t len)\ndiff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h\nindex 45a70fbead..95c0f577d4 100644\n--- a/wpa_supplicant/wpa_supplicant_i.h\n+++ b/wpa_supplicant/wpa_supplicant_i.h\n@@ -1740,6 +1740,7 @@ struct wpa_supplicant {\n \t\tstruct nan_schedule_config sched;\n \t\tu8 map_id;\n \t} nan_sched_update;\n+\tstruct wpabuf *nan_ulw_attr;\n \tstruct wpa_freq_range_list nan_disallowed_freqs;\n \tu16 nan_max_bw;\n \tunsigned int nan_ndi_ndp_refcount; /* Active NDP count on this NDI */\n","prefixes":["74/97"]}