mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(esp_wifi): Fix issues in NAN datapath establishment
1. Resolve indefinite waiting while stopping NAN 2. Increase NDP response timeout to 8 DW's 3. Set NAN discovery beacon interval to 100 TU's as per Section 9.2 of Wi-Fi Aware Specification v4.0
This commit is contained in:
parent
ee8a9e8410
commit
029748bfad
@ -1 +1 @@
|
||||
Subproject commit bcb739c215e8c06c42b11a19918414deebcea7e3
|
||||
Subproject commit 8fd22ddcaf33a066d6f87375530475293a4b2630
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -32,8 +32,9 @@
|
||||
#define MACADDR_EQUAL(a1, a2) (memcmp(a1, a2, MACADDR_LEN))
|
||||
#define MACADDR_COPY(dst, src) (memcpy(dst, src, MACADDR_LEN))
|
||||
#define NAN_DW_INTVL_MS 524 /* NAN DW interval (512 TU's ~= 524 mSec) */
|
||||
#define NAN_NDP_RESP_TIMEOUT_DW 4
|
||||
#define NAN_NDP_RESP_TIMEOUT_DW 8
|
||||
#define NAN_NDP_RESP_TIMEOUT NAN_NDP_RESP_TIMEOUT_DW*NAN_DW_INTVL_MS
|
||||
#define NAN_NDP_TERM_TIMEOUT 2*NAN_DW_INTVL_MS /* NDP Termination Timeout - 2 DW*/
|
||||
|
||||
/* Global Variables */
|
||||
static const char *TAG = "nan_app";
|
||||
@ -800,7 +801,7 @@ esp_err_t esp_wifi_nan_stop(void)
|
||||
|
||||
NAN_DATA_UNLOCK();
|
||||
os_event_group_clear_bits(nan_event_group, NDP_TERMINATED);
|
||||
os_event_group_wait_bits(nan_event_group, NDP_TERMINATED, pdFALSE, pdFALSE, portMAX_DELAY);
|
||||
os_event_group_wait_bits(nan_event_group, NDP_TERMINATED, pdFALSE, pdFALSE, pdMS_TO_TICKS(NAN_NDP_TERM_TIMEOUT));
|
||||
os_event_group_clear_bits(nan_event_group, NDP_TERMINATED);
|
||||
/* Wait for 1 NAN DW interval (512 TU's ~= 524 mSec) for successful termination */
|
||||
g_wifi_osi_funcs._task_delay(NAN_DW_INTVL_MS/portTICK_PERIOD_MS);
|
||||
|
Loading…
Reference in New Issue
Block a user