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:
parent
a1218f007b
commit
078444902f
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user