aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
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 /include/linux/netdevice.h
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 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9060f5f3517a..981a089d5149 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -865,8 +865,8 @@ struct net_device
865#ifdef CONFIG_NET_POLL_CONTROLLER 865#ifdef CONFIG_NET_POLL_CONTROLLER
866 void (*poll_controller)(struct net_device *dev); 866 void (*poll_controller)(struct net_device *dev);
867#endif 867#endif
868#endif
869 }; 868 };
869#endif
870}; 870};
871#define to_net_dev(d) container_of(d, struct net_device, dev) 871#define to_net_dev(d) container_of(d, struct net_device, dev)
872 872
@@ -1780,6 +1780,8 @@ extern void netdev_features_change(struct net_device *dev);
1780/* Load a device via the kmod */ 1780/* Load a device via the kmod */
1781extern void dev_load(struct net *net, const char *name); 1781extern void dev_load(struct net *net, const char *name);
1782extern void dev_mcast_init(void); 1782extern void dev_mcast_init(void);
1783extern const struct net_device_stats *dev_get_stats(struct net_device *dev);
1784
1783extern int netdev_max_backlog; 1785extern int netdev_max_backlog;
1784extern int weight_p; 1786extern int weight_p;
1785extern int netdev_set_master(struct net_device *dev, struct net_device *master); 1787extern int netdev_set_master(struct net_device *dev, struct net_device *master);