patch-2.1.25 linux/drivers/net/3c501.c

Next file: linux/drivers/net/3c505.c
Previous file: linux/drivers/char/softdog.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.24/linux/drivers/net/3c501.c linux/drivers/net/3c501.c
@@ -123,7 +123,7 @@
 static void el_receive(struct device *dev);
 static void el_reset(struct device *dev);
 static int  el1_close(struct device *dev);
-static struct enet_statistics *el1_get_stats(struct device *dev);
+static struct net_device_stats *el1_get_stats(struct device *dev);
 static void set_multicast_list(struct device *dev);
 
 #define EL1_IO_EXTENT	16
@@ -139,7 +139,7 @@
 
 struct net_local
 {
-    struct enet_statistics stats;
+    struct net_device_stats stats;
     int tx_pkt_start;		/* The length of the current Tx packet. */
     int collisions;		/* Tx collisions this packet */
     int loading;		/* Spot buffer load collisions */
@@ -398,12 +398,6 @@
 		dev->trans_start = jiffies;
 	}
 
-	if (skb == NULL)
-	{
-		dev_tint(dev);
-		return 0;
-	}
-
 	save_flags(flags);
 
 	/*
@@ -432,6 +426,8 @@
 		lp->tx_pkt_start = gp_start;
     		lp->collisions = 0;
 
+    		lp->stats.tx_bytes += skb->len;
+
 		/*
 		 *	Command mode with status cleared should [in theory]
 		 *	mean no more interrupts can be pending on the card.
@@ -769,7 +765,7 @@
 	return 0;
 }
 
-static struct enet_statistics *el1_get_stats(struct device *dev)
+static struct net_device_stats *el1_get_stats(struct device *dev)
 {
 	struct net_local *lp = (struct net_local *)dev->priv;
 	return &lp->stats;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov