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

enc28j60: fix compilation with l2 stats enabled

This commit is contained in:
Gunar Schorcht 2018-05-04 13:58:59 +02:00
parent 53c3f833af
commit af226d4fec

View File

@ -248,10 +248,6 @@ static int nd_send(netdev_t *netdev, const iolist_t *iolist)
mutex_lock(&dev->devlock);
#ifdef MODULE_NETSTATS_L2
netdev->stats.tx_bytes += count;
#endif
/* set write pointer */
cmd_w_addr(dev, ADDR_WRITE_PTR, BUF_TX_START);
/* write control byte and the actual data into the buffer */
@ -265,6 +261,10 @@ static int nd_send(netdev_t *netdev, const iolist_t *iolist)
/* trigger the send process */
cmd_bfs(dev, REG_ECON1, -1, ECON1_TXRTS);
#ifdef MODULE_NETSTATS_L2
netdev->stats.tx_bytes += c;
#endif
mutex_unlock(&dev->devlock);
return c;
}