diff options
author | Simon Wunderlich <siwu@hrz.tu-chemnitz.de> | 2010-09-05 01:58:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-05 00:29:43 -0700 |
commit | 556c83ece8e8a897d7cad23315407ecd1a195fce (patch) | |
tree | aca7c398c8c3e585ab9b3db4cb0888d6ffb72816 /drivers/staging/batman-adv | |
parent | b19ad29f553c417075ce2ad7fbd3ba85ec5f7494 (diff) | |
download | kernel_samsung_tuna-556c83ece8e8a897d7cad23315407ecd1a195fce.zip kernel_samsung_tuna-556c83ece8e8a897d7cad23315407ecd1a195fce.tar.gz kernel_samsung_tuna-556c83ece8e8a897d7cad23315407ecd1a195fce.tar.bz2 |
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: 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>
Diffstat (limited to 'drivers/staging/batman-adv')
-rw-r--r-- | 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; |