mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 20:54:32 +02:00
fix(twt): fix some issus related itwt
This commit is contained in:
Submodule components/esp_wifi/lib updated: 5fccd88153...61cdea8dbc
@@ -119,7 +119,7 @@ menu "Example Configuration"
|
||||
depends on !IDF_TARGET_ESP32C2
|
||||
config EXAMPLE_MAX_CPU_FREQ_240
|
||||
bool "240 MHz"
|
||||
depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
|
||||
depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C5
|
||||
endchoice
|
||||
|
||||
config EXAMPLE_MAX_CPU_FREQ_MHZ
|
||||
@@ -131,7 +131,8 @@ menu "Example Configuration"
|
||||
|
||||
choice EXAMPLE_MIN_CPU_FREQ
|
||||
prompt "Minimum CPU frequency"
|
||||
default EXAMPLE_MIN_CPU_FREQ_10M
|
||||
default EXAMPLE_MIN_CPU_FREQ_10M if !IDF_TARGET_ESP32C5
|
||||
default EXAMPLE_MIN_CPU_FREQ_12M if IDF_TARGET_ESP32C5
|
||||
depends on PM_ENABLE
|
||||
help
|
||||
Minimum CPU frequency to use for dynamic frequency scaling.
|
||||
@@ -143,6 +144,9 @@ menu "Example Configuration"
|
||||
config EXAMPLE_MIN_CPU_FREQ_20M
|
||||
bool "20 MHz (use with 40MHz XTAL)"
|
||||
depends on XTAL_FREQ_40 || XTAL_FREQ_AUTO
|
||||
config EXAMPLE_MIN_CPU_FREQ_12M
|
||||
bool "12 MHz (use with 48MHz XTAL)"
|
||||
depends on XTAL_FREQ_48 || XTAL_FREQ_AUTO
|
||||
config EXAMPLE_MIN_CPU_FREQ_10M
|
||||
bool "10 MHz (use with 40MHz XTAL)"
|
||||
depends on XTAL_FREQ_40 || XTAL_FREQ_AUTO
|
||||
@@ -161,5 +165,6 @@ menu "Example Configuration"
|
||||
default 10 if EXAMPLE_MIN_CPU_FREQ_10M
|
||||
default 26 if EXAMPLE_MIN_CPU_FREQ_26M
|
||||
default 13 if EXAMPLE_MIN_CPU_FREQ_13M
|
||||
default 12 if EXAMPLE_MIN_CPU_FREQ_12M
|
||||
|
||||
endmenu
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
@@ -275,9 +275,22 @@ static void wifi_itwt(void)
|
||||
.twt_enable_keep_alive = keep_alive_enabled,
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_wifi_sta_twt_config(&wifi_twt_config));
|
||||
#if CONFIG_SOC_WIFI_SUPPORT_5G
|
||||
wifi_bandwidths_t bw = {
|
||||
.ghz_2g = WIFI_BW_HT20,
|
||||
.ghz_5g = WIFI_BW_HT20,
|
||||
};
|
||||
esp_wifi_set_bandwidths(WIFI_IF_STA, &bw);
|
||||
|
||||
wifi_protocols_t protocol = {
|
||||
.ghz_2g = WIFI_PROTOCOL_11AX,
|
||||
.ghz_5g = WIFI_PROTOCOL_11AX,
|
||||
};
|
||||
esp_wifi_set_protocols(WIFI_IF_STA, &protocol);
|
||||
#else
|
||||
esp_wifi_set_bandwidth(WIFI_IF_STA, WIFI_BW_HT20);
|
||||
esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N | WIFI_PROTOCOL_11AX);
|
||||
#endif
|
||||
esp_wifi_set_ps(WIFI_PS_MIN_MODEM);
|
||||
|
||||
#if CONFIG_EXAMPLE_ENABLE_STATIC_IP
|
||||
|
Reference in New Issue
Block a user