#include <linux/hid.h>
#include <linux/module.h>
#include "hid-ids.h"
+#include <linux/netdevice.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,5))
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
+void netdev_set_default_ethtool_ops(struct net_device *dev,
+ const struct ethtool_ops *ops)
+{
+ if (!dev->ethtool_ops)
+ dev->ethtool_ops = ops;
+}
+#else /* kernel is between 3.7.0 and 3.7.4 */;
+void netdev_set_default_ethtool_ops(struct net_device *dev,
+ const struct ethtool_ops *ops)
+{
+ if (dev->ethtool_ops == &default_ethtool_ops)
+ dev->ethtool_ops = ops;
+}
+#endif
+
+EXPORT_SYMBOL_GPL(netdev_set_default_ethtool_ops);
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,5) */
/* a list of devices that shouldn't be handled by HID core at all */
static const struct hid_device_id hid_ignore_list[] = {
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
#include <linux/hid.h>
+#include <linux/netdevice.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,5))
+extern void netdev_set_default_ethtool_ops(struct net_device *dev,
+ const struct ethtool_ops *ops);
+#endif
#define HID_BUS_ANY 0xffff
#define HID_GROUP_ANY 0x0000