diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-09-08 18:48:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-10 00:33:23 -0400 |
commit | fb621bac21fc315af9f66a754b7abe26ded3f260 (patch) | |
tree | bd707d6f09a2b1204309ce895852637e12c207b1 /drivers/net/ixgbevf | |
parent | 49d61e2390c92bd226fc395a6165eb5a65ae4de6 (diff) |
ixgbevf: remove private net_device_stats
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>
Diffstat (limited to 'drivers/net/ixgbevf')
-rw-r--r-- | drivers/net/ixgbevf/ixgbevf.h | 1 | ||||
-rw-r--r-- | drivers/net/ixgbevf/ixgbevf_main.c | 26 |
2 files changed, 5 insertions, 22 deletions
diff --git a/drivers/net/ixgbevf/ixgbevf.h b/drivers/net/ixgbevf/ixgbevf.h index f7015efbff05..da4033c6efa2 100644 --- a/drivers/net/ixgbevf/ixgbevf.h +++ b/drivers/net/ixgbevf/ixgbevf.h | |||
@@ -243,7 +243,6 @@ struct ixgbevf_adapter { | |||
243 | /* OS defined structs */ | 243 | /* OS defined structs */ |
244 | struct net_device *netdev; | 244 | struct net_device *netdev; |
245 | struct pci_dev *pdev; | 245 | struct pci_dev *pdev; |
246 | struct net_device_stats net_stats; | ||
247 | 246 | ||
248 | /* structs defined in ixgbe_vf.h */ | 247 | /* structs defined in ixgbe_vf.h */ |
249 | struct ixgbe_hw hw; | 248 | struct ixgbe_hw hw; |
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c index bdbd26c60ae6..3eda1bdbbb7a 100644 --- a/drivers/net/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ixgbevf/ixgbevf_main.c | |||
@@ -308,8 +308,8 @@ static bool ixgbevf_clean_tx_irq(struct ixgbevf_adapter *adapter, | |||
308 | tx_ring->total_bytes += total_bytes; | 308 | tx_ring->total_bytes += total_bytes; |
309 | tx_ring->total_packets += total_packets; | 309 | tx_ring->total_packets += total_packets; |
310 | 310 | ||
311 | adapter->net_stats.tx_bytes += total_bytes; | 311 | netdev->stats.tx_bytes += total_bytes; |
312 | adapter->net_stats.tx_packets += total_packets; | 312 | netdev->stats.tx_packets += total_packets; |
313 | 313 | ||
314 | return (count < tx_ring->work_limit); | 314 | return (count < tx_ring->work_limit); |
315 | } | 315 | } |
@@ -639,8 +639,8 @@ next_desc: | |||
639 | 639 | ||
640 | rx_ring->total_packets += total_rx_packets; | 640 | rx_ring->total_packets += total_rx_packets; |
641 | rx_ring->total_bytes += total_rx_bytes; | 641 | rx_ring->total_bytes += total_rx_bytes; |
642 | adapter->net_stats.rx_bytes += total_rx_bytes; | 642 | adapter->netdev->stats.rx_bytes += total_rx_bytes; |
643 | adapter->net_stats.rx_packets += total_rx_packets; | 643 | adapter->netdev->stats.rx_packets += total_rx_packets; |
644 | 644 | ||
645 | return cleaned; | 645 | return cleaned; |
646 | } | 646 | } |
@@ -2297,7 +2297,7 @@ void ixgbevf_update_stats(struct ixgbevf_adapter *adapter) | |||
2297 | adapter->stats.vfmprc); | 2297 | adapter->stats.vfmprc); |
2298 | 2298 | ||
2299 | /* Fill out the OS statistics structure */ | 2299 | /* Fill out the OS statistics structure */ |
2300 | adapter->net_stats.multicast = adapter->stats.vfmprc - | 2300 | adapter->netdev->stats.multicast = adapter->stats.vfmprc - |
2301 | adapter->stats.base_vfmprc; | 2301 | adapter->stats.base_vfmprc; |
2302 | } | 2302 | } |
2303 | 2303 | ||
@@ -3181,21 +3181,6 @@ static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
3181 | } | 3181 | } |
3182 | 3182 | ||
3183 | /** | 3183 | /** |
3184 | * ixgbevf_get_stats - Get System Network Statistics | ||
3185 | * @netdev: network interface device structure | ||
3186 | * | ||
3187 | * Returns the address of the device statistics structure. | ||
3188 | * The statistics are actually updated from the timer callback. | ||
3189 | **/ | ||
3190 | static struct net_device_stats *ixgbevf_get_stats(struct net_device *netdev) | ||
3191 | { | ||
3192 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); | ||
3193 | |||
3194 | /* only return the current stats */ | ||
3195 | return &adapter->net_stats; | ||
3196 | } | ||
3197 | |||
3198 | /** | ||
3199 | * ixgbevf_set_mac - Change the Ethernet Address of the NIC | 3184 | * ixgbevf_set_mac - Change the Ethernet Address of the NIC |
3200 | * @netdev: network interface device structure | 3185 | * @netdev: network interface device structure |
3201 | * @p: pointer to an address structure | 3186 | * @p: pointer to an address structure |
@@ -3272,7 +3257,6 @@ static const struct net_device_ops ixgbe_netdev_ops = { | |||
3272 | .ndo_open = &ixgbevf_open, | 3257 | .ndo_open = &ixgbevf_open, |
3273 | .ndo_stop = &ixgbevf_close, | 3258 | .ndo_stop = &ixgbevf_close, |
3274 | .ndo_start_xmit = &ixgbevf_xmit_frame, | 3259 | .ndo_start_xmit = &ixgbevf_xmit_frame, |
3275 | .ndo_get_stats = &ixgbevf_get_stats, | ||
3276 | .ndo_set_rx_mode = &ixgbevf_set_rx_mode, | 3260 | .ndo_set_rx_mode = &ixgbevf_set_rx_mode, |
3277 | .ndo_set_multicast_list = &ixgbevf_set_rx_mode, | 3261 | .ndo_set_multicast_list = &ixgbevf_set_rx_mode, |
3278 | .ndo_validate_addr = eth_validate_addr, | 3262 | .ndo_validate_addr = eth_validate_addr, |