From 342202204c776d84b5e33f93587ef156c1be18ab Mon Sep 17 00:00:00 2001 From: Ondrej Kosta Date: Tue, 11 Feb 2025 12:16:01 +0100 Subject: [PATCH] fix(esp_eth): init Ethernet after repl init in iperf example --- examples/ethernet/iperf/main/ethernet_iperf_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/ethernet/iperf/main/ethernet_iperf_main.c b/examples/ethernet/iperf/main/ethernet_iperf_main.c index 836a969455..a1259dd0c1 100644 --- a/examples/ethernet/iperf/main/ethernet_iperf_main.c +++ b/examples/ethernet/iperf/main/ethernet_iperf_main.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2018-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -78,8 +78,6 @@ void init_ethernet_and_netif(void) void app_main(void) { - init_ethernet_and_netif(); - esp_console_repl_t *repl = NULL; esp_console_repl_config_t repl_config = ESP_CONSOLE_REPL_CONFIG_DEFAULT(); esp_console_dev_uart_config_t uart_config = ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT(); @@ -91,6 +89,9 @@ void app_main(void) // init console REPL environment ESP_ERROR_CHECK(esp_console_new_repl_uart(&uart_config, &repl_config, &repl)); + // init Ethernet and netif + init_ethernet_and_netif(); + /* Register commands */ register_system_common(); app_register_iperf_commands();