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; }