From 8ae3c733db7e7525358a0c0584573f2c1ee51710 Mon Sep 17 00:00:00 2001 From: zhangyanjiao Date: Wed, 8 Jul 2020 17:27:15 +0800 Subject: [PATCH 1/2] esp wifi bugfix: 1. Fix TX DMA buffer issue 2. API esp_wifi_get_config add acquisition sta.listen_interval 3. Configure bandwidth and phy mode to store NVS 4. If AP's tsf has been restarted, STA will disconnect from AP. 5. Do not reset softAP's tsf except it restart 6. fix the wifi regdomain update bug 7. fix the bug for airkiss find hidden AP fail 8. fix addba and first ampdu send bar --- components/esp_wifi/include/esp_wifi_types.h | 1 + components/esp_wifi/lib_esp32 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/esp_wifi/include/esp_wifi_types.h b/components/esp_wifi/include/esp_wifi_types.h index 035a435a71..5c9d5e2b91 100644 --- a/components/esp_wifi/include/esp_wifi_types.h +++ b/components/esp_wifi/include/esp_wifi_types.h @@ -94,6 +94,7 @@ typedef enum { WIFI_REASON_ASSOC_FAIL = 203, WIFI_REASON_HANDSHAKE_TIMEOUT = 204, WIFI_REASON_CONNECTION_FAIL = 205, + WIFI_REASON_AP_TSF_RESET = 206, } wifi_err_reason_t; typedef enum { diff --git a/components/esp_wifi/lib_esp32 b/components/esp_wifi/lib_esp32 index 6f8c549517..fb16d9213d 160000 --- a/components/esp_wifi/lib_esp32 +++ b/components/esp_wifi/lib_esp32 @@ -1 +1 @@ -Subproject commit 6f8c549517a5a0c7c9202e1fe06cff2f85a2bc6e +Subproject commit fb16d9213d97aa4b6478f76d105ed46b7f1dbe80 From 4e831ac0807243963e8514c190cf4bb58d1d38fd Mon Sep 17 00:00:00 2001 From: xiehang Date: Thu, 28 May 2020 16:53:54 +0800 Subject: [PATCH 2/2] esp_wifi: Add API to get available internal heap size. --- components/esp32/esp_adapter.c | 2 +- components/esp32/system_api.c | 5 +++++ components/esp_common/include/esp_system.h | 10 ++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/components/esp32/esp_adapter.c b/components/esp32/esp_adapter.c index 961b1d30f7..af2e62c08c 100644 --- a/components/esp32/esp_adapter.c +++ b/components/esp32/esp_adapter.c @@ -555,7 +555,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = { ._malloc = malloc, ._free = free, ._event_post = esp_event_post_wrapper, - ._get_free_heap_size = esp_get_free_heap_size, + ._get_free_heap_size = esp_get_free_internal_heap_size, ._rand = esp_random, ._dport_access_stall_other_cpu_start_wrap = esp_dport_access_stall_other_cpu_start_wrap, ._dport_access_stall_other_cpu_end_wrap = esp_dport_access_stall_other_cpu_end_wrap, diff --git a/components/esp32/system_api.c b/components/esp32/system_api.c index 5e5203d311..160860d4f9 100644 --- a/components/esp32/system_api.c +++ b/components/esp32/system_api.c @@ -340,6 +340,11 @@ uint32_t esp_get_free_heap_size( void ) return heap_caps_get_free_size( MALLOC_CAP_DEFAULT ); } +uint32_t esp_get_free_internal_heap_size( void ) +{ + return heap_caps_get_free_size( MALLOC_CAP_8BIT | MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL ); +} + uint32_t esp_get_minimum_free_heap_size( void ) { return heap_caps_get_minimum_free_size( MALLOC_CAP_DEFAULT ); diff --git a/components/esp_common/include/esp_system.h b/components/esp_common/include/esp_system.h index 5e4fe882ff..1e531a8388 100644 --- a/components/esp_common/include/esp_system.h +++ b/components/esp_common/include/esp_system.h @@ -113,6 +113,16 @@ esp_reset_reason_t esp_reset_reason(void); */ uint32_t esp_get_free_heap_size(void); +/** + * @brief Get the size of available internal heap. + * + * Note that the returned value may be larger than the maximum contiguous block + * which can be allocated. + * + * @return Available internal heap size, in bytes. + */ +uint32_t esp_get_free_internal_heap_size(void); + /** * @brief Get the minimum heap that has ever been available *