Repository : ssh://git@open-mesh.org/batman-adv
On branch : next
>---------------------------------------------------------------
commit 84e11bed303d18950cdffae44e9a61423eb344c3
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Mon Dec 14 09:48:31 2015 +0100
batman-adv: Fix build with linux < 3.9.0
netdev_master_upper_dev_link already had a compat layer definition for
linux < 3.9. Move these two different definitions to the same block to
avoid using redefinitions which can break the build.
Fixes: e19f387b9538 ("batman-adv: add possibility to pass information about upper device via notifier")
Fixes: d794c1cd9d4f ("batman-adv: propagate upper priv via netdev_master_upper_dev_link")
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
>---------------------------------------------------------------
84e11bed303d18950cdffae44e9a61423eb344c3
compat-include/linux/netdevice.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/compat-include/linux/netdevice.h b/compat-include/linux/netdevice.h
index 10253e0..eca7668 100644
--- a/compat-include/linux/netdevice.h
+++ b/compat-include/linux/netdevice.h
@@ -84,7 +84,6 @@ static inline int batadv_netdev_set_master(struct net_device *slave,
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
-#define netdev_master_upper_dev_link netdev_set_master
#define netdev_upper_dev_unlink(slave, master) netdev_set_master(slave, NULL)
#define netdev_master_upper_dev_get(dev) \
({\
@@ -120,7 +119,12 @@ static inline int batadv_netdev_set_master(struct net_device *slave,
#endif /* < KERNEL_VERSION(3, 19, 0) */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
+
+#define netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info) \
+ netdev_set_master(dev, upper_dev)
+
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
#define netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info) \
netdev_master_upper_dev_link(dev, upper_dev)