lkml.org 
[lkml]   [1998]   [Jan]   [18]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From rjc@snoopy ...
Subjectpatch - count tulip transmitted bytes in 2.1.80-pre-4
DateSun, 18 Jan 1998 23:11:11 +1100 (EST)
  Here's a tiny patch to make the tulip ethernet driver count transmitted bytes
again in 2.1.79 and above (patch made against 2.1.80-pre-4).
   Please put this in 2.1.80.  The code was taken from 2.1.65 and has been
tested and seems to work as well as it did in earlier kernels.


Russell Coker



diff -ru linux/drivers/net/tulip.c linux-patched/drivers/net/tulip.c
--- linux/drivers/net/tulip.c	Sun Jan 18 23:04:50 1998
+++ linux-patched/drivers/net/tulip.c	Sun Jan 18 23:04:37 1998
@@ -1800,6 +1800,7 @@
 		flag |= 0xe2000000;
 
 	tp->tx_ring[entry].length = skb->len | flag;
+	tp->stats.tx_bytes += skb->len;
 	tp->tx_ring[entry].status = 0x80000000;	/* Pass ownership to the chip. */
 	tp->cur_tx++;
 	/* Trigger an immediate transmit demand. */
\
 
 \ /
  Last update: 2005-03-22 12:41    [from the cache]
©2003-2008