mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Merge branch 'bugfix/fix_some_wifi_bugs_1030_v5.2' into 'release/v5.2'
Bugfix/fix some wifi bugs 1030 v5.2(Backport v5.2) See merge request espressif/esp-idf!34707
This commit is contained in:
@ -315,6 +315,7 @@ typedef enum {
|
||||
/** Argument structure for twt configuration */
|
||||
typedef struct {
|
||||
bool post_wakeup_event; /**< post twt wakeup event */
|
||||
bool twt_enable_keep_alive; /**< twt enable send qos null to keep alive */
|
||||
} wifi_twt_config_t;
|
||||
|
||||
/** Argument structure for WIFI_EVENT_TWT_WAKEUP event */
|
||||
|
Submodule components/esp_wifi/lib updated: e7747d4ec5...172c1c5072
@ -38,6 +38,12 @@ menu "Example Configuration"
|
||||
help
|
||||
Set static gateway address.
|
||||
|
||||
config EXAMPLE_TWT_ENABLE_KEEP_ALIVE_QOS_NULL
|
||||
bool "enable keep alive qos null"
|
||||
default n
|
||||
help
|
||||
Enable send QOS NULL to keep alive during TWT.
|
||||
|
||||
menu "iTWT Configuration"
|
||||
config EXAMPLE_ITWT_TRIGGER_ENABLE
|
||||
bool "trigger-enabled"
|
||||
|
@ -48,6 +48,12 @@ static const char *TAG = "itwt";
|
||||
#define DEFAULT_PWD CONFIG_EXAMPLE_WIFI_PASSWORD
|
||||
#define ITWT_SETUP_SUCCESS 1
|
||||
|
||||
#if CONFIG_EXAMPLE_TWT_ENABLE_KEEP_ALIVE_QOS_NULL
|
||||
bool keep_alive_enabled = true;
|
||||
#else
|
||||
bool keep_alive_enabled = false;
|
||||
#endif
|
||||
|
||||
#if CONFIG_EXAMPLE_ITWT_TRIGGER_ENABLE
|
||||
uint8_t trigger_enabled = 1;
|
||||
#else
|
||||
@ -259,6 +265,12 @@ static void wifi_itwt(void)
|
||||
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
|
||||
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config));
|
||||
|
||||
wifi_twt_config_t wifi_twt_config = {
|
||||
.post_wakeup_event = false,
|
||||
.twt_enable_keep_alive = keep_alive_enabled,
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_wifi_sta_twt_config(&wifi_twt_config));
|
||||
|
||||
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);
|
||||
esp_wifi_set_ps(WIFI_PS_MIN_MODEM);
|
||||
|
Reference in New Issue
Block a user