1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 17:43:51 +01:00

Revert "esp32/eth: Don't overwrite queued event with RX packet"

This reverts commit 95196fb7e40b12c7824e9827aadcc2ace35016a5.

Not needed since the initial event is now processed properly.
This commit is contained in:
Erik Ekman 2022-09-03 14:11:06 +02:00
parent 04a2070faa
commit d568a6dba1

View File

@ -100,19 +100,14 @@ static esp_err_t IRAM_ATTR _eth_input_callback(esp_eth_handle_t hdl,
mutex_lock(&_esp_eth_dev.dev_lock); mutex_lock(&_esp_eth_dev.dev_lock);
/* Don't overwrite other events, drop packet instead. memcpy(_esp_eth_dev.rx_buf, buffer, len);
* Keep the latest received packet if previous has not been read. */ /* buffer is allocated by the `emac_esp32_rx_task` upon receipt of a
if (_esp_eth_dev.event == SYSTEM_EVENT_MAX || * MAC frame and is forwarded to the consumer who responsible for
_esp_eth_dev.event == SYSTEM_EVENT_ETH_RX_DONE) { * freeing the buffer. */
memcpy(_esp_eth_dev.rx_buf, buffer, len); free(buffer);
/* buffer is allocated by the `emac_esp32_rx_task` upon receipt of a _esp_eth_dev.rx_len = len;
* MAC frame and is forwarded to the consumer who responsible for _esp_eth_dev.event = SYSTEM_EVENT_ETH_RX_DONE;
* freeing the buffer. */ netdev_trigger_event_isr(&_esp_eth_dev.netdev);
free(buffer);
_esp_eth_dev.rx_len = len;
_esp_eth_dev.event = SYSTEM_EVENT_ETH_RX_DONE;
netdev_trigger_event_isr(&_esp_eth_dev.netdev);
}
mutex_unlock(&_esp_eth_dev.dev_lock); mutex_unlock(&_esp_eth_dev.dev_lock);