From 93e77a4df6843f14c4962d38559a843acd71a47b Mon Sep 17 00:00:00 2001 From: yinqingzhao Date: Fri, 25 Oct 2024 14:58:18 +0800 Subject: [PATCH] fix(wifi): modify bandwidth in wifi_ap_record_t --- .../esp_wifi/include/esp_wifi_types_generic.h | 30 +++++++++---------- components/esp_wifi/lib | 2 +- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi_types_generic.h b/components/esp_wifi/include/esp_wifi_types_generic.h index 6d13536347..832ce0cfb6 100644 --- a/components/esp_wifi/include/esp_wifi_types_generic.h +++ b/components/esp_wifi/include/esp_wifi_types_generic.h @@ -269,6 +269,19 @@ typedef enum { WIFI_CIPHER_TYPE_UNKNOWN, /**< The cipher type is unknown */ } wifi_cipher_type_t; +/** + * @brief Wi-Fi bandwidth type + */ +typedef enum { + WIFI_BW_HT20 = 1, /**< Bandwidth is HT20 */ + WIFI_BW20 = WIFI_BW_HT20, /**< Bandwidth is 20 MHz */ + WIFI_BW_HT40 = 2, /**< Bandwidth is HT40 */ + WIFI_BW40 = WIFI_BW_HT40, /**< Bandwidth is 40 MHz */ + WIFI_BW80 = 3, /**< Bandwidth is 80 MHz */ + WIFI_BW160 = 4, /**< Bandwidth is 160 MHz */ + WIFI_BW80_BW80 = 5, /**< Bandwidth is 80 + 80 MHz */ +} wifi_bandwidth_t; + /** * @brief Wi-Fi antenna */ @@ -314,9 +327,7 @@ 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 160 MHz, this value is set to 2. - For AP 80 + 80 MHz, this value is set to 3.*/ + wifi_bandwidth_t bandwidth; /**< Bandwidth of AP */ 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 + 80 MHz, it is the center channel frequency of the lower frequency segment.*/ @@ -458,19 +469,6 @@ typedef struct { uint16_t ghz_5g; /**< Represents 5 GHz protocol, support 802.11a or 802.11n or 802.11ac or 802.11ax */ } wifi_protocols_t; -/** - * @brief Wi-Fi bandwidth type - */ -typedef enum { - WIFI_BW_HT20 = 1, /**< Bandwidth is HT20 */ - WIFI_BW20 = WIFI_BW_HT20, /**< Bandwidth is 20 MHz */ - WIFI_BW_HT40 = 2, /**< Bandwidth is HT40 */ - WIFI_BW40 = WIFI_BW_HT40, /**< Bandwidth is 40 MHz */ - WIFI_BW80 = 3, /**< Bandwidth is 80 MHz */ - WIFI_BW160 = 4, /**< Bandwidth is 160 MHz */ - WIFI_BW80_BW80 = 5, /**< Bandwidth is 80 + 80 MHz */ -} wifi_bandwidth_t; - /** * @brief Description of a Wi-Fi band bandwidths */ diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 110a486f37..a663beed1a 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 110a486f374d2d0e5c417bd0c7df86ce9a1a664b +Subproject commit a663beed1a9ef3a316e8502268c14e053db108e1