static void vmxnet_set_multicast_list(struct net_device *dev);
static int vmxnet_set_mac_address(struct net_device *dev, void *addr);
static struct net_device_stats *vmxnet_get_stats(struct net_device *dev);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
+static int vmxnet_set_features(struct net_device *netdev, compat_netdev_features_t
+ features);
+#endif
#if defined(HAVE_CHANGE_MTU) || defined(HAVE_NET_DEVICE_OPS)
static int vmxnet_change_mtu(struct net_device *dev, int new_mtu);
#endif
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
/*
*----------------------------------------------------------------------------
*
*----------------------------------------------------------------------------
*/
-#ifdef VMXNET_DO_TSO
+# ifdef VMXNET_DO_TSO
static int
vmxnet_set_tso(struct net_device *dev, u32 data)
{
}
return 0;
}
+# endif
#endif
.get_settings = vmxnet_get_settings,
.get_drvinfo = vmxnet_get_drvinfo,
.get_link = ethtool_op_get_link,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
.get_rx_csum = vmxnet_get_rx_csum,
.set_rx_csum = vmxnet_set_rx_csum,
.get_tx_csum = vmxnet_get_tx_csum,
.set_tx_csum = vmxnet_set_tx_csum,
.get_sg = ethtool_op_get_sg,
.set_sg = ethtool_op_set_sg,
-#ifdef VMXNET_DO_TSO
+# ifdef VMXNET_DO_TSO
.get_tso = ethtool_op_get_tso,
.set_tso = vmxnet_set_tso,
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
.get_ufo = ethtool_op_get_ufo,
+# endif
# endif
#endif
};
.ndo_start_xmit = &vmxnet_start_tx,
.ndo_stop = &vmxnet_close,
.ndo_get_stats = &vmxnet_get_stats,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
+ .ndo_set_features = vmxnet_set_features,
+#endif
#if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
.ndo_set_multicast_list = &vmxnet_set_multicast_list,
#else
return &lp->stats;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
+static int
+vmxnet_set_features(struct net_device *netdev, compat_netdev_features_t features)
+{
+ compat_netdev_features_t changed = features ^ netdev->features;
+
+ if (changed & (NETIF_F_RXCSUM)) {
+ if (features & NETIF_F_RXCSUM)
+ return 0;
+ }
+ return -1;
+}
+#endif
+
module_init(vmxnet_init);
module_exit(vmxnet_exit);
MODULE_DEVICE_TABLE(pci, vmxnet_chips);