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

drivers/cc2420: Implemented missing drop feature

The netdev_driver_t::recv implementation of the cc2420 does not provide the drop
feature. This commit adds it.
This commit is contained in:
Marian Buschsieweke 2019-01-08 23:42:03 +01:00
parent a1218f007b
commit 078444902f
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F

View File

@ -180,6 +180,10 @@ int cc2420_rx(cc2420_t *dev, uint8_t *buf, size_t max_len, void *info)
cc2420_ram_read(dev, CC2420_RAM_RXFIFO, &len, 1);
len -= 2; /* subtract RSSI and FCF */
DEBUG("cc2420: recv: packet of length %i in RX FIFO\n", (int)len);
if (max_len != 0) {
DEBUG("cc2420: recv: Dropping frame as requested\n");
_flush_rx_fifo(dev);
}
}
else {
/* read length byte */