From 4953f59b25ea5d7d8159e69d7c88627fa988ff3c Mon Sep 17 00:00:00 2001 From: muhaidong Date: Wed, 2 Nov 2022 15:02:02 +0800 Subject: [PATCH] esp_wifi: number of WiFi cache TX buffers should not equal 0 when enable SPIRAM --- components/esp_wifi/src/wifi_init.c | 5 +++++ 1 file changed, 5 insertions(+) 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) {