1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/esp32/esp-eth
Erik Ekman 95196fb7e4 esp32/eth: Don't overwrite queued event with RX packet
If there is an event to be handled by _esp_eth_isr(), don't
overwrite it if a new packet has been received.

In my testing, all SYSTEM_EVENT_ETH_CONNECTED events except the first
are immediately followed by at least one SYSTEM_EVENT_ETH_RX_DONE event.
This causes the SYSTEM_EVENT_ETH_CONNECTED to not get handled, and the
IP stack will not be notified of the new link state.

Protect the other events by dropping the packet instead. If an earlier
unhandled SYSTEM_EVENT_ETH_RX_DONE event exists, overwrite it with the
newer packet.

I only saw this happen with lwIP and not with GNRC - I am not sure why.
But it still is a race waiting to happen. The nice long term solution
is probably to have a queue of unhandled events, allowing them all to
be processed once there is time.
2021-02-24 01:20:43 +01:00
..
doc.txt cpu/esp32: add support for IP101G Ethernet phy 2020-11-28 10:15:14 +01:00
esp_eth_gnrc.c gnrc_netif_xxx_create: use external netif allocation 2020-03-26 11:12:23 +01:00
esp_eth_netdev.c esp32/eth: Don't overwrite queued event with RX packet 2021-02-24 01:20:43 +01:00
esp_eth_netdev.h cpu/esp32/esp_eth: remove gnrc specific code 2020-01-31 09:32:23 +01:00
esp_eth_params.h cpu: add esp32 2018-10-08 12:20:49 +02:00
Makefile cpu: add esp32 2018-10-08 12:20:49 +02:00