Selaa lähdekoodia

Revert "Refactor wifi_interface_t"

This reverts commit 9370b74ee0d9f703fbc9d889223dbd38953e279b.
xiehang 5 vuotta sitten
vanhempi
sitoutus
48050c7c64

+ 4 - 4
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 */

+ 1 - 1
components/esp_wifi/lib_esp32

@@ -1 +1 @@
-Subproject commit ab63edff8f241b12e7f677370cf896059a78e34d
+Subproject commit 64404ba1a0624e78f06633b1ac55b4aa7ab4db91

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