From 58ba8a2a24f929021ec9394dca701d4bfd4e33e5 Mon Sep 17 00:00:00 2001 From: Henrik Maier Date: Wed, 31 May 2017 21:49:27 +1000 Subject: [PATCH] tcpip_adapter: Fix bug which prevents setting a static IP address for Ethernet interface Merges https://github.com/espressif/esp-idf/pull/657 --- components/tcpip_adapter/tcpip_adapter_lwip.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/tcpip_adapter/tcpip_adapter_lwip.c b/components/tcpip_adapter/tcpip_adapter_lwip.c index b1bb85bc25..25676266ac 100644 --- a/components/tcpip_adapter/tcpip_adapter_lwip.c +++ b/components/tcpip_adapter/tcpip_adapter_lwip.c @@ -849,7 +849,6 @@ esp_err_t tcpip_adapter_dhcpc_start(tcpip_adapter_if_t tcpip_if) { TCPIP_ADAPTER_IPC_CALL(tcpip_if, 0, 0, 0, tcpip_adapter_dhcpc_start_api); - /* only support sta now, need to support ethernet */ if ((tcpip_if != TCPIP_ADAPTER_IF_STA && tcpip_if != TCPIP_ADAPTER_IF_ETH) || tcpip_if >= TCPIP_ADAPTER_IF_MAX) { ESP_LOGD(TAG, "dhcp client invalid if=%d", tcpip_if); return ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS; @@ -903,8 +902,7 @@ esp_err_t tcpip_adapter_dhcpc_stop(tcpip_adapter_if_t tcpip_if) { TCPIP_ADAPTER_IPC_CALL(tcpip_if, 0, 0, 0, tcpip_adapter_dhcpc_stop_api); - /* only support sta now, need to support ethernet */ - if (tcpip_if != TCPIP_ADAPTER_IF_STA || tcpip_if >= TCPIP_ADAPTER_IF_MAX) { + if ((tcpip_if != TCPIP_ADAPTER_IF_STA && tcpip_if != TCPIP_ADAPTER_IF_ETH) || tcpip_if >= TCPIP_ADAPTER_IF_MAX) { ESP_LOGD(TAG, "dhcp client invalid if=%d", tcpip_if); return ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS; }