diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index 6ba1e9881278..d20991cd6a54 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -116,7 +116,7 @@ typedef struct { #define WIFI_STATIC_TX_BUFFER_NUM 0 #endif -#if (CONFIG_ESP32_SPIRAM_SUPPORT || CONFIG_ESP32S2_SPIRAM_SUPPORT || CONFIG_ESP32S3_SPIRAM_SUPPORT) +#if CONFIG_SPIRAM #define WIFI_CACHE_TX_BUFFER_NUM CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM #else #define WIFI_CACHE_TX_BUFFER_NUM 0 diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 774353036b5d..8132b55aa5a1 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 774353036b5d4bc9055d7961e7011b676c858be2 +Subproject commit 8132b55aa5a11783f5c32cc526d04e1f168d8939 diff --git a/components/esp_wifi/src/wifi_init.c b/components/esp_wifi/src/wifi_init.c index 02517049e8f5..b02e0bbe6148 100644 --- a/components/esp_wifi/src/wifi_init.c +++ b/components/esp_wifi/src/wifi_init.c @@ -182,6 +182,11 @@ static void esp_wifi_config_info(void) esp_err_t esp_wifi_init(const wifi_init_config_t *config) { + if ((config->feature_caps & CONFIG_FEATURE_CACHE_TX_BUF_BIT) && (WIFI_CACHE_TX_BUFFER_NUM == 0)) + { + ESP_LOGE(TAG, "Number of WiFi cache TX buffers should not equal 0 when enable SPIRAM"); + return ESP_ERR_NOT_SUPPORTED; + } esp_wifi_power_domain_on(); #ifdef CONFIG_PM_ENABLE if (s_wifi_modem_sleep_lock == NULL) {