#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
/* Linux 2.6.24 added a network namespace pointer to the macro. */
#undef for_each_netdev
-#define for_each_netdev(net,d) list_for_each_entry(d, &dev_base_head, dev_list)
+#define for_each_netdev(net, d) list_for_each_entry(d, &dev_base_head, dev_list)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
-#define net_xmit_eval(e) ((e) == NET_XMIT_CN? 0 : (e))
+#define net_xmit_eval(e) ((e) == NET_XMIT_CN ? 0 : (e))
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
extern void dev_disable_lro(struct net_device *dev);
#endif
-/* Linux 2.6.28 introduced dev_get_stats():
- * const struct net_device_stats *dev_get_stats(struct net_device *dev);
- *
- * Linux 2.6.36 changed dev_get_stats() to:
- * struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
- * struct rtnl_link_stats64 *storage);
- */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
-#define dev_get_stats(dev, storage) rpl_dev_get_stats(dev, storage)
-struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
- struct rtnl_link_stats64 *storage);
-#endif
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
#define skb_checksum_help(skb) skb_checksum_help((skb), 0)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
#undef SET_ETHTOOL_OPS
#define SET_ETHTOOL_OPS(netdev, ops) \
- ( (netdev)->ethtool_ops = (struct ethtool_ops *)(ops) )
+ ((netdev)->ethtool_ops = (struct ethtool_ops *)(ops))
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
#define netif_needs_gso rpl_netif_needs_gso
static inline int rpl_netif_needs_gso(struct sk_buff *skb, int features)
{
- return skb_is_gso(skb) && (!skb_gso_ok(skb, features) ||
- unlikely(skb->ip_summed != CHECKSUM_PARTIAL));
+ return skb_is_gso(skb) && (!skb_gso_ok(skb, features) ||
+ unlikely(skb->ip_summed != CHECKSUM_PARTIAL));
}
#endif