From patchwork Sat Sep 4 23:58:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 357 Return-Path: Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by open-mesh.net (Postfix) with SMTP id 5ED6F154540 for ; Sun, 5 Sep 2010 01:58:46 +0200 (CEST) Received: (qmail invoked by alias); 04 Sep 2010 23:58:45 -0000 Received: from i59F6A2A6.versanet.de (EHLO sven-desktop.lazhur.ath.cx) [89.246.162.166] by mail.gmx.net (mp039) with SMTP; 05 Sep 2010 01:58:45 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX1/ekMBxWHreXNIplTYSTUffh86WkQ82dwvOeyDLhg YHj76n0vag1QsX From: Sven Eckelmann To: greg@kroah.com Date: Sun, 5 Sep 2010 01:58:21 +0200 Message-Id: <1283644718-653-5-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1283644718-653-1-git-send-email-sven.eckelmann@gmx.de> References: <1283644718-653-1-git-send-email-sven.eckelmann@gmx.de> X-Y-GMX-Trusted: 0 Cc: b.a.t.m.a.n@lists.open-mesh.net, Simon Wunderlich Subject: [B.A.T.M.A.N.] [PATCH 04/21] Staging: batman-adv: Count Ethernet header for incoming packets X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2010 23:58:48 -0000 From: Simon Wunderlich 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 Signed-off-by: Sven Eckelmann --- 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;