Merge branch 'bugfix/pub_ndp_setup_timeout' into 'master'

fix(nan): Cluster merging and NIK NVS persistence, including pairing and NDP fixes

Closes WIFIBUG-1932, WIFIBUG-1931, WIFIBUG-1927, WIFIBUG-1942, WIFIBUG-1948, WIFIBUG-1955, WIFIBUG-1986, and WIFIBUG-1975

See merge request espressif/esp-idf!49185
This commit is contained in:
Jiang Jiang Jian
2026-06-24 20:57:22 +08:00
22 changed files with 984 additions and 599 deletions
@@ -195,6 +195,7 @@ struct nan_sync_callbacks {
void (* receive_pasn)(uint8_t *buf, size_t len, uint16_t trans_seq, uint16_t status);
uint32_t (* get_nira_len)(void);
int (* construct_nira)(uint8_t *frm);
bool (*verify_nira)(uint8_t *peer_mac, uint8_t *nira_attr, uint16_t nira_attr_len);
};
/* Host helpers for NAN encrypted-datapath, registered via
@@ -231,6 +232,9 @@ struct nan_secure_dp_funcs {
* encrypted KDE payload (GTK/IGTK/BIGTK). */
int (*ndp_security_install_get_shared_desc_len)(void);
uint8_t (*get_ndp_resp_num_pmkids)(uint8_t ndp_id, const uint8_t *peer_nmi);
uint32_t (*get_ndp_resp_shared_key_desc_len)(uint8_t ndp_id, const uint8_t *peer_nmi);
/* --- CSIA / SCIA construction. Each writes a complete NAN
* attribute (header + body) at @c frm and returns bytes
* written, or -1 on error. --- */
@@ -1197,6 +1201,17 @@ uint32_t esp_nan_get_nira_len(void);
*/
int esp_nan_construct_nira(uint8_t *frm);
/**
* @brief Verify a received NAN Identity Resolution Attribute (NIRA)
*
* @param[in] peer_mac NMI of the sender
* @param[in] nira_attr NIRA attribute buffer
* @param[in] nira_attr_len Attribute length in bytes
*
* @return true if the tag matches, false otherwise
*/
bool esp_nan_verify_nira(uint8_t *peer_mac, uint8_t *nira_attr, uint16_t nira_attr_len);
/**
* @brief Get the time information from the MAC clock. The time is precise only if modem sleep or light sleep is not enabled.
*