]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
niu: use net_device_stats nowadays available in net_device
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Fri, 28 Nov 2008 23:52:00 +0000 (15:52 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Nov 2008 23:52:00 +0000 (15:52 -0800)
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/niu.c
drivers/net/niu.h

index 2f98f7a4117a66f444e689d6f5c4d72a59f561cb..022866dc0915479a593b529b63f96fc8706cfa8b 100644 (file)
@@ -6078,10 +6078,10 @@ static void niu_get_rx_stats(struct niu *np)
                dropped += rp->rx_dropped;
                errors += rp->rx_errors;
        }
-       np->net_stats.rx_packets = pkts;
-       np->net_stats.rx_bytes = bytes;
-       np->net_stats.rx_dropped = dropped;
-       np->net_stats.rx_errors = errors;
+       np->dev->stats.rx_packets = pkts;
+       np->dev->stats.rx_bytes = bytes;
+       np->dev->stats.rx_dropped = dropped;
+       np->dev->stats.rx_errors = errors;
 }
 
 static void niu_get_tx_stats(struct niu *np)
@@ -6097,9 +6097,9 @@ static void niu_get_tx_stats(struct niu *np)
                bytes += rp->tx_bytes;
                errors += rp->tx_errors;
        }
-       np->net_stats.tx_packets = pkts;
-       np->net_stats.tx_bytes = bytes;
-       np->net_stats.tx_errors = errors;
+       np->dev->stats.tx_packets = pkts;
+       np->dev->stats.tx_bytes = bytes;
+       np->dev->stats.tx_errors = errors;
 }
 
 static struct net_device_stats *niu_get_stats(struct net_device *dev)
@@ -6109,7 +6109,7 @@ static struct net_device_stats *niu_get_stats(struct net_device *dev)
        niu_get_rx_stats(np);
        niu_get_tx_stats(np);
 
-       return &np->net_stats;
+       return &dev->stats;
 }
 
 static void niu_load_hash_xmac(struct niu *np, u16 *hash)
index cf449aad7f1524244a430f27c1f30702768a4b90..e1a7392e8d70a61bb7b4c6703f3e74bb9b0cd44e 100644 (file)
@@ -3249,7 +3249,6 @@ struct niu {
        spinlock_t                      lock;
 
        const struct niu_ops            *ops;
-       struct net_device_stats         net_stats;
        union niu_mac_stats             mac_stats;
 
        struct rx_ring_info             *rx_rings;