diff --git a/components/esp_eth/src/esp_eth.c b/components/esp_eth/src/esp_eth.c index b11af704ff..90cc8a229f 100644 --- a/components/esp_eth/src/esp_eth.c +++ b/components/esp_eth/src/esp_eth.c @@ -372,9 +372,9 @@ esp_err_t esp_eth_transmit_vargs(esp_eth_handle_t hdl, uint32_t argc, ...) esp_err_t ret = ESP_OK; esp_eth_driver_t *eth_driver = (esp_eth_driver_t *)hdl; - if (atomic_load(ð_driver->fsm) != ESP_ETH_FSM_START) { + if (atomic_load(ð_driver->link) != ETH_LINK_UP) { ret = ESP_ERR_INVALID_STATE; - ESP_LOGD(TAG, "Ethernet is not started"); + ESP_LOGD(TAG, "Ethernet link is not up, can't transmit"); goto err; } diff --git a/components/esp_eth/test_apps/main/esp_eth_test_l2.c b/components/esp_eth/test_apps/main/esp_eth_test_l2.c index 55064e25ea..b8712e644e 100644 --- a/components/esp_eth/test_apps/main/esp_eth_test_l2.c +++ b/components/esp_eth/test_apps/main/esp_eth_test_l2.c @@ -315,6 +315,7 @@ TEST_CASE("ethernet start/stop stress test under heavy traffic", "[ethernet_l2]" poke_and_wait(eth_handle, &rx_i, sizeof(rx_i), eth_event_rx_group); // wait for dummy traffic + xEventGroupClearBits(eth_event_rx_group, ETH_UNICAST_RECV_BIT); recv_info.unicast_rx_cnt = 0; bits = xEventGroupWaitBits(eth_event_rx_group, ETH_UNICAST_RECV_BIT, true, true, pdMS_TO_TICKS(3000)); TEST_ASSERT((bits & ETH_UNICAST_RECV_BIT) == ETH_UNICAST_RECV_BIT); diff --git a/examples/ethernet/basic/components/ethernet_init/ethernet_init.c b/examples/ethernet/basic/components/ethernet_init/ethernet_init.c index f19cc4b99f..48b7562856 100644 --- a/examples/ethernet/basic/components/ethernet_init/ethernet_init.c +++ b/examples/ethernet/basic/components/ethernet_init/ethernet_init.c @@ -180,9 +180,7 @@ static esp_eth_handle_t eth_init_spi(spi_eth_module_config_t *spi_eth_module_con .mode = 0, .clock_speed_hz = CONFIG_EXAMPLE_ETH_SPI_CLOCK_MHZ * 1000 * 1000, .queue_size = 20, - .spics_io_num = spi_eth_module_config->spi_cs_gpio, - .input_delay_ns = 20 - + .spics_io_num = spi_eth_module_config->spi_cs_gpio }; // Init vendor specific MAC config to default, and create new SPI Ethernet MAC instance // and new PHY instance based on board configuration