From 8ae605b70f4935ea56637df24d1053b876837e89 Mon Sep 17 00:00:00 2001 From: Akshat Agrawal Date: Thu, 4 Jun 2026 12:25:35 +0530 Subject: [PATCH] fix(nan): Add CLUSTER_JOIN Event and Cluster merging feat --- components/esp_wifi/include/esp_wifi_types_generic.h | 8 ++++++++ .../remote/include/injected/esp_wifi_types_generic.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/components/esp_wifi/include/esp_wifi_types_generic.h b/components/esp_wifi/include/esp_wifi_types_generic.h index ac5c111f566..8adb1ddd2f9 100644 --- a/components/esp_wifi/include/esp_wifi_types_generic.h +++ b/components/esp_wifi/include/esp_wifi_types_generic.h @@ -1308,6 +1308,7 @@ typedef enum { WIFI_EVENT_NAN_BOOTSTRAP_COMPLETED, /**< NAN Pairing Bootstrapping completed (success/failure) */ WIFI_EVENT_NAN_PAIRING_INDICATION, /**< Received NAN Pairing indication (reserved) */ WIFI_EVENT_NAN_PAIRING_CONFIRM, /**< NAN PASN pairwise key installation completed */ + WIFI_EVENT_NAN_CLUSTER_JOIN, /**< NAN Cluster joined/started successfully */ WIFI_EVENT_MAX, /**< Invalid Wi-Fi event ID */ } wifi_event_t; @@ -1578,6 +1579,13 @@ typedef struct { uint8_t ssi[]; /**< Service specific info of Subscriber */ } wifi_event_nan_replied_t; +/** + * @brief Argument structure for WIFI_EVENT_NAN_CLUSTER_JOIN event + */ +typedef struct { + uint8_t cluster_id[6]; /**< Cluster ID (BSSID) that was joined/started */ +} wifi_event_nan_cluster_join_t; + /** * @brief Argument structure for WIFI_EVENT_NAN_RECEIVE event */ diff --git a/components/esp_wifi/remote/include/injected/esp_wifi_types_generic.h b/components/esp_wifi/remote/include/injected/esp_wifi_types_generic.h index 6debdfbecb3..397e577ebab 100644 --- a/components/esp_wifi/remote/include/injected/esp_wifi_types_generic.h +++ b/components/esp_wifi/remote/include/injected/esp_wifi_types_generic.h @@ -1308,6 +1308,7 @@ typedef enum { WIFI_EVENT_NAN_BOOTSTRAP_COMPLETED, /**< NAN Pairing Bootstrapping completed (success/failure) */ WIFI_EVENT_NAN_PAIRING_INDICATION, /**< Received NAN Pairing indication (reserved) */ WIFI_EVENT_NAN_PAIRING_CONFIRM, /**< NAN PASN pairwise key installation completed */ + WIFI_EVENT_NAN_CLUSTER_JOIN, /**< NAN Cluster joined/started successfully */ WIFI_EVENT_MAX, /**< Invalid Wi-Fi event ID */ } wifi_event_t; @@ -1578,6 +1579,13 @@ typedef struct { uint8_t ssi[]; /**< Service specific info of Subscriber */ } wifi_event_nan_replied_t; +/** + * @brief Argument structure for WIFI_EVENT_NAN_CLUSTER_JOIN event + */ +typedef struct { + uint8_t cluster_id[6]; /**< Cluster ID (BSSID) that was joined/started */ +} wifi_event_nan_cluster_join_t; + /** * @brief Argument structure for WIFI_EVENT_NAN_RECEIVE event */