]> Pileus Git - ~andy/linux/commitdiff
ixgbevf: remove private net_device_stats
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 8 Sep 2010 22:48:31 +0000 (22:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Sep 2010 04:33:23 +0000 (21:33 -0700)
Use the net_device provided net_device_stats structure.

Remove ixgbevf_get_stats() now its not needed.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ixgbevf/ixgbevf.h
drivers/net/ixgbevf/ixgbevf_main.c

index f7015efbff05cfc91da412e43e664af72594ce41..da4033c6efa20f677342a8f6aff4bbca224548cd 100644 (file)
@@ -243,7 +243,6 @@ struct ixgbevf_adapter {
        /* OS defined structs */
        struct net_device *netdev;
        struct pci_dev *pdev;
-       struct net_device_stats net_stats;
 
        /* structs defined in ixgbe_vf.h */
        struct ixgbe_hw hw;
index bdbd26c60ae6314f481373f3c91163dfc8b87fdf..3eda1bdbbb7a61c31b17644af53b7212afcb877b 100644 (file)
@@ -308,8 +308,8 @@ static bool ixgbevf_clean_tx_irq(struct ixgbevf_adapter *adapter,
        tx_ring->total_bytes += total_bytes;
        tx_ring->total_packets += total_packets;
 
-       adapter->net_stats.tx_bytes += total_bytes;
-       adapter->net_stats.tx_packets += total_packets;
+       netdev->stats.tx_bytes += total_bytes;
+       netdev->stats.tx_packets += total_packets;
 
        return (count < tx_ring->work_limit);
 }
@@ -639,8 +639,8 @@ next_desc:
 
        rx_ring->total_packets += total_rx_packets;
        rx_ring->total_bytes += total_rx_bytes;
-       adapter->net_stats.rx_bytes += total_rx_bytes;
-       adapter->net_stats.rx_packets += total_rx_packets;
+       adapter->netdev->stats.rx_bytes += total_rx_bytes;
+       adapter->netdev->stats.rx_packets += total_rx_packets;
 
        return cleaned;
 }
@@ -2297,7 +2297,7 @@ void ixgbevf_update_stats(struct ixgbevf_adapter *adapter)
                                adapter->stats.vfmprc);
 
        /* Fill out the OS statistics structure */
-       adapter->net_stats.multicast = adapter->stats.vfmprc -
+       adapter->netdev->stats.multicast = adapter->stats.vfmprc -
                adapter->stats.base_vfmprc;
 }
 
@@ -3180,21 +3180,6 @@ static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
        return NETDEV_TX_OK;
 }
 
-/**
- * ixgbevf_get_stats - Get System Network Statistics
- * @netdev: network interface device structure
- *
- * Returns the address of the device statistics structure.
- * The statistics are actually updated from the timer callback.
- **/
-static struct net_device_stats *ixgbevf_get_stats(struct net_device *netdev)
-{
-       struct ixgbevf_adapter *adapter = netdev_priv(netdev);
-
-       /* only return the current stats */
-       return &adapter->net_stats;
-}
-
 /**
  * ixgbevf_set_mac - Change the Ethernet Address of the NIC
  * @netdev: network interface device structure
@@ -3272,7 +3257,6 @@ static const struct net_device_ops ixgbe_netdev_ops = {
        .ndo_open               = &ixgbevf_open,
        .ndo_stop               = &ixgbevf_close,
        .ndo_start_xmit         = &ixgbevf_xmit_frame,
-       .ndo_get_stats          = &ixgbevf_get_stats,
        .ndo_set_rx_mode        = &ixgbevf_set_rx_mode,
        .ndo_set_multicast_list = &ixgbevf_set_rx_mode,
        .ndo_validate_addr      = eth_validate_addr,