forked from espressif/esp-idf
Merge branch 'bugfix/fix_some_wifi_bugs_1030_v5.3' into 'release/v5.3'
Bugfix/fix some wifi bugs 1030 v5.3(Backport v5.3) See merge request espressif/esp-idf!34705
This commit is contained in:
@ -13,8 +13,8 @@ const char __attribute__((section(".rodata"))) phy_init_magic_pre[] = PHY_INIT_M
|
||||
* @brief Structure containing default recommended PHY initialization parameters.
|
||||
*/
|
||||
const esp_phy_init_data_t phy_init_data= { {
|
||||
0x01,
|
||||
0x00,
|
||||
0xa,
|
||||
0x0,
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x54),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x54),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x50),
|
||||
@ -29,60 +29,62 @@ const esp_phy_init_data_t phy_init_data= { {
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x3C),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x3C),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x3C),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x4c),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x4c),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x4c),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x48),
|
||||
0x0,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0xff,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@ -138,9 +140,7 @@ const esp_phy_init_data_t phy_init_data= { {
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0x70
|
||||
0x51
|
||||
} };
|
||||
|
||||
const char __attribute__((section(".rodata"))) phy_init_magic_post[] = PHY_INIT_MAGIC;
|
||||
|
@ -112,7 +112,7 @@ pm_disable_sleep_delay_timer = 0x40000d50;
|
||||
/*pm_dream = 0x40000d54;*/
|
||||
pm_mac_wakeup = 0x40000d58;
|
||||
pm_mac_sleep = 0x40000d5c;
|
||||
pm_enable_active_timer = 0x40000d60;
|
||||
/*pm_enable_active_timer = 0x40000d60;*/
|
||||
pm_enable_sleep_delay_timer = 0x40000d64;
|
||||
pm_local_tsf_process = 0x40000d68;
|
||||
pm_set_beacon_filter = 0x40000d6c;
|
||||
|
@ -406,6 +406,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 */
|
||||
|
@ -258,9 +258,9 @@ typedef struct {
|
||||
uint32_t reserved: 22; /**< bit: 10..31 reserved */
|
||||
wifi_country_t country; /**< country information of AP */
|
||||
wifi_he_ap_info_t he_ap; /**< HE AP info */
|
||||
uint8_t bandwidth; /**< For either 20 MHz or 40 MHz operation, the Channel Width field is set to 0.
|
||||
For AP 80 MHz this value is set to 1. For AP 160MHz sets this value is set to 2.
|
||||
For AP 80+80MHz this value is set to 3*/
|
||||
uint8_t bandwidth; /**< For AP 20 MHz this value is set to 1. For AP 40 MHz this value is set to 2.
|
||||
For AP 80 MHz this value is set to 3. For AP 160MHz this value is set to 4.
|
||||
For AP 80+80MHz this value is set to 5*/
|
||||
uint8_t vht_ch_freq1; /**< this fields are used only AP bandwidth is 80 and 160 MHz, to transmit the center channel
|
||||
frequency of the BSS. For AP bandwidth is 80+80MHz, it is the center channel frequency
|
||||
of the lower frequency segment.*/
|
||||
|
Submodule components/esp_wifi/lib updated: 4b81aaa3da...564eb0c3a9
@ -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"
|
||||
|
@ -49,6 +49,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
|
||||
@ -264,6 +270,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