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: #10410
  • Loading branch information
maribu committed Nov 16, 2018
1 parent 836fe3d commit 727b4ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/encx24j600/encx24j600.c
Expand Up @@ -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);

Expand Down

0 comments on commit 727b4ca

Please sign in to comment.