drivers/encx24j600: Implemented missing drop case

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

Fixes: #10410
This commit is contained in:
Marian Buschsieweke 2018-11-16 13:24:35 +01:00
parent 836fe3dbba
commit 727b4cac1c
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F

View File

@ -373,7 +373,10 @@ static int _recv(netdev_t *netdev, void *buf, size_t len, void *info)
#endif
/* read packet (without 4 bytes checksum) */
sram_op(dev, ENC_RRXDATA, 0xFFFF, buf, payload_len);
}
/* Frame was retrieved or drop was requested --> remove it from buffer */
if (buf || (len > 0)) {
/* decrement available packet count */
cmd(dev, ENC_SETPKTDEC);