From 1883c4c2cd7b8239aa7383a251e8e696ee4f245c Mon Sep 17 00:00:00 2001 From: Zhang Jun Hao Date: Wed, 18 Jul 2018 20:10:44 +0800 Subject: [PATCH] fix(lwip): fix netif mac addr is not right --- components/lwip/port/esp8266/netif/ethernetif.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/components/lwip/port/esp8266/netif/ethernetif.c b/components/lwip/port/esp8266/netif/ethernetif.c index eff7dff3..a7e42cc0 100644 --- a/components/lwip/port/esp8266/netif/ethernetif.c +++ b/components/lwip/port/esp8266/netif/ethernetif.c @@ -271,21 +271,10 @@ _exit: */ int8_t ethernetif_init(struct netif* netif) { - uint8_t mac[NETIF_MAX_HWADDR_LEN]; - if (netif == NULL) { LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_init: netif is NULL\n")); } - /* set MAC hardware address */ - if (wifi_get_netif(TCPIP_ADAPTER_IF_STA) == TCPIP_ADAPTER_IF_STA) { - esp_wifi_get_mac(TCPIP_ADAPTER_IF_STA, mac); - } else { - esp_wifi_get_mac(TCPIP_ADAPTER_IF_AP, mac); - } - - memcpy(netif->hwaddr, mac, NETIF_MAX_HWADDR_LEN); - #if LWIP_NETIF_HOSTNAME netif->hostname = "lwip";