aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/led.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-20 00:40:23 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 00:40:23 -0500
commiteeda3fd64f75bcbfaa70ce946513abaf3f23b8e0 (patch)
tree082d1921a5783ef5b07b4cf666804d6509f25f1a /drivers/parisc/led.c
parentd314774cf2cd5dfeb39a00d37deee65d4c627927 (diff)
netdev: introduce dev_get_stats()
In order for the network device ops get_stats call to be immutable, the handling of the default internal network device stats block has to be changed. Add a new helper function which replaces the old use of internal_get_stats. Note: change return code to make it clear that the caller should not go changing the returned statistics. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/parisc/led.c')
-rw-r--r--drivers/parisc/led.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c
index f9b12664f9fb..454b6532e409 100644
--- a/drivers/parisc/led.c
+++ b/drivers/parisc/led.c
@@ -360,13 +360,13 @@ static __inline__ int led_get_net_activity(void)
360 read_lock(&dev_base_lock); 360 read_lock(&dev_base_lock);
361 rcu_read_lock(); 361 rcu_read_lock();
362 for_each_netdev(&init_net, dev) { 362 for_each_netdev(&init_net, dev) {
363 struct net_device_stats *stats; 363 const struct net_device_stats *stats;
364 struct in_device *in_dev = __in_dev_get_rcu(dev); 364 struct in_device *in_dev = __in_dev_get_rcu(dev);
365 if (!in_dev || !in_dev->ifa_list) 365 if (!in_dev || !in_dev->ifa_list)
366 continue; 366 continue;
367 if (ipv4_is_loopback(in_dev->ifa_list->ifa_local)) 367 if (ipv4_is_loopback(in_dev->ifa_list->ifa_local))
368 continue; 368 continue;
369 stats = dev->get_stats(dev); 369 stats = dev_get_stats(dev);
370 rx_total += stats->rx_packets; 370 rx_total += stats->rx_packets;
371 tx_total += stats->tx_packets; 371 tx_total += stats->tx_packets;
372 } 372 }