From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: greg@kroah.com
Cc: b.a.t.m.a.n@lists.open-mesh.net
Subject: [B.A.T.M.A.N.] [PATCH 1/3] Staging: batman-adv: Don't increment stats of foreign device
Date: Wed, 21 Jul 2010 00:25:20 +0200 [thread overview]
Message-ID: <1279664722-27500-2-git-send-email-sven.eckelmann@gmx.de> (raw)
In-Reply-To: <1279664722-27500-1-git-send-email-sven.eckelmann@gmx.de>
The receive hook for batman-adv ethernet frames tried to get the last
device which processed the skb before us. It only used that information
to update the rx_bytes and rx_packets stat of that foreign device which
already has updated it using its own receive functions.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
drivers/staging/batman-adv/hard-interface.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c
index 5cc369c..f6345c4 100644
--- a/drivers/staging/batman-adv/hard-interface.c
+++ b/drivers/staging/batman-adv/hard-interface.c
@@ -442,7 +442,6 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
struct bat_priv *bat_priv = netdev_priv(soft_device);
struct batman_packet *batman_packet;
struct batman_if *batman_if;
- struct net_device_stats *stats;
int ret;
skb = skb_share_check(skb, GFP_ATOMIC);
@@ -478,12 +477,6 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
if (batman_if->if_status != IF_ACTIVE)
goto err_free;
- stats = (struct net_device_stats *)dev_get_stats(skb->dev);
- if (stats) {
- stats->rx_packets++;
- stats->rx_bytes += skb->len;
- }
-
batman_packet = (struct batman_packet *)skb->data;
if (batman_packet->version != COMPAT_VERSION) {
--
1.7.1
next prev parent reply other threads:[~2010-07-20 22:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 22:25 [B.A.T.M.A.N.] Staging: batman-adv for 2.6.36 (5) Sven Eckelmann
2010-07-20 22:25 ` Sven Eckelmann [this message]
2010-07-20 22:25 ` [B.A.T.M.A.N.] [PATCH 2/3] Staging: batman-adv: don't use default init_module/cleanup_module function names Sven Eckelmann
2010-07-20 22:25 ` [B.A.T.M.A.N.] [PATCH 3/3] Staging: batman-adv: Update TODO with new points from review Sven Eckelmann
2010-07-22 21:30 ` [B.A.T.M.A.N.] Staging: batman-adv for 2.6.36 (5) Greg KH
2010-07-22 21:46 ` Sven Eckelmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1279664722-27500-2-git-send-email-sven.eckelmann@gmx.de \
--to=sven.eckelmann@gmx.de \
--cc=b.a.t.m.a.n@lists.open-mesh.net \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=greg@kroah.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).