Skip to content
Snippets Groups Projects
Commit af226d4f authored by Gunar Schorcht's avatar Gunar Schorcht
Browse files

enc28j60: fix compilation with l2 stats enabled

parent 53c3f833
No related branches found
No related tags found
No related merge requests found
...@@ -248,10 +248,6 @@ static int nd_send(netdev_t *netdev, const iolist_t *iolist) ...@@ -248,10 +248,6 @@ static int nd_send(netdev_t *netdev, const iolist_t *iolist)
mutex_lock(&dev->devlock); mutex_lock(&dev->devlock);
#ifdef MODULE_NETSTATS_L2
netdev->stats.tx_bytes += count;
#endif
/* set write pointer */ /* set write pointer */
cmd_w_addr(dev, ADDR_WRITE_PTR, BUF_TX_START); cmd_w_addr(dev, ADDR_WRITE_PTR, BUF_TX_START);
/* write control byte and the actual data into the buffer */ /* 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) ...@@ -265,6 +261,10 @@ static int nd_send(netdev_t *netdev, const iolist_t *iolist)
/* trigger the send process */ /* trigger the send process */
cmd_bfs(dev, REG_ECON1, -1, ECON1_TXRTS); cmd_bfs(dev, REG_ECON1, -1, ECON1_TXRTS);
#ifdef MODULE_NETSTATS_L2
netdev->stats.tx_bytes += c;
#endif
mutex_unlock(&dev->devlock); mutex_unlock(&dev->devlock);
return c; return c;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment