Skip to content

Commit

Permalink
drivers/encx24j600: Implemented missing drop case
Browse files Browse the repository at this point in the history
The netdev_driver_t::recv implementation of the encx24j600 does not provide the
drop feature. This commit adds it.

Fixes: RIOT-OS#10410
  • Loading branch information
maribu authored and geromueller committed Jun 19, 2019
1 parent 91b66aa commit 7d690c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/encx24j600/encx24j600.c
Expand Up @@ -357,7 +357,10 @@ static int _recv(netdev_t *netdev, void *buf, size_t len, void *info)
}
/* 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);

Expand Down

0 comments on commit 7d690c3

Please sign in to comment.