diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-04-15 15:49:05 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-04-15 15:56:57 +0200 |
commit | 84796d3406abb53b1ecda68f07e4d3af90902edc (patch) | |
tree | 1f2e124173855b2f354b97950d590f339c5fd4f2 /backport | |
parent | 930d1a702cc16f68b3c8e13521fb3767b06c29d6 (diff) |
Revert "backports: fix netdev_set_default_ethtool_ops code"
This reverts commit 91bf647c3a157688ce8e94c0df512cde1b3f5a87.
Also fix the #ifdef for netdev_set_default_ethtool_ops() as
it was backported into kernel 3.7.8.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport')
-rw-r--r-- | backport/backport-include/linux/netdevice.h | 2 | ||||
-rw-r--r-- | backport/compat/compat-3.7.c | 9 | ||||
-rw-r--r-- | backport/compat/compat-3.8.c | 10 |
3 files changed, 11 insertions, 10 deletions
diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index 11e20583..fb3a92f1 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -99,7 +99,7 @@ extern int init_dummy_netdev(struct net_device *dev); #define napi_gro_receive(napi, skb) netif_receive_skb(skb) #endif /* < 2.6.29 */ -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,8) #define netdev_set_default_ethtool_ops LINUX_BACKPORT(netdev_set_default_ethtool_ops) extern void netdev_set_default_ethtool_ops(struct net_device *dev, const struct ethtool_ops *ops); diff --git a/backport/compat/compat-3.7.c b/backport/compat/compat-3.7.c index cef7e0c6..284e8dcb 100644 --- a/backport/compat/compat-3.7.c +++ b/backport/compat/compat-3.7.c @@ -12,15 +12,6 @@ #include <linux/export.h> #include <linux/pci.h> #include <linux/pci_regs.h> -#include <linux/netdevice.h> - -void netdev_set_default_ethtool_ops(struct net_device *dev, - const struct ethtool_ops *ops) -{ - if (!dev->ethtool_ops) - dev->ethtool_ops = ops; -} -EXPORT_SYMBOL_GPL(netdev_set_default_ethtool_ops); bool mod_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork, unsigned long delay) diff --git a/backport/compat/compat-3.8.c b/backport/compat/compat-3.8.c index c6d88342..81343234 100644 --- a/backport/compat/compat-3.8.c +++ b/backport/compat/compat-3.8.c @@ -18,6 +18,16 @@ #include "hid-ids.h" #include <linux/netdevice.h> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,8)) +void netdev_set_default_ethtool_ops(struct net_device *dev, + const struct ethtool_ops *ops) +{ + if (!dev->ethtool_ops) + dev->ethtool_ops = ops; +} +EXPORT_SYMBOL_GPL(netdev_set_default_ethtool_ops); +#endif + /* a list of devices that shouldn't be handled by HID core at all */ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_FLAIR) }, |