diff options
author | Sven Eckelmann <sven.eckelmann@gmx.de> | 2010-07-21 00:25:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-22 14:29:05 -0700 |
commit | a1a38cad4c71bc08403b204fbe0ba98b4447f8bf (patch) | |
tree | 3fb0f6092d675aef96dd9bc06d873d356ff45ee3 /drivers/staging/batman-adv/hard-interface.c | |
parent | b4e178224cfdc8aae7dda0baab34a4e4110a2e93 (diff) |
Staging: batman-adv: Don't increment stats of foreign device
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv/hard-interface.c')
-rw-r--r-- | 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 41721554d624..9bfd0365abbb 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) { |