Skip to content

Commit

Permalink
Merge branch 'contrib/github_pr_10082' into 'master'
Browse files Browse the repository at this point in the history
esp_wifi: Fix deprecated CONFIGs still being used, causing WiFi to not work when SPIRAM is enabled (GitHub PR)

Closes IDFGH-8637

See merge request espressif/esp-idf!20893
  • Loading branch information
jack0c committed Nov 7, 2022
2 parents 94c0e3b + 4953f59 commit 48e2f38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/esp_wifi/include/esp_wifi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions components/esp_wifi/src/wifi_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 48e2f38

Please sign in to comment.