From 91bf647c3a157688ce8e94c0df512cde1b3f5a87 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 15 Apr 2013 13:50:01 +0200 Subject: [PATCH] backports: fix netdev_set_default_ethtool_ops code This needs to be included for kernel 3.7. Signed-off-by: Johannes Berg --- backport/compat/compat-3.7.c | 9 +++++++++ backport/compat/compat-3.8.c | 10 ---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/backport/compat/compat-3.7.c b/backport/compat/compat-3.7.c index 284e8dcb6878..cef7e0c6f62b 100644 --- a/backport/compat/compat-3.7.c +++ b/backport/compat/compat-3.7.c @@ -12,6 +12,15 @@ #include #include #include +#include + +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 8134323453ac..c6d88342dc2b 100644 --- a/backport/compat/compat-3.8.c +++ b/backport/compat/compat-3.8.c @@ -18,16 +18,6 @@ #include "hid-ids.h" #include -#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) }, -- 2.30.2