[PATCH 54/77] netwave: convert to internal net_device_stats

Previous thread: [PATCH 23/77] usbnet: convert to internal net_device stats by Stephen Hemminger on Friday, March 20, 2009 - 10:35 pm. (4 messages)

Next thread: [PATCH 06/77] irda: net_device_ops ioctl fix by Stephen Hemminger on Friday, March 20, 2009 - 10:35 pm. (4 messages)
From: Stephen Hemminger
Date: Friday, March 20, 2009 - 10:36 pm

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


--- a/drivers/net/wireless/netwave_cs.c	2009-03-20 21:45:41.100964205 -0700
+++ b/drivers/net/wireless/netwave_cs.c	2009-03-20 22:14:37.954403178 -0700
@@ -210,10 +210,6 @@ static int netwave_rx( struct net_device
 static irqreturn_t netwave_interrupt(int irq, void *dev_id);
 static void netwave_watchdog(struct net_device *);
 
-/* Statistics */
-static void update_stats(struct net_device *dev);
-static struct net_device_stats *netwave_get_stats(struct net_device *dev);
-
 /* Wireless extensions */
 static struct iw_statistics* netwave_get_wireless_stats(struct net_device *dev);
 
@@ -275,14 +271,9 @@ typedef struct netwave_private {
     int        lastExec;
     struct timer_list      watchdog;	/* To avoid blocking state */
     struct site_survey     nss;
-    struct net_device_stats stats;
     struct iw_statistics   iw_stats;    /* Wireless stats */
 } netwave_private;
 
-#ifdef NETWAVE_STATS
-static struct net_device_stats *netwave_get_stats(struct net_device *dev);
-#endif
-
 /*
  * The Netwave card is little-endian, so won't work for big endian
  * systems.
@@ -413,7 +404,6 @@ static int netwave_probe(struct pcmcia_d
 
     /* Netwave specific entries in the device structure */
     dev->hard_start_xmit = &netwave_start_xmit;
-    dev->get_stats  = &netwave_get_stats;
     dev->set_multicast_list = &set_multicast_list;
     /* wireless extensions */
     dev->wireless_handlers = (struct iw_handler_def *)&netwave_handler_def;
@@ -988,7 +978,7 @@ static int netwave_hw_xmit(unsigned char
 	return 1;
     }
 
-    priv->stats.tx_bytes += len;
+    dev->stats.tx_bytes += len;
 
     DEBUG(3, "Transmitting with SPCQ %x SPU %x LIF %x ISPLQ %x\n",
 	  readb(ramBase + NETWAVE_EREG_SPCQ),
@@ -1107,11 +1097,11 @@ static irqreturn_t netwave_interrupt(int
 	    rser = readb(ramBase + NETWAVE_EREG_RSER);			
 	    
 	    if (rser & 0x04) {
-		++priv->stats.rx_dropped; ...
From: David Miller
Date: Saturday, March 21, 2009 - 10:47 pm

From: Stephen Hemminger <shemminger@vyatta.com>

Applied.
--

Previous thread: [PATCH 23/77] usbnet: convert to internal net_device stats by Stephen Hemminger on Friday, March 20, 2009 - 10:35 pm. (4 messages)

Next thread: [PATCH 06/77] irda: net_device_ops ioctl fix by Stephen Hemminger on Friday, March 20, 2009 - 10:35 pm. (4 messages)