The following commit has been merged in the master branch: commit f01af72e428717f15f2f612c07fd8ed57da19b7c Author: marek marek@45894c77-fb22-0410-b583-ff6e7d5dbf6c Date: Sun Oct 18 11:47:08 2009 +0000
[batman-adv] remove last LINUX_VERSION_CODE check outside of compat.h
git-svn-id: http://downloads.open-mesh.net/svn/batman/trunk/batman-adv-kernelland@1453 45894c77-fb22-0410-b583-ff6e7d5dbf6c
diff --git a/soft-interface.c b/soft-interface.c index 08a16e3..fa5289e 100644 --- a/soft-interface.c +++ b/soft-interface.c @@ -83,7 +83,7 @@ int my_skb_push(struct sk_buff *skb, unsigned int len) return 0; }
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) +#ifdef HAVE_NET_DEVICE_OPS static const struct net_device_ops bat_netdev_ops = { .ndo_open = interface_open, .ndo_stop = interface_release, @@ -93,7 +93,7 @@ static const struct net_device_ops bat_netdev_ops = { .ndo_start_xmit = interface_tx, .ndo_validate_addr = eth_validate_addr }; -#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) */ +#endif
void interface_setup(struct net_device *dev) { @@ -102,16 +102,16 @@ void interface_setup(struct net_device *dev)
ether_setup(dev);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) +#ifdef HAVE_NET_DEVICE_OPS + dev->netdev_ops = &bat_netdev_ops; +#else dev->open = interface_open; dev->stop = interface_release; dev->get_stats = interface_stats; dev->set_mac_address = interface_set_mac_addr; dev->change_mtu = interface_change_mtu; dev->hard_start_xmit = interface_tx; -#else - dev->netdev_ops = &bat_netdev_ops; -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) */ +#endif dev->destructor = free_netdev;
dev->mtu = hardif_min_mtu();