refactor(wifi): remove enum values WIFI_BW_HT20 and WIFI_BW_HT40

This commit is contained in:
yinqingzhao
2026-01-08 11:28:17 +08:00
committed by Jack
parent 2ca037ffa1
commit 28800ed85b
11 changed files with 37 additions and 27 deletions
+5 -5
View File
@@ -723,7 +723,7 @@ Wi-Fi Bandwidth Mode
esp_wifi_set_protocol(WIFI_IF_STA, protocol);
// Set STA interface bandwidth to 40 MHz
esp_wifi_set_bandwidth(WIFI_IF_STA, WIFI_BW_HT40);
esp_wifi_set_bandwidth(WIFI_IF_STA, WIFI_BW40);
.. only:: esp32c6
@@ -748,7 +748,7 @@ Wi-Fi Bandwidth Mode
esp_wifi_set_protocol(WIFI_IF_STA, protocol);
// Set bandwidth of station to 40 MHz
esp_wifi_set_bandwidth(WIFI_IF_STA, WIFI_BW_HT40);
esp_wifi_set_bandwidth(WIFI_IF_STA, WIFI_BW40);
.. only:: esp32c5
@@ -777,8 +777,8 @@ Wi-Fi Bandwidth Mode
// Set bandwidth to 20 MHz for 2.4 GHz band and 40 MHz for 5 GHz band
wifi_bandwidths_t bw = {
.ghz_2g = WIFI_BW_HT20,
.ghz_5g = WIFI_BW_HT40
.ghz_2g = WIFI_BW20,
.ghz_5g = WIFI_BW40
};
esp_wifi_set_bandwidths(WIFI_IF_STA, &bw);
@@ -801,7 +801,7 @@ Wi-Fi Bandwidth Mode
esp_wifi_set_protocol(WIFI_IF_STA, protocol);
// Set bandwidth of the station interface to 40 MHz
esp_wifi_set_bandwidth(WIFI_IF_STA, WIFI_BW_HT40);
esp_wifi_set_bandwidth(WIFI_IF_STA, WIFI_BW40);
.. note::
@@ -37,6 +37,8 @@ Removed Variables, Macros and Enum Values
- **FTM:** Field ``use_get_report_api`` from structure ``wifi_ftm_initiator_cfg_t`` and field ``ftm_report_data`` from structure ``wifi_event_ftm_report_t`` has been removed. Please use ``esp_wifi_ftm_get_report`` to fetch raw FTM report data instead.
- **Wi-Fi Bandwidth:** The enum values ``WIFI_BW_HT20`` and ``WIFI_BW_HT40`` have been removed. Please use the enum values ``WIFI_BW20`` and ``WIFI_BW40`` directly.
Modified Functions and Types
----------------------------