From c3500a0700d0f0a24ee07433b9eeee48b91bef09 Mon Sep 17 00:00:00 2001 From: yinqingzhao Date: Tue, 16 Jun 2026 11:14:41 +0800 Subject: [PATCH] fix(wifi): fix cache access error in wifi interrupt with psram enabled --- components/esp_coex/esp32/esp_coex_adapter.c | 2 +- components/esp_coex/esp32c5/esp_coex_adapter.c | 2 +- components/esp_coex/esp32c61/esp_coex_adapter.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/esp_coex/esp32/esp_coex_adapter.c b/components/esp_coex/esp32/esp_coex_adapter.c index fbd93f6a6ad..65c1fa40021 100644 --- a/components/esp_coex/esp32/esp_coex_adapter.c +++ b/components/esp_coex/esp32/esp_coex_adapter.c @@ -46,7 +46,7 @@ void * esp_coex_common_spin_lock_create_wrapper(void) void *mux = heap_caps_malloc(sizeof(portMUX_TYPE), MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL); if (mux) { - memcpy(mux,&tmp,sizeof(portMUX_TYPE)); + memcpy(mux, &tmp, sizeof(portMUX_TYPE)); return mux; } return NULL; diff --git a/components/esp_coex/esp32c5/esp_coex_adapter.c b/components/esp_coex/esp32c5/esp_coex_adapter.c index 8588b7348d1..48b871c8a44 100644 --- a/components/esp_coex/esp32c5/esp_coex_adapter.c +++ b/components/esp_coex/esp32c5/esp_coex_adapter.c @@ -39,7 +39,7 @@ bool IRAM_ATTR esp_coex_common_env_is_chip_wrapper(void) void *esp_coex_common_spin_lock_create_wrapper(void) { portMUX_TYPE tmp = portMUX_INITIALIZER_UNLOCKED; - void *mux = malloc(sizeof(portMUX_TYPE)); + void *mux = heap_caps_malloc(sizeof(portMUX_TYPE), MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL); if (mux) { memcpy(mux, &tmp, sizeof(portMUX_TYPE)); diff --git a/components/esp_coex/esp32c61/esp_coex_adapter.c b/components/esp_coex/esp32c61/esp_coex_adapter.c index 059160f7bab..2778940239d 100644 --- a/components/esp_coex/esp32c61/esp_coex_adapter.c +++ b/components/esp_coex/esp32c61/esp_coex_adapter.c @@ -40,7 +40,7 @@ bool IRAM_ATTR esp_coex_common_env_is_chip_wrapper(void) void *esp_coex_common_spin_lock_create_wrapper(void) { portMUX_TYPE tmp = portMUX_INITIALIZER_UNLOCKED; - void *mux = malloc(sizeof(portMUX_TYPE)); + void *mux = heap_caps_malloc(sizeof(portMUX_TYPE), MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL); if (mux) { memcpy(mux, &tmp, sizeof(portMUX_TYPE));