diff --git a/components/esp_wifi/include/esp_wifi_types.h b/components/esp_wifi/include/esp_wifi_types.h index 67cd3eaa6a..19b760b032 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 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_IF_STA = ESP_IF_WIFI_STA, + WIFI_IF_AP = ESP_IF_WIFI_AP, +} wifi_interface_t; typedef enum { WIFI_COUNTRY_POLICY_AUTO, /**< Country policy is auto, use the country info of AP to which the station is connected */ @@ -369,6 +369,7 @@ typedef enum { #define WIFI_PROMIS_FILTER_MASK_MISC (1<<3) /**< filter the packets with type of WIFI_PKT_MISC */ #define WIFI_PROMIS_FILTER_MASK_DATA_MPDU (1<<4) /**< filter the MPDU which is a kind of WIFI_PKT_DATA */ #define WIFI_PROMIS_FILTER_MASK_DATA_AMPDU (1<<5) /**< filter the AMPDU which is a kind of WIFI_PKT_DATA */ +#define WIFI_PROMIS_FILTER_MASK_FCSFAIL (1<<6) /**< filter the FCS failed packets, do not open it in general */ #define WIFI_PROMIS_CTRL_FILTER_MASK_ALL (0xFF800000) /**< filter all control packets */ #define WIFI_PROMIS_CTRL_FILTER_MASK_WRAPPER (1<<23) /**< filter the control packets with subtype of Control Wrapper */ diff --git a/components/esp_wifi/lib_esp32 b/components/esp_wifi/lib_esp32 index 0e06d29161..7519503055 160000 --- a/components/esp_wifi/lib_esp32 +++ b/components/esp_wifi/lib_esp32 @@ -1 +1 @@ -Subproject commit 0e06d29161b555fc8bc912ba1fc12ae6d9f08163 +Subproject commit 751950305503bc0fdbf92c745ce969175cee845c diff --git a/components/lwip/port/esp32/netif/wlanif.c b/components/lwip/port/esp32/netif/wlanif.c index bb021f3d6a..1eb3dd31d5 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 >= ESP_IF_MAX) { + if (wifi_if > WIFI_IF_AP) { return ERR_IF; }