@@ -, +, @@ --- open-vm-tools/modules/linux/shared/compat_netdevice.h | 4 ++++ open-vm-tools/modules/linux/vmxnet/vmxnet.c | 13 ++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) --- a/open-vm-tools/modules/linux/shared/compat_netdevice.h +++ a/open-vm-tools/modules/linux/shared/compat_netdevice.h @@ -337,4 +337,8 @@ typedef netdev_features_t compat_netdev_features_t; typedef u32 compat_netdev_features_t; #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) || defined(SET_ETHTOOL_OPS) +#define VMW_HAVE_ETHTOOL_OPS 1 +#endif + #endif /* __COMPAT_NETDEVICE_H__ */ --- a/open-vm-tools/modules/linux/vmxnet/vmxnet.c +++ a/open-vm-tools/modules/linux/vmxnet/vmxnet.c @@ -283,8 +283,7 @@ vmxnet_change_mtu(struct net_device *dev, int new_mtu) #endif - -#ifdef SET_ETHTOOL_OPS +#ifdef VMW_HAVE_ETHTOOL_OPS /* *---------------------------------------------------------------------------- * @@ -530,7 +529,7 @@ vmxnet_ethtool_ops = { }; -#else /* !defined(SET_ETHTOOL_OPS) */ +#else /* !defined(VMW_HAVE_ETHTOOL_OPS) */ /* @@ -743,7 +742,7 @@ vmxnet_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) } return -EOPNOTSUPP; } -#endif /* SET_ETHTOOL_OPS */ +#endif /* !defined(VMW_HAVE_ETHTOOL_OPS) */ /* @@ -1142,8 +1141,12 @@ vmxnet_probe_device(struct pci_dev *pdev, // IN: vmxnet PCI device dev->watchdog_timeo = VMXNET_WATCHDOG_TIMEOUT; #endif -#ifdef SET_ETHTOOL_OPS +#ifdef VMW_HAVE_ETHTOOL_OPS +# ifdef SET_ETHTOOL_OPS SET_ETHTOOL_OPS(dev, &vmxnet_ethtool_ops); +# else + dev->ethtool_ops = &vmxnet_ethtool_ops; +# endif #else dev->do_ioctl = vmxnet_ioctl; #endif --