1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

cpu/esp: api change in esp_now_netdev::_recv

Newest version of API requires to drop the frame when if parameter len is smaller than the received packet.
This commit is contained in:
Gunar Schorcht 2019-01-02 19:01:04 +01:00
parent 49c64c01a8
commit a36366f9a9

View File

@ -577,6 +577,8 @@ static int _recv(netdev_t *netdev, void *buf, size_t len, void *info)
if (len < size) {
/* buffer is smaller than the number of received bytes */
DEBUG("[esp_now] No space in receive buffers\n");
/* newest API requires to drop the frame in that case */
ringbuffer_remove(&dev->rx_buf, 1 + size);
mutex_unlock(&dev->dev_lock);
return -ENOBUFS;
}