diff -r 000da5069f1a -r 6e419c23b1b3 devices/ccat/netdev-3.4-ethercat.c --- a/devices/ccat/netdev-3.4-ethercat.c Mon Apr 07 07:31:50 2014 +0200 +++ b/devices/ccat/netdev-3.4-ethercat.c Wed Apr 23 13:15:10 2014 +0200 @@ -27,6 +27,7 @@ #include #include +#include "compat.h" #include "module.h" #include "netdev.h" #include "print.h" @@ -57,8 +58,10 @@ static int run_rx_thread(void *data); static int run_tx_thread(void *data); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) static struct rtnl_link_stats64 *ccat_eth_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *storage); +#endif static int ccat_eth_open(struct net_device *dev); static netdev_tx_t ccat_eth_start_xmit(struct sk_buff *skb, struct net_device *dev); @@ -67,7 +70,9 @@ size_t len); static const struct net_device_ops ccat_eth_netdev_ops = { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) .ndo_get_stats64 = ccat_eth_get_stats64, +#endif .ndo_open = ccat_eth_open, .ndo_start_xmit = ccat_eth_start_xmit, .ndo_stop = ccat_eth_stop, @@ -240,6 +245,7 @@ return (1 << 24) == (ioread32(priv->reg.mii + 0x8 + 4) & (1 << 24)); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) static struct rtnl_link_stats64 *ccat_eth_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *storage) { @@ -277,6 +283,7 @@ //TODO __u64 tx_compressed; return storage; } +#endif struct ccat_eth_priv *ccat_eth_init(const struct ccat_device *const ccatdev, const void __iomem * const addr)