Skip to content

Commit

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

Fixes: RIOT-OS#10410
  • Loading branch information
maribu committed Nov 16, 2018
1 parent 836fe3d commit ae093fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/w5100/w5100.c
Expand Up @@ -261,7 +261,10 @@ static int recv(netdev_t *netdev, void *buf, size_t len, void *info)

DEBUG("[w5100] recv: read %i byte from device (at 0x%04x)\n",
n, (int)rp);
}

/* if frame received OR drop requested, remove frame from RX buffer */
if ((in_buf != NULL) || (len > 0)) {
/* set the new read pointer address */
waddr(dev, S0_RX_RD0, S0_RX_RD1, rp += psize);
wreg(dev, S0_CR, CR_RECV);
Expand Down

0 comments on commit ae093fd

Please sign in to comment.