Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 556c83ec authored by Simon Wunderlich's avatar Simon Wunderlich Committed by Greg Kroah-Hartman
Browse files

Staging: batman-adv: Count Ethernet header for incoming packets



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: default avatarSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: default avatarSven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b19ad29f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;