From: Johannes Berg Date: Mon, 15 Apr 2013 13:49:05 +0000 (+0200) Subject: Revert "backports: fix netdev_set_default_ethtool_ops code" X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=84796d3406abb53b1ecda68f07e4d3af90902edc;p=openwrt%2Fstaging%2Fblogic.git 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 --- diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index 11e205839c3f..fb3a92f1013f 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 cef7e0c6f62b..284e8dcb6878 100644 --- a/backport/compat/compat-3.7.c +++ b/backport/compat/compat-3.7.c @@ -12,15 +12,6 @@ #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 c6d88342dc2b..8134323453ac 100644 --- a/backport/compat/compat-3.8.c +++ b/backport/compat/compat-3.8.c @@ -18,6 +18,16 @@ #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) },