From: Simon Wunderlich <[email protected]> The Ethernet header is counted when transmitting a packet, so it should also be counted when receiving a packet. With this patch, the rx_bytes and tx_bytes statistics behave like an ordinary Ethernet interface.
Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Sven Eckelmann <[email protected]> --- drivers/staging/batman-adv/soft-interface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/batman-adv/soft-interface.c b/drivers/staging/batman-adv/soft-interface.c index 2ea97de..6f22e6e 100644 --- a/drivers/staging/batman-adv/soft-interface.c +++ b/drivers/staging/batman-adv/soft-interface.c @@ -259,7 +259,7 @@ void interface_rx(struct sk_buff *skb, int hdr_size) * PACKET_OTHERHOST or PACKET_HOST */ priv->stats.rx_packets++; - priv->stats.rx_bytes += skb->len; + priv->stats.rx_bytes += skb->len + sizeof(struct ethhdr); dev->last_rx = jiffies; -- 1.7.1
