From bcf507527863082d29b334e2dbf1394ddd4f1d34 Mon Sep 17 00:00:00 2001 From: Bogdan Kolendovskyy Date: Thu, 6 Feb 2025 11:47:30 +0100 Subject: [PATCH] fix(ethernet_basic): Fix second Ethernet device not receiving IP address --- examples/ethernet/basic/main/ethernet_example_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ethernet/basic/main/ethernet_example_main.c b/examples/ethernet/basic/main/ethernet_example_main.c index 71f99a1687..19f60cfed4 100644 --- a/examples/ethernet/basic/main/ethernet_example_main.c +++ b/examples/ethernet/basic/main/ethernet_example_main.c @@ -106,7 +106,7 @@ void app_main(void) esp_netif_config.if_desc = if_desc_str; esp_netif_config.route_prio -= i*5; eth_netifs[i] = esp_netif_new(&cfg_spi); - eth_netif_glues[i] = esp_eth_new_netif_glue(eth_handles[0]); + eth_netif_glues[i] = esp_eth_new_netif_glue(eth_handles[i]); // Attach Ethernet driver to TCP/IP stack ESP_ERROR_CHECK(esp_netif_attach(eth_netifs[i], eth_netif_glues[i])); }