Skip to content

Commit

Permalink
Staging: batman-adv: Count Ethernet header for incoming packets
Browse files Browse the repository at this point in the history
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 <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Simon Wunderlich authored and Greg Kroah-Hartman committed Sep 5, 2010
1 parent b19ad29 commit 556c83e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/batman-adv/soft-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 556c83e

Please sign in to comment.