lkml.org 
[lkml]   [2001]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Arnaldo Carvalho de Melo wrote:
> --- linux-2.4.2/drivers/net/pcmcia/3c589_cs.c Tue Feb 13 19:15:05 2001
> +++ linux-2.4.2.acme/drivers/net/pcmcia/3c589_cs.c Mon Feb 26 22:44:00 2001
> @@ -992,9 +992,9 @@
> (pkt_len+3)>>2);
> skb->protocol = eth_type_trans(skb, dev);
>
> + lp->stats.rx_bytes += skb->len;
> netif_rx(skb);
> lp->stats.rx_packets++;
> - lp->stats.rx_bytes += skb->len;

I prefer the attached patch instead. It makes use of the existing local
'pkt_len', and it checks off another item that should probably be on the
janitor's todo list: Set 'dev->last_rx=jiffies' immediately after
netif_rx.

Jeff



--
Jeff Garzik | "You see, in this world there's two kinds of
Building 1024 | people, my friend: Those with loaded guns
MandrakeSoft | and those who dig. You dig." --BlondieIndex: drivers/net/pcmcia/3c589_cs.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/net/pcmcia/3c589_cs.c,v
retrieving revision 1.1.1.10.18.1
diff -u -r1.1.1.10.18.1 3c589_cs.c
--- drivers/net/pcmcia/3c589_cs.c 2001/02/25 15:20:31 1.1.1.10.18.1
+++ drivers/net/pcmcia/3c589_cs.c 2001/02/27 01:54:28
@@ -993,8 +993,9 @@
skb->protocol = eth_type_trans(skb, dev);

netif_rx(skb);
+ dev->last_rx = jiffies;
lp->stats.rx_packets++;
- lp->stats.rx_bytes += skb->len;
+ lp->stats.rx_bytes += pkt_len;
} else {
DEBUG(1, "%s: couldn't allocate a sk_buff of"
" size %d.\n", dev->name, pkt_len);
\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.027 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site