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." --Blondie
Index: 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);