Merge branch 'bugfix/fix_scan_info_error_in_lr_only_mode' into 'master'

fix(wifi): Fixed the scan information error in LR only mode

Closes WIFIBUG-962, WIFIBUG-991, WIFIBUG-1046, IDFGH-13550, IDFGH-14592, and WIFI-4503

See merge request espressif/esp-idf!35730
This commit is contained in:
Jiang Jiang Jian
2025-03-14 18:13:42 +08:00
5 changed files with 20 additions and 4 deletions

View File

@@ -903,7 +903,7 @@ ieee80211_add_rates = 0x40002054;
ieee80211_is_ht_cipher = 0x4000205c; ieee80211_is_ht_cipher = 0x4000205c;
ieee80211_setup_lr_rates = 0x40002068; ieee80211_setup_lr_rates = 0x40002068;
ieee80211_ht_node_init = 0x4000206c; ieee80211_ht_node_init = 0x4000206c;
ieee80211_is_support_rate = 0x40002070; /* ieee80211_is_support_rate = 0x40002070; */
ieee80211_setup_rates = 0x40002074; ieee80211_setup_rates = 0x40002074;
ieee80211_is_lr_only = 0x40002078; ieee80211_is_lr_only = 0x40002078;
ieee80211_setup_phy_mode = 0x4000207c; ieee80211_setup_phy_mode = 0x4000207c;

View File

@@ -111,7 +111,7 @@ extern "C" {
#define ESP_ERR_MESH_DISCARD_DUPLICATE (ESP_ERR_MESH_BASE + 20) /**< discard the packet due to the duplicate sequence number */ #define ESP_ERR_MESH_DISCARD_DUPLICATE (ESP_ERR_MESH_BASE + 20) /**< discard the packet due to the duplicate sequence number */
#define ESP_ERR_MESH_DISCARD (ESP_ERR_MESH_BASE + 21) /**< discard the packet */ #define ESP_ERR_MESH_DISCARD (ESP_ERR_MESH_BASE + 21) /**< discard the packet */
#define ESP_ERR_MESH_VOTING (ESP_ERR_MESH_BASE + 22) /**< vote in progress */ #define ESP_ERR_MESH_VOTING (ESP_ERR_MESH_BASE + 22) /**< vote in progress */
#define ESP_ERR_MESH_XMIT (ESP_ERR_MESH_BASE + 23) /**< XMIT */ #define ESP_ERR_MESH_XMIT (ESP_ERR_MESH_BASE + 23) /**< TX fail, the tx state is a value other than timeout and disconnect */
#define ESP_ERR_MESH_QUEUE_READ (ESP_ERR_MESH_BASE + 24) /**< error in reading queue */ #define ESP_ERR_MESH_QUEUE_READ (ESP_ERR_MESH_BASE + 24) /**< error in reading queue */
#define ESP_ERR_MESH_PS (ESP_ERR_MESH_BASE + 25) /**< mesh PS is not specified as enable or disable */ #define ESP_ERR_MESH_PS (ESP_ERR_MESH_BASE + 25) /**< mesh PS is not specified as enable or disable */
#define ESP_ERR_MESH_RECV_RELEASE (ESP_ERR_MESH_BASE + 26) /**< release esp_mesh_recv_toDS */ #define ESP_ERR_MESH_RECV_RELEASE (ESP_ERR_MESH_BASE + 26) /**< release esp_mesh_recv_toDS */
@@ -682,6 +682,8 @@ esp_err_t esp_mesh_stop(void);
* - ESP_ERR_MESH_QUEUE_FULL * - ESP_ERR_MESH_QUEUE_FULL
* - ESP_ERR_MESH_NO_ROUTE_FOUND * - ESP_ERR_MESH_NO_ROUTE_FOUND
* - ESP_ERR_MESH_DISCARD * - ESP_ERR_MESH_DISCARD
* - ESP_ERR_MESH_NOT_SUPPORT
* - ESP_ERR_MESH_XMIT
*/ */
esp_err_t esp_mesh_send(const mesh_addr_t *to, const mesh_data_t *data, esp_err_t esp_mesh_send(const mesh_addr_t *to, const mesh_data_t *data,
int flag, const mesh_opt_t opt[], int opt_count); int flag, const mesh_opt_t opt[], int opt_count);

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -777,6 +777,14 @@ esp_err_t esp_wifi_connect_internal(void);
*/ */
esp_err_t esp_wifi_disconnect_internal(void); esp_err_t esp_wifi_disconnect_internal(void);
/**
* @brief Get the time information from the MAC clock. The time is precise only if modem sleep or light sleep is not enabled.
*
* @return 32-bit time value, unit: microsecond. This time is only 32 bits, which means it will overflow and reset to 0 after approximately 71 minutes.
* Therefore, when using it, the time difference between two consecutive readings should not be too long.
*/
uint32_t esp_wifi_internal_get_mac_clock_time(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@@ -168,6 +168,12 @@ void app_main(void)
} }
ESP_ERROR_CHECK(ret); ESP_ERROR_CHECK(ret);
if (CONFIG_LOG_MAXIMUM_LEVEL > CONFIG_LOG_DEFAULT_LEVEL) {
/* If you only want to open more logs in the wifi module, you need to make the max level greater than the default level,
* and call esp_log_level_set() before esp_wifi_init() to improve the log level of the wifi module. */
esp_log_level_set("wifi", CONFIG_LOG_MAXIMUM_LEVEL);
}
ESP_LOGI(TAG, "ESP_WIFI_MODE_STA"); ESP_LOGI(TAG, "ESP_WIFI_MODE_STA");
wifi_init_sta(); wifi_init_sta();
} }