[PATCH 14/92] wpa_supplicant: Indicate NAN pairing capabilities in publish/subscribe

Andrei Otcheretianski andrei.otcheretianski at intel.com
Wed Apr 22 05:23:05 PDT 2026


From: Avraham Stern <avraham.stern at intel.com>

Add the NAN attributes that indicate the pairing capabilities
to publish/subscribe messages. If pairing setup, NPK caching and
pairing verification are all disabled, the attributes are not added.

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 wpa_supplicant/nan_supplicant.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/wpa_supplicant/nan_supplicant.c b/wpa_supplicant/nan_supplicant.c
index 94401edccd..900b9eeb83 100644
--- a/wpa_supplicant/nan_supplicant.c
+++ b/wpa_supplicant/nan_supplicant.c
@@ -2492,14 +2492,19 @@ static void wpas_nan_de_add_extra_attrs(void *ctx, struct wpabuf *buf)
 	struct nan_schedule sched;
 	u32 map_ids = (BIT(wpa_s->nan_capa.num_radios) - 1) << 1;
 
-	if (!wpas_nan_ready(wpa_s) || !map_ids)
+	if (!wpas_nan_ready(wpa_s))
 		return;
 
-	wpas_nan_fill_ndp_schedule(wpa_s, &sched);
-	nan_add_dev_capa_attr(wpa_s->nan, buf);
-	nan_convert_sched_to_avail_attrs(wpa_s->nan,
-					 wpa_s->schedule_sequence_id, map_ids,
-					 sched.n_chans, sched.chans, buf, true);
+	if (map_ids) {
+		wpas_nan_fill_ndp_schedule(wpa_s, &sched);
+		nan_add_dev_capa_attr(wpa_s->nan, buf);
+		nan_convert_sched_to_avail_attrs(wpa_s->nan,
+						 wpa_s->schedule_sequence_id,
+						 map_ids, sched.n_chans,
+						 sched.chans, buf, true);
+	}
+
+	nan_pairing_add_attrs(wpa_s->nan, buf);
 }
 
 
-- 
2.53.0




More information about the Hostap mailing list