1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

netstats_l2: correct rx_bytes in encx24j600

This commit is contained in:
smlng 2017-06-04 20:08:57 +02:00
parent b41219744a
commit 164768be54

View File

@ -369,7 +369,7 @@ static int _recv(netdev_t *netdev, void *buf, size_t len, void *info)
} }
#ifdef MODULE_NETSTATS_L2 #ifdef MODULE_NETSTATS_L2
netdev->stats.rx_count++; netdev->stats.rx_count++;
netdev->stats.rx_bytes += len; netdev->stats.rx_bytes += payload_len;
#endif #endif
/* read packet (without 4 bytes checksum) */ /* read packet (without 4 bytes checksum) */
sram_op(dev, ENC_RRXDATA, 0xFFFF, buf, payload_len); sram_op(dev, ENC_RRXDATA, 0xFFFF, buf, payload_len);