{"id":2226433,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2226433/?format=json","web_url":"http://patchwork.ozlabs.org/project/hostap/patch/20260422122424.43776-87-andrei.otcheretianski@intel.com/","project":{"id":22,"url":"http://patchwork.ozlabs.org/api/1.2/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":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260422122424.43776-87-andrei.otcheretianski@intel.com>","list_archive_url":null,"date":"2026-04-22T12:24:17","name":"[86/92] NAN: Aggregate NAN discovery result information into a struct","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"f7ff6513e0405b7e6bdea18f459be4b92667f14f","submitter":{"id":62065,"url":"http://patchwork.ozlabs.org/api/1.2/people/62065/?format=json","name":"Andrei Otcheretianski","email":"andrei.otcheretianski@intel.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/hostap/patch/20260422122424.43776-87-andrei.otcheretianski@intel.com/mbox/","series":[{"id":501001,"url":"http://patchwork.ozlabs.org/api/1.2/series/501001/?format=json","web_url":"http://patchwork.ozlabs.org/project/hostap/list/?series=501001","date":"2026-04-22T12:23:05","name":"Add NAN PASN pairing support","version":1,"mbox":"http://patchwork.ozlabs.org/series/501001/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2226433/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2226433/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=V6b9W2ob;\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=QOPiXOLN;\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=C6zyK2oy;\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 4g0zB30PCDz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 22:31:55 +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 1wFWjj-0000000ABR4-0Ecx;\n\tWed, 22 Apr 2026 12:31:23 +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 1wFWg2-0000000A6F0-3YZ4\n\tfor hostap@bombadil.infradead.org;\n\tWed, 22 Apr 2026 12:27:35 +0000","from mgamail.intel.com ([192.198.163.17])\n\tby desiato.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wFWfu-0000000BKYa-3EwT\n\tfor hostap@lists.infradead.org;\n\tWed, 22 Apr 2026 12:27:32 +0000","from orviesa010.jf.intel.com ([10.64.159.150])\n  by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Apr 2026 05:26:54 -0700","from iapp347.iil.intel.com (HELO 87c02287900a.iil.intel.com)\n ([10.167.28.6])\n  by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Apr 2026 05:26:54 -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=GdjImPcnQdgqE3W0Xlde/tIk/B78QWwmUy7Pi2TKG5I=; b=V6b9W2ob2LL8Jv\n\tu3ltOua6F3Cz+L6LXWHL0JNjcq3rOA9fhBT35W0jfD7ShEq+AkfHbndqI5utwDkO/d+WgENjhkP8b\n\tqRvf9XfFv0jtRaB6QK2UmI2gyqF/ZBhW/h2fqwWMGslCrJ+KwteFv7tYXiQJDWl5rLzOM5RUFsmTL\n\tu19PDac/3GCXYSxwRpxSFjtEqo6q1pu8911ZrIbvwi3orXlqvoW+XPWUX8ElYNKjxHhq3lLX6soEI\n\t/Cu2Y//iiL9aW93DWIAilvd4AANcZoTOPgENhyE1gnGr9qceP3eMLYqP1jfo1gWIIw28/9UgvQLkK\n\t+TkL3miNf1KZR+A3yYdg==;","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=Q9Vfmy4/a8GcOxzJWjCaeFhnS2c4C8QPE/qtZXSkHfI=; b=QOPiXOLNqnd971GGKGiwZg3wgO\n\tzj0nB/uzr9LGFopGsxPPnrSGicxeE82z3yA1FQKSPjMyTN9PdU3Kt95cLFEKDv2YtDKeLkIXODdPX\n\t/v2LxWc1/tCnM+yYFOHbK0vNRaYhRWxnq6nTss87xkb2DYyu5nRIJDZLnBhqkA2te74Ve5gHjPIvJ\n\tRmW7E87KOiobS09Z0zQ41XfZGFwWkcvfeNIPhUDVwtaOPPKqKJ7wWtJwuKnY5FcsHAkK3mSYhKu5P\n\tin4FNBC7QRqfnMLBPig1kHfBLKuyiC/P3+x0DaXLVGQeEsQOtlJeFjhttvGPK3DT1khMWjS0BK79w\n\tb6IjJmrQ==;","v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1776860846; x=1808396846;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=ASB77jWMZqaRzAjRjDN3urGSRd0nozGJDjxAGXF9/Bw=;\n  b=C6zyK2oyJ9bPqF5sipmLQsHLx/tr1Z6MR1CibfddllaUKgufX35HSL2t\n   Sqh/flkttxOwLVTGXOSj30wnzBeIsndP/13Rrw5EBM1AIPaJ3C2OFH5gd\n   1RkjTE+MI3SSo8bxQ1c2Pl9Bhkb/JFy/0fyBF7n/x38rdNe8/rCFdmvRL\n   OuUTiePfr4z+Gv9qS+19Dc9RjF268C2v/wMjm7hakufTuZ9Un8wd8Dj1n\n   xbUFUcTfzlQlqcsja0vEhukDzEIpjAzFCXdLfUvVNDAPxiCxWug9zRrqq\n   CcXtGnkVclB7lYITbVpUM1mpgf/1FMS0oAOWU6XhEy6TUO0wjm2od3ZJf\n   w==;"],"X-CSE-ConnectionGUID":["GC5teSaXSgGl31m++vtP4Q==","u8lqHBocTDWqCmUl8ach4g=="],"X-CSE-MsgGUID":["jYC6gQpLSYeGkpORzApxjA==","d8jdMVVLRumLVh6VzygyPg=="],"X-IronPort-AV":["E=McAfee;i=\"6800,10657,11764\"; a=\"77687619\"","E=Sophos;i=\"6.23,192,1770624000\";\n   d=\"scan'208\";a=\"77687619\"","E=Sophos;i=\"6.23,192,1770624000\";\n   d=\"scan'208\";a=\"231445335\""],"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\tIlan Peer <ilan.peer@intel.com>","Subject":"[PATCH 86/92] NAN: Aggregate NAN discovery result information into a\n struct","Date":"Wed, 22 Apr 2026 15:24:17 +0300","Message-ID":"<20260422122424.43776-87-andrei.otcheretianski@intel.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260422122424.43776-1-andrei.otcheretianski@intel.com>","References":"<20260422122424.43776-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-20260422_132727_408082_3BD593A2 ","X-CRM114-Status":"GOOD (  17.04  )","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> So it would be later\n    easier to add additional information to the discovery result.\n Signed-off-by:\n    Ilan Peer <ilan.peer@intel.com> --- src/ap/nan_usd_ap.c | 24\n +++++++-------\n    src/common/nan_de.c | 48 +++++++++++++++ src/common/nan_de.h | 25\n +++++++++------\n    wpa_supplicant/ [...]\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                             [192.198.163.17 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_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.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\nSo it would be later easier to add additional information\nto the discovery result.\n\nSigned-off-by: Ilan Peer <ilan.peer@intel.com>\n---\n src/ap/nan_usd_ap.c             | 24 +++++++-------\n src/common/nan_de.c             | 48 +++++++++++++++------------\n src/common/nan_de.h             | 25 +++++++++------\n wpa_supplicant/nan_supplicant.c | 14 ++------\n wpa_supplicant/notify.c         | 57 ++++++++++++++++-----------------\n wpa_supplicant/notify.h         | 11 ++-----\n 6 files changed, 87 insertions(+), 92 deletions(-)","diff":"diff --git a/src/ap/nan_usd_ap.c b/src/ap/nan_usd_ap.c\nindex 41e99510d9..506b612a0a 100644\n--- a/src/ap/nan_usd_ap.c\n+++ b/src/ap/nan_usd_ap.c\n@@ -44,28 +44,26 @@ static int hostapd_nan_de_listen(void *ctx, unsigned int freq,\n \n \n static void\n-hostapd_nan_de_discovery_result(void *ctx, int subscribe_id,\n-\t\t\t\tenum nan_service_protocol_type srv_proto_type,\n-\t\t\t\tconst u8 *ssi, size_t ssi_len,\n-\t\t\t\tint peer_publish_id, const u8 *peer_addr,\n-\t\t\t\tbool fsd, bool fsd_gas,\n-\t\t\t\tconst u8 *pmkid_list, size_t pmkid_count,\n-\t\t\t\tconst u8 *cipher_suite,\n-\t\t\t\tsize_t n_cipher_suite)\n+hostapd_nan_de_discovery_result(void *ctx,\n+\t\t\t\tstruct nan_discovery_result *res)\n {\n \tstruct hostapd_data *hapd = ctx;\n \tchar *ssi_hex;\n \n-\tssi_hex = os_zalloc(2 * ssi_len + 1);\n+\tssi_hex = os_zalloc(2 * res->ssi_len + 1);\n \tif (!ssi_hex)\n \t\treturn;\n-\tif (ssi)\n-\t\twpa_snprintf_hex(ssi_hex, 2 * ssi_len + 1, ssi, ssi_len);\n+\tif (res->ssi)\n+\t\twpa_snprintf_hex(ssi_hex, 2 * res->ssi_len + 1,\n+\t\t\t\t res->ssi, res->ssi_len);\n \twpa_msg(hapd->msg_ctx, MSG_INFO, NAN_DISCOVERY_RESULT\n \t\t\"subscribe_id=%d publish_id=%d address=\" MACSTR\n \t\t\" fsd=%d fsd_gas=%d srv_proto_type=%u ssi=%s\",\n-\t\tsubscribe_id, peer_publish_id, MAC2STR(peer_addr),\n-\t\tfsd, fsd_gas, srv_proto_type, ssi_hex);\n+\t\tres->subscribe_id,\n+\t\tres->peer_publish_id,\n+\t\tMAC2STR(res->peer_addr),\n+\t\tres->fsd, res->fsd_gas,\n+\t\tres->srv_proto_type, ssi_hex);\n \tos_free(ssi_hex);\n }\n \ndiff --git a/src/common/nan_de.c b/src/common/nan_de.c\nindex f3a28b6e28..10ffcabce4 100644\n--- a/src/common/nan_de.c\n+++ b/src/common/nan_de.c\n@@ -1404,6 +1404,8 @@ static bool nan_de_rx_publish(struct nan_de *de, struct nan_de_service *srv,\n \t\t\t      bool range_limit, int rssi,\n \t\t\t      const u8 *buf, size_t buf_len)\n {\n+\tstruct nan_discovery_result res;\n+\n \t/* The SCIA can potentially contain a PMKID for each cipher suite */\n \tu8 pmkid_list[(NAN_CS_MAX - 1) * PMKID_LEN];\n \tsize_t pmkid_count = 0;\n@@ -1450,32 +1452,38 @@ static bool nan_de_rx_publish(struct nan_de *de, struct nan_de_service *srv,\n \t}\n \n send_event:\n-\t/* Parse Cipher Suite Information Attribute for cipher suites */\n+\tos_memset(&res, 0, sizeof(res));\n+\n \tif (buf && buf_len > 0) {\n+\t\t/* Parse Cipher Suite Information Attribute */\n \t\tcipher_suite_count =\n \t\t\tnan_de_parse_csia(buf, buf_len, instance_id,\n \t\t\t\t\t  cipher_suites,\n-\t\t\t\t\t  ARRAY_SIZE(cipher_suites), NULL);\n-\t}\n-\n-\t/* Parse Security Context Information attribute for PMKIDs */\n-\tif (buf && buf_len > 0) {\n-\t\tpmkid_count = nan_de_parse_scia(buf, buf_len, instance_id,\n-\t\t\t\t\t\tpmkid_list,\n-\t\t\t\t\t\tsizeof(pmkid_list) / PMKID_LEN);\n-\t}\n+\t\t\t\t\t  ARRAY_SIZE(cipher_suites),\n+\t\t\t\t\t  NULL);\n+\n+\t\t/* Parse Security Context Information attribute */\n+\t\tpmkid_count =\n+\t\t\tnan_de_parse_scia(buf, buf_len, instance_id,\n+\t\t\t\t\t  pmkid_list,\n+\t\t\t\t\t  sizeof(pmkid_list) / PMKID_LEN);\n+\t}\n+\n+\tres.subscribe_id = srv->id;\n+\tres.srv_proto_type = srv_proto_type;\n+\tres.ssi = ssi;\n+\tres.ssi_len = ssi_len;\n+\tres.peer_publish_id = instance_id;\n+\tres.peer_addr = peer_addr;\n+\tres.fsd = !!(sdea_control & NAN_SDEA_CTRL_FSD_REQ);\n+\tres.fsd_gas = !!(sdea_control & NAN_SDEA_CTRL_FSD_GAS);\n+\tres.cipher_suites = cipher_suite_count > 0 ? cipher_suites : NULL;\n+\tres.n_cipher_suites = cipher_suite_count;\n+\tres.pmkid_list = pmkid_count > 0 ? pmkid_list : NULL;\n+\tres.pmkid_count = pmkid_count;\n \n \tif (de->cb.discovery_result)\n-\t\tde->cb.discovery_result(\n-\t\t\tde->cb.ctx, srv->id, srv_proto_type,\n-\t\t\tssi, ssi_len, instance_id,\n-\t\t\tpeer_addr,\n-\t\t\tsdea_control & NAN_SDEA_CTRL_FSD_REQ,\n-\t\t\tsdea_control & NAN_SDEA_CTRL_FSD_GAS,\n-\t\t\tpmkid_count > 0 ? pmkid_list : NULL,\n-\t\t\tpmkid_count,\n-\t\t\tcipher_suite_count > 0 ? cipher_suites : NULL,\n-\t\t\tcipher_suite_count);\n+\t\tde->cb.discovery_result(de->cb.ctx, &res);\n \n \treturn true;\n }\ndiff --git a/src/common/nan_de.h b/src/common/nan_de.h\nindex 705ddc1836..cfba430bc6 100644\n--- a/src/common/nan_de.h\n+++ b/src/common/nan_de.h\n@@ -24,6 +24,21 @@ enum nan_de_reason {\n \tNAN_DE_REASON_FAILURE,\n };\n \n+struct nan_discovery_result {\n+\tint subscribe_id;\n+\tenum nan_service_protocol_type srv_proto_type;\n+\tconst u8 *ssi;\n+\tsize_t ssi_len;\n+\tint peer_publish_id;\n+\tconst u8 *peer_addr;\n+\tbool fsd;\n+\tbool fsd_gas;\n+\tconst u8 *pmkid_list;\n+\tsize_t pmkid_count;\n+\tconst u8 *cipher_suites;\n+\tsize_t n_cipher_suites;\n+};\n+\n struct nan_callbacks {\n \tvoid *ctx;\n \n@@ -33,15 +48,7 @@ struct nan_callbacks {\n \tint (*listen)(void *ctx, unsigned int freq, unsigned int duration);\n \n \t/* NAN DE Events */\n-\tvoid (*discovery_result)(void *ctx, int subscribe_id,\n-\t\t\t\t enum nan_service_protocol_type srv_proto_type,\n-\t\t\t\t const u8 *ssi, size_t ssi_len,\n-\t\t\t\t int peer_publish_id,\n-\t\t\t\t const u8 *peer_addr, bool fsd, bool fsd_gas,\n-\t\t\t\t const u8 *pmkid_list, size_t pmkid_count,\n-\t\t\t\t const u8 *cipher_suite,\n-\t\t\t\t size_t n_cipher_suite);\n-\n+\tvoid (*discovery_result)(void *ctx, struct nan_discovery_result *res);\n \tvoid (*replied)(void *ctx, int publish_id, const u8 *peer_addr,\n \t\t\tint peer_subscribe_id,\n \t\t\tenum nan_service_protocol_type srv_proto_type,\ndiff --git a/wpa_supplicant/nan_supplicant.c b/wpa_supplicant/nan_supplicant.c\nindex ac8294d53e..ab9209e0f3 100644\n--- a/wpa_supplicant/nan_supplicant.c\n+++ b/wpa_supplicant/nan_supplicant.c\n@@ -3348,21 +3348,11 @@ static int wpas_nan_de_listen(void *ctx, unsigned int freq,\n \n \n static void\n-wpas_nan_de_discovery_result(void *ctx, int subscribe_id,\n-\t\t\t     enum nan_service_protocol_type srv_proto_type,\n-\t\t\t     const u8 *ssi, size_t ssi_len, int peer_publish_id,\n-\t\t\t     const u8 *peer_addr, bool fsd, bool fsd_gas,\n-\t\t\t     const u8 *pmkid_list, size_t pmkid_count,\n-\t\t\t     const u8 *cipher_suite,\n-\t\t\t     size_t n_cipher_suite)\n+wpas_nan_de_discovery_result(void *ctx, struct nan_discovery_result *res)\n {\n \tstruct wpa_supplicant *wpa_s = ctx;\n \n-\twpas_notify_nan_discovery_result(wpa_s, srv_proto_type, subscribe_id,\n-\t\t\t\t\t peer_publish_id, peer_addr, fsd,\n-\t\t\t\t\t fsd_gas, ssi, ssi_len,\n-\t\t\t\t\t pmkid_list, pmkid_count,\n-\t\t\t\t\t cipher_suite, n_cipher_suite);\n+\twpas_notify_nan_discovery_result(wpa_s, res);\n }\n \n \ndiff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c\nindex 8a0cabc052..d2b9c66c33 100644\n--- a/wpa_supplicant/notify.c\n+++ b/wpa_supplicant/notify.c\n@@ -1100,56 +1100,50 @@ void wpas_notify_hs20_t_c_acceptance(struct wpa_supplicant *wpa_s,\n #if defined(CONFIG_NAN) || defined(CONFIG_NAN_USD)\n \n void wpas_notify_nan_discovery_result(struct wpa_supplicant *wpa_s,\n-\t\t\t\t      enum nan_service_protocol_type\n-\t\t\t\t      srv_proto_type,\n-\t\t\t\t      int subscribe_id, int peer_publish_id,\n-\t\t\t\t      const u8 *peer_addr,\n-\t\t\t\t      bool fsd, bool fsd_gas,\n-\t\t\t\t      const u8 *ssi, size_t ssi_len,\n-\t\t\t\t      const u8 *pmkid_list, size_t pmkid_count,\n-\t\t\t\t      const u8 *cipher_suite_list,\n-\t\t\t\t      size_t cipher_suite_count)\n+\t\t\t\t      struct nan_discovery_result *res)\n {\n \tchar *ssi_hex, *pmkid_hex = NULL;\n \tchar *cipher_suites_str = NULL;\n \tsize_t i;\n \tconst size_t pmkid_hex_len = 2 * PMKID_LEN + 1;\n \n-\tssi_hex = os_zalloc(2 * ssi_len + 1);\n+\tssi_hex = os_zalloc(2 * res->ssi_len + 1);\n \tif (!ssi_hex)\n \t\treturn;\n-\tif (ssi)\n-\t\twpa_snprintf_hex(ssi_hex, 2 * ssi_len + 1, ssi, ssi_len);\n+\tif (res->ssi)\n+\t\twpa_snprintf_hex(ssi_hex, 2 * res->ssi_len + 1,\n+\t\t\t\t res->ssi, res->ssi_len);\n \n-\tif (pmkid_list && pmkid_count > 0) {\n-\t\tpmkid_hex = os_zalloc(pmkid_count * pmkid_hex_len);\n+\tif (res->pmkid_list && res->pmkid_count > 0) {\n+\t\tpmkid_hex =\n+\t\t\tos_zalloc(res->pmkid_count * pmkid_hex_len);\n \t\tif (pmkid_hex) {\n-\t\t\tfor (i = 0; i < pmkid_count; i++) {\n+\t\t\tfor (i = 0; i < res->pmkid_count; i++) {\n \t\t\t\tchar *pos = &pmkid_hex[i * pmkid_hex_len];\n \n \t\t\t\twpa_snprintf_hex(pos, pmkid_hex_len,\n-\t\t\t\t\t\t &pmkid_list[i * PMKID_LEN],\n+\t\t\t\t\t\t &res->pmkid_list[i * PMKID_LEN],\n \t\t\t\t\t\t PMKID_LEN);\n-\t\t\t\tif (i < pmkid_count - 1)\n+\t\t\t\tif (i < res->pmkid_count - 1)\n \t\t\t\t\tpos[2 * PMKID_LEN] = ',';\n \t\t\t}\n \t\t}\n \t}\n \n-\tif (cipher_suite_list && cipher_suite_count > 0) {\n+\tif (res->cipher_suites && res->n_cipher_suites > 0) {\n \t\t/* Allocate enough space for trailing space after each cipher */\n-\t\tcipher_suites_str = os_zalloc(cipher_suite_count * 2);\n+\t\tcipher_suites_str = os_zalloc(res->n_cipher_suites * 2);\n \t\tif (cipher_suites_str) {\n \t\t\tchar *pos = cipher_suites_str;\n \n-\t\t\tfor (i = 0; i < cipher_suite_count; i++) {\n+\t\t\tfor (i = 0; i < res->n_cipher_suites; i++) {\n \t\t\t\tint ret = os_snprintf(pos,\n-\t\t\t\t\t\t      cipher_suite_count * 2 - (pos - cipher_suites_str),\n+\t\t\t\t\t\t      res->n_cipher_suites * 2 - (pos - cipher_suites_str),\n \t\t\t\t\t\t      \"%s%u\",\n \t\t\t\t\t\t      i > 0 ? \",\" : \"\",\n-\t\t\t\t\t\t      cipher_suite_list[i]);\n+\t\t\t\t\t\t      res->cipher_suites[i]);\n \n-\t\t\t\tif (os_snprintf_error(cipher_suite_count * 2 - (pos - cipher_suites_str),\n+\t\t\t\tif (os_snprintf_error(res->n_cipher_suites * 2 - (pos - cipher_suites_str),\n \t\t\t\t\t\t      ret))\n \t\t\t\t\tbreak;\n \t\t\t\tpos += ret;\n@@ -1160,8 +1154,10 @@ void wpas_notify_nan_discovery_result(struct wpa_supplicant *wpa_s,\n \twpa_msg_global(wpa_s, MSG_INFO, NAN_DISCOVERY_RESULT\n \t\t       \"subscribe_id=%d publish_id=%d address=\" MACSTR\n \t\t       \" fsd=%d fsd_gas=%d srv_proto_type=%u ssi=%s%s%s%s%s\",\n-\t\t       subscribe_id, peer_publish_id, MAC2STR(peer_addr),\n-\t\t       fsd, fsd_gas, srv_proto_type, ssi_hex,\n+\t\t       res->subscribe_id,\n+\t\t       res->peer_publish_id,\n+\t\t       MAC2STR(res->peer_addr),\n+\t\t       res->fsd, res->fsd_gas, res->srv_proto_type, ssi_hex,\n \t\t       pmkid_hex ? \" pmkid=\" : \"\",\n \t\t       pmkid_hex ? pmkid_hex : \"\",\n \t\t       cipher_suites_str ? \" cipher_suites=\" : \"\",\n@@ -1170,10 +1166,13 @@ void wpas_notify_nan_discovery_result(struct wpa_supplicant *wpa_s,\n \tos_free(pmkid_hex);\n \tos_free(cipher_suites_str);\n \n-\twpas_dbus_signal_nan_discovery_result(wpa_s, srv_proto_type,\n-\t\t\t\t\t      subscribe_id, peer_publish_id,\n-\t\t\t\t\t      peer_addr, fsd, fsd_gas,\n-\t\t\t\t\t      ssi, ssi_len);\n+\twpas_dbus_signal_nan_discovery_result(wpa_s,\n+\t\t\t\t\t      res->srv_proto_type,\n+\t\t\t\t\t      res->subscribe_id,\n+\t\t\t\t\t      res->peer_publish_id,\n+\t\t\t\t\t      res->peer_addr,\n+\t\t\t\t\t      res->fsd, res->fsd_gas,\n+\t\t\t\t\t      res->ssi, res->ssi_len);\n }\n \n \ndiff --git a/wpa_supplicant/notify.h b/wpa_supplicant/notify.h\nindex 3d683c4219..8eb936a7dc 100644\n--- a/wpa_supplicant/notify.h\n+++ b/wpa_supplicant/notify.h\n@@ -19,6 +19,7 @@ struct wpa_cred;\n struct rsn_pmksa_cache_entry;\n enum nan_de_reason;\n enum nan_service_protocol_type;\n+struct nan_discovery_result;\n \n int wpas_notify_supplicant_initialized(struct wpa_global *global);\n void wpas_notify_supplicant_deinitialized(struct wpa_global *global);\n@@ -185,15 +186,7 @@ void wpas_notify_signal_change(struct wpa_supplicant *wpa_s);\n void wpas_notify_hs20_t_c_acceptance(struct wpa_supplicant *wpa_s,\n \t\t\t\t     const char *url);\n void wpas_notify_nan_discovery_result(struct wpa_supplicant *wpa_s,\n-\t\t\t\t      enum nan_service_protocol_type\n-\t\t\t\t      srv_proto_type,\n-\t\t\t\t      int subscribe_id, int peer_publish_id,\n-\t\t\t\t      const u8 *peer_addr,\n-\t\t\t\t      bool fsd, bool fsd_gas,\n-\t\t\t\t      const u8 *ssi, size_t ssi_len,\n-\t\t\t\t      const u8 *pmkid_list, size_t pmkid_count,\n-\t\t\t\t      const u8 *cipher_suite_list,\n-\t\t\t\t      size_t cipher_suite_count);\n+\t\t\t\t      struct nan_discovery_result *res);\n void wpas_notify_nan_replied(struct wpa_supplicant *wpa_s,\n \t\t\t     enum nan_service_protocol_type srv_proto_type,\n \t\t\t     int publish_id, int peer_subscribe_id,\n","prefixes":["86/92"]}