1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/w5100: Added missing drop implementation

The netdev_driver_t::recv implementation of the w5100 does not provide the
drop feature. This commit adds it.

Fixes: https://github.com/RIOT-OS/RIOT/issues/10410
This commit is contained in:
Marian Buschsieweke 2018-11-16 12:40:10 +01:00
parent 836fe3dbba
commit ea3edef5c7
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F

View File

@ -261,7 +261,10 @@ static int recv(netdev_t *netdev, void *buf, size_t len, void *info)
DEBUG("[w5100] recv: read %i byte from device (at 0x%04x)\n",
n, (int)rp);
}
/* if frame received OR drop requested, remove frame from RX buffer */
if (len > 0) {
/* set the new read pointer address */
waddr(dev, S0_RX_RD0, S0_RX_RD1, rp += psize);
wreg(dev, S0_CR, CR_RECV);