diff options
author | Patrick McHardy <kaber@trash.net> | 2009-04-20 00:49:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-21 05:00:51 -0400 |
commit | b1b67dd45a6b629eb41553856805aaa1614fbb83 (patch) | |
tree | 23d2b8dc59223b649f466564dac338c899595a7c /include/linux/netdevice.h | |
parent | 4510d7cb8b4e7d389652b8a4f89fad469a5ecc92 (diff) |
net: factor out ethtool invocation of vlan/macvlan drivers
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 24 |
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 | ||
51 | struct vlan_group; | 52 | struct vlan_group; |
52 | struct ethtool_ops; | ||
53 | struct netpoll_info; | 53 | struct netpoll_info; |
54 | /* 802.11 specific */ | 54 | /* 802.11 specific */ |
55 | struct wireless_dev; | 55 | struct wireless_dev; |
@@ -1906,6 +1906,28 @@ static inline int skb_bond_should_drop(struct sk_buff *skb) | |||
1906 | } | 1906 | } |
1907 | 1907 | ||
1908 | extern struct pernet_operations __net_initdata loopback_net_ops; | 1908 | extern struct pernet_operations __net_initdata loopback_net_ops; |
1909 | |||
1910 | static 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 | |||
1918 | static 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 | |||
1925 | static 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 */ |