netxen: Use the instance of net_device_stats from net_device.
authorAjit Khaparde <ajitkhaparde@gmail.com>
Wed, 7 Oct 2009 02:45:34 +0000 (02:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Oct 2009 05:00:25 +0000 (22:00 -0700)
Since net_device has an instance of net_device_stats,
we can remove the instance of this from the private adapter structure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netxen/netxen_nic.h
drivers/net/netxen/netxen_nic_main.c

index 7384f59..5c766b5 100644 (file)
@@ -1203,8 +1203,6 @@ struct netxen_adapter {
 
        struct work_struct  tx_timeout_task;
 
-       struct net_device_stats net_stats;
-
        nx_nic_intr_coalesce_t coal;
 
        unsigned long state;
index b5aa974..0039b85 100644 (file)
@@ -1923,7 +1923,7 @@ request_reset:
 struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)
 {
        struct netxen_adapter *adapter = netdev_priv(netdev);
-       struct net_device_stats *stats = &adapter->net_stats;
+       struct net_device_stats *stats = &netdev->stats;
 
        memset(stats, 0, sizeof(*stats));