aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 54db3ebf2193..31167451d08d 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -42,6 +42,7 @@
42#include <linux/dmaengine.h> 42#include <linux/dmaengine.h>
43#include <linux/workqueue.h> 43#include <linux/workqueue.h>
44 44
45#include <linux/ethtool.h>
45#include <net/net_namespace.h> 46#include <net/net_namespace.h>
46#include <net/dsa.h> 47#include <net/dsa.h>
47#ifdef CONFIG_DCB 48#ifdef CONFIG_DCB
@@ -49,7 +50,6 @@
49#endif 50#endif
50 51
51struct vlan_group; 52struct vlan_group;
52struct ethtool_ops;
53struct netpoll_info; 53struct netpoll_info;
54/* 802.11 specific */ 54/* 802.11 specific */
55struct wireless_dev; 55struct wireless_dev;
@@ -1906,6 +1906,28 @@ static inline int skb_bond_should_drop(struct sk_buff *skb)
1906} 1906}
1907 1907
1908extern struct pernet_operations __net_initdata loopback_net_ops; 1908extern struct pernet_operations __net_initdata loopback_net_ops;
1909
1910static inline int dev_ethtool_get_settings(struct net_device *dev,
1911 struct ethtool_cmd *cmd)
1912{
1913 if (!dev->ethtool_ops || !dev->ethtool_ops->get_settings)
1914 return -EOPNOTSUPP;
1915 return dev->ethtool_ops->get_settings(dev, cmd);
1916}
1917
1918static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev)
1919{
1920 if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum)
1921 return 0;
1922 return dev->ethtool_ops->get_rx_csum(dev);
1923}
1924
1925static inline u32 dev_ethtool_get_flags(struct net_device *dev)
1926{
1927 if (!dev->ethtool_ops || !dev->ethtool_ops->get_flags)
1928 return 0;
1929 return dev->ethtool_ops->get_flags(dev);
1930}
1909#endif /* __KERNEL__ */ 1931#endif /* __KERNEL__ */
1910 1932
1911#endif /* _LINUX_DEV_H */ 1933#endif /* _LINUX_DEV_H */