patch-2.3.11 linux/drivers/net/mace.c

Next file: linux/drivers/net/pcnet32.c
Previous file: linux/drivers/net/hp100.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.10/linux/drivers/net/mace.c linux/drivers/net/mace.c
@@ -682,8 +682,10 @@
 		++mp->stats.tx_carrier_errors;
 	    if (fs & (UFLO|LCOL|RTRY))
 		++mp->stats.tx_aborted_errors;
-	} else
+	} else {
+	    mp->stats.tx_bytes += mp->tx_bufs[i]->len;
 	    ++mp->stats.tx_packets;
+	}
 	dev_kfree_skb(mp->tx_bufs[i]);
 	--mp->tx_active;
 	if (++i >= N_TX_RING)
@@ -848,6 +850,7 @@
 		skb->protocol = eth_type_trans(skb, dev);
 		netif_rx(skb);
 		mp->rx_bufs[i] = 0;
+		mp->stats.rx_bytes += skb->len;
 		++mp->stats.rx_packets;
 	    }
 	} else {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)