[PATCH 36/77] pcmcia: convert fmvj18x driver to internal net_device_stats

Previous thread: [PATCH 35/77] pcmcia: convert 3c574 to net_device_ops by Stephen Hemminger on Friday, March 20, 2009 - 10:36 pm. (2 messages)

Next thread: [PATCH 34/77] pcmcia: convert 3c589 to net_device_ops by Stephen Hemminger on Friday, March 20, 2009 - 10:36 pm. (2 messages)
From: Stephen Hemminger
Date: Friday, March 20, 2009 - 10:36 pm

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

--- a/drivers/net/pcmcia/fmvj18x_cs.c	2009-03-20 15:32:36.560777355 -0700
+++ b/drivers/net/pcmcia/fmvj18x_cs.c	2009-03-20 15:33:14.186903302 -0700
@@ -100,7 +100,6 @@ static int fjn_start_xmit(struct sk_buff
 static irqreturn_t fjn_interrupt(int irq, void *dev_id);
 static void fjn_rx(struct net_device *dev);
 static void fjn_reset(struct net_device *dev);
-static struct net_device_stats *fjn_get_stats(struct net_device *dev);
 static void set_rx_mode(struct net_device *dev);
 static void fjn_tx_timeout(struct net_device *dev);
 static const struct ethtool_ops netdev_ethtool_ops;
@@ -118,7 +117,6 @@ typedef enum { MBH10302, MBH10304, TDK, 
 typedef struct local_info_t {
 	struct pcmcia_device	*p_dev;
     dev_node_t node;
-    struct net_device_stats stats;
     long open_time;
     uint tx_started:1;
     uint tx_queue;
@@ -263,7 +261,6 @@ static int fmvj18x_probe(struct pcmcia_d
     /* The FMVJ18x specific entries in the device structure. */
     dev->hard_start_xmit = &fjn_start_xmit;
     dev->set_config = &fjn_config;
-    dev->get_stats = &fjn_get_stats;
     dev->set_multicast_list = &set_rx_mode;
     dev->open = &fjn_open;
     dev->stop = &fjn_close;
@@ -793,7 +790,7 @@ static irqreturn_t fjn_interrupt(int dum
 	fjn_rx(dev);
     }
     if (tx_stat & F_TMT_RDY) {
-	lp->stats.tx_packets += lp->sent ;
+	dev->stats.tx_packets += lp->sent ;
         lp->sent = 0 ;
 	if (lp->tx_queue) {
 	    outb(DO_TX | lp->tx_queue, ioaddr + TX_START);
@@ -840,7 +837,7 @@ static void fjn_tx_timeout(struct net_de
 	   htons(inw(ioaddr + 6)), htons(inw(ioaddr + 8)),
 	   htons(inw(ioaddr +10)), htons(inw(ioaddr +12)),
 	   htons(inw(ioaddr +14)));
-    lp->stats.tx_errors++;
+    dev->stats.tx_errors++;
     /* ToDo: We should try to restart the adaptor... */
     local_irq_disable();
     fjn_reset(dev);
@@ -880,7 +877,7 @@ static int fjn_start_xmit(struct sk_buff
 
 	DEBUG(4, "%s: Transmitting a packet of length ...
From: David Miller
Date: Saturday, March 21, 2009 - 8:01 pm

From: Stephen Hemminger <shemminger@vyatta.com>

Applied.
--

Previous thread: [PATCH 35/77] pcmcia: convert 3c574 to net_device_ops by Stephen Hemminger on Friday, March 20, 2009 - 10:36 pm. (2 messages)

Next thread: [PATCH 34/77] pcmcia: convert 3c589 to net_device_ops by Stephen Hemminger on Friday, March 20, 2009 - 10:36 pm. (2 messages)