Applied CCAT patch 0001-fix-ccat-netdev-for-v4.11.patch from Beckhoff. stable-1.5
authorFlorian Pose
Tue, 30 Jan 2018 17:08:21 +0100
branchstable-1.5
changeset 2695 ad58465e75ca
parent 2694 ab97efc5513a
child 2696 2b072c95b34c
Applied CCAT patch 0001-fix-ccat-netdev-for-v4.11.patch from Beckhoff.
devices/ccat/netdev.c
--- a/devices/ccat/netdev.c	Wed Dec 13 16:00:43 2017 +0100
+++ b/devices/ccat/netdev.c	Tue Jan 30 17:08:21 2018 +0100
@@ -22,6 +22,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/netdevice.h>
+#include <linux/version.h>
 
 #ifdef CONFIG_PCI
 #include <asm/dma.h>
@@ -793,8 +794,12 @@
 	return HRTIMER_RESTART;
 }
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0))
 static struct rtnl_link_stats64 *ccat_eth_get_stats64(struct net_device *dev, struct rtnl_link_stats64
 						      *storage)
+#else
+static void ccat_eth_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *storage)
+#endif
 {
 	struct ccat_eth_priv *const priv = netdev_priv(dev);
 	struct ccat_mac_register mac;
@@ -829,7 +834,9 @@
 	/* for cslip etc */
 	//TODO __u64    rx_compressed;
 	//TODO __u64    tx_compressed;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0))
 	return storage;
+#endif
 }
 
 static int ccat_eth_open(struct net_device *dev)