From cd90dfa38bd3e05c382ecaddb970cec0350081b6 Mon Sep 17 00:00:00 2001 From: xiehang Date: Mon, 8 Mar 2021 17:00:06 +0800 Subject: [PATCH] Revert "Refactor wifi_interface_t" This reverts commit ae246927851f30d1f437b0dd7f41110abc854657. Closes: https://github.com/espressif/arduino-esp32/issues/4905 --- components/esp32/include/esp_wifi_types.h | 8 ++++---- components/esp32/lib | 2 +- components/lwip/port/esp32/netif/wlanif.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/esp32/include/esp_wifi_types.h b/components/esp32/include/esp_wifi_types.h index 5725cf8516..d9d622dfec 100644 --- a/components/esp32/include/esp_wifi_types.h +++ b/components/esp32/include/esp_wifi_types.h @@ -33,10 +33,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/esp32/lib b/components/esp32/lib index d518cc7e8b..b3c748ed8a 160000 --- a/components/esp32/lib +++ b/components/esp32/lib @@ -1 +1 @@ -Subproject commit d518cc7e8b25fda6930129e166bcb490504a7f8e +Subproject commit b3c748ed8a2603f57a4ecda8cbf0405570586597 diff --git a/components/lwip/port/esp32/netif/wlanif.c b/components/lwip/port/esp32/netif/wlanif.c index 8966297b05..ed5e13ed12 100644 --- a/components/lwip/port/esp32/netif/wlanif.c +++ b/components/lwip/port/esp32/netif/wlanif.c @@ -114,7 +114,7 @@ low_level_output(struct netif *netif, struct pbuf *p) struct pbuf *q = p; err_t ret; - if (wifi_if > WIFI_IF_AP) { + if (wifi_if >= ESP_IF_MAX) { return ERR_IF; }