Skip to content
Snippets Groups Projects
Commit fa5fe7e4 authored by Gunar Schorcht's avatar Gunar Schorcht
Browse files

cpu/esp8266: don't disconnect on pbuf full in send

Disconnecting from the AP in the send function if the lwIP packet buffer is exhausted is counterproductive since reconnecting usually fails on heavy network load. A better strategy is to slow down the sending of MAC frames from netif a bit to wait for flushing the buffer in the MAC layer.
parent 5d0b4472
No related branches found
No related tags found
No related merge requests found
...@@ -350,13 +350,9 @@ static int IRAM _send(netdev_t *netdev, const iolist_t *iolist) ...@@ -350,13 +350,9 @@ static int IRAM _send(netdev_t *netdev, const iolist_t *iolist)
/* /*
* The memory of EPS8266 is quite small. Therefore, it may happen on * The memory of EPS8266 is quite small. Therefore, it may happen on
* heavy network load that we run into out of memory and we have * heavy network load that we run into out of memory and we have
* to wait until lwIP pbuf has been flushed. For that purpose, we * to wait until lwIP pbuf has been flushed. We slow down sending a bit.
* have to disconnect from AP and slow down sending. The node will
* then reconnect to AP automatically.
*/ */
critical_exit(); critical_exit();
/* disconnect from AP */
wifi_station_disconnect();
/* wait 20 ms */ /* wait 20 ms */
xtimer_usleep(20 * US_PER_MS); xtimer_usleep(20 * US_PER_MS);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment