From 48050c7c64374db74c6e682e7e4a05f18ac0fedf Mon Sep 17 00:00:00 2001 From: xiehang Date: Thu, 25 Feb 2021 15:11:44 +0800 Subject: [PATCH] Revert "Refactor wifi_interface_t" This reverts commit 9370b74ee0d9f703fbc9d889223dbd38953e279b. --- components/esp_wifi/include/esp_wifi_types.h | 8 ++++---- components/esp_wifi/lib_esp32 | 2 +- components/lwip/port/esp32/netif/wlanif.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi_types.h b/components/esp_wifi/include/esp_wifi_types.h index 19b760b032..8192f3054c 100644 --- a/components/esp_wifi/include/esp_wifi_types.h +++ b/components/esp_wifi/include/esp_wifi_types.h @@ -30,10 +30,10 @@ typedef enum { WIFI_MODE_MAX } wifi_mode_t; -typedef enum { - WIFI_IF_STA = ESP_IF_WIFI_STA, - WIFI_IF_AP = ESP_IF_WIFI_AP, -} wifi_interface_t; +typedef esp_interface_t wifi_interface_t; + +#define WIFI_IF_STA ESP_IF_WIFI_STA +#define WIFI_IF_AP ESP_IF_WIFI_AP typedef enum { WIFI_COUNTRY_POLICY_AUTO, /**< Country policy is auto, use the country info of AP to which the station is connected */ diff --git a/components/esp_wifi/lib_esp32 b/components/esp_wifi/lib_esp32 index ab63edff8f..64404ba1a0 160000 --- a/components/esp_wifi/lib_esp32 +++ b/components/esp_wifi/lib_esp32 @@ -1 +1 @@ -Subproject commit ab63edff8f241b12e7f677370cf896059a78e34d +Subproject commit 64404ba1a0624e78f06633b1ac55b4aa7ab4db91 diff --git a/components/lwip/port/esp32/netif/wlanif.c b/components/lwip/port/esp32/netif/wlanif.c index 1eb3dd31d5..bb021f3d6a 100644 --- a/components/lwip/port/esp32/netif/wlanif.c +++ b/components/lwip/port/esp32/netif/wlanif.c @@ -135,7 +135,7 @@ low_level_output(struct netif *netif, struct pbuf *p) struct pbuf *q = p; esp_err_t ret; - if (wifi_if > WIFI_IF_AP) { + if (wifi_if >= ESP_IF_MAX) { return ERR_IF; }