From 7d3733d25523a595c7440d7567e97e87b919facf Mon Sep 17 00:00:00 2001 From: liu zhifu Date: Mon, 29 Apr 2019 20:13:31 +0800 Subject: [PATCH] esp32: backport some WiFi fixes to v3.2 Backport following WiFi fixes to v3.2: 1. Add support for STA HT2040 coexist management 2. Add support for WPA2 improvements 3. Disallow HT rate when unicast/mcast cipher is TKIP/WEP 4. Add support for signal test 5. Fix the bug that WPS fails when AP is encrypted --- components/esp32/include/esp_wifi.h | 13 +++++++++++ components/esp32/include/esp_wifi_types.h | 28 +++++++++++++++++++++++ components/esp32/lib | 2 +- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/components/esp32/include/esp_wifi.h b/components/esp32/include/esp_wifi.h index 3348f8f4ef..e67f4606bd 100644 --- a/components/esp32/include/esp_wifi.h +++ b/components/esp32/include/esp_wifi.h @@ -1102,6 +1102,19 @@ esp_err_t esp_wifi_set_ant(const wifi_ant_config_t *config); */ esp_err_t esp_wifi_get_ant(wifi_ant_config_t *config); +/** + * @brief A general API to set/get WiFi internal configuration, it's for debug only + * + * @param cmd : ioctl command type + * @param cfg : configuration for the command + * + * @return + * - ESP_OK: succeed + * - others: failed + */ +esp_err_t esp_wifi_internal_ioctl(int cmd, wifi_ioctl_config_t *cfg); + + #ifdef __cplusplus } #endif diff --git a/components/esp32/include/esp_wifi_types.h b/components/esp32/include/esp_wifi_types.h index f3ccaddce1..cfe45ac6c7 100644 --- a/components/esp32/include/esp_wifi_types.h +++ b/components/esp32/include/esp_wifi_types.h @@ -492,6 +492,34 @@ typedef enum { WIFI_PHY_RATE_MAX, } wifi_phy_rate_t; +/** + * @brief WiFi ioctl command type + * + */ +typedef enum { + WIFI_IOCTL_SET_STA_HT2040_COEX = 1, /**< Set the configuration of STA's HT2040 coexist management */ + WIFI_IOCTL_GET_STA_HT2040_COEX, /**< Get the configuration of STA's HT2040 coexist management */ + WIFI_IOCTL_MAX, +} wifi_ioctl_cmd_t; + +/** + * @brief Configuration for STA's HT2040 coexist management + * + */ +typedef struct { + int enable; /**< Indicate whether STA's HT2040 coexist management is enabled or not */ +} wifi_ht2040_coex_t; + +/** + * @brief Configuration for WiFi ioctl + * + */ +typedef struct { + union { + wifi_ht2040_coex_t ht2040_coex; /**< Configuration of STA's HT2040 coexist management */ + } data; /**< Configuration of ioctl command */ +} wifi_ioctl_config_t; + #ifdef __cplusplus } #endif diff --git a/components/esp32/lib b/components/esp32/lib index bc6972f2ae..b19a0b04ee 160000 --- a/components/esp32/lib +++ b/components/esp32/lib @@ -1 +1 @@ -Subproject commit bc6972f2aec56cce72e8ed9c5a6fe1237f345679 +Subproject commit b19a0b04ee0a19f54f8834588bc5dea8c72ad623