--- a/devices/ccat/netdev.c Thu Jun 05 16:30:22 2014 +0200
+++ b/devices/ccat/netdev.c Thu Jun 05 16:40:01 2014 +0200
@@ -25,7 +25,6 @@
#include <linux/netdevice.h>
#include <linux/spinlock.h>
-#include "compat.h"
#include "module.h"
#include "netdev.h"
@@ -50,10 +49,8 @@
static void ec_poll(struct net_device *dev);
static enum hrtimer_restart poll_timer_callback(struct hrtimer *timer);
-#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);
@@ -62,9 +59,7 @@
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,
@@ -75,7 +70,7 @@
/* never release a skb in EtherCAT mode */
}
-static bool ecdev_carrier_ok(struct net_device *const netdev)
+static bool ecdev_carrier_ok(const struct net_device *const netdev)
{
struct ccat_eth_priv *const priv = netdev_priv(netdev);
return ecdev_get_link(priv->ecdev);
@@ -242,7 +237,6 @@
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)
{
@@ -281,7 +275,6 @@
//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)