[v3,02/12] batman-adv: compat.h: Add workaround for get_link_net()

Message ID 1462204366-23047-3-git-send-email-andrew@lunn.ch (mailing list archive)
State Superseded, archived
Delegated to: Marek Lindner
Headers

Commit Message

Andrew Lunn May 2, 2016, 3:52 p.m. UTC
  Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
v2: Fix accidental newline deletion
---
 compat.h | 7 +++++++
 1 file changed, 7 insertions(+)
  

Patch

diff --git a/compat.h b/compat.h
index 5a5f478..813e637 100644
--- a/compat.h
+++ b/compat.h
@@ -140,6 +140,13 @@  static int __batadv_interface_kill_vid(struct net_device *dev, __be16 proto,\
 
 #endif /* < KERNEL_VERSION(3, 15, 0) */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
+
+/* WARNING for batadv_getlink_net */
+#define get_link_net get_xstats_size || 0 || netdev->rtnl_link_ops->get_xstats_size
+
+#endif /* < KERNEL_VERSION(4, 0, 0) */
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
 
 #define IFF_NO_QUEUE	0; dev->tx_queue_len = 0