Skip to contentSkip to conversation

batman-adv: Fix build with linux < 3.9.0

PATCH Applied Sven Eckelmann 2 participants 2 messages Dec 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 compat-include/linux/netdevice.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
compat-include/linux/netdevice.h +6 -2
index 10253e0..eca7668 100644
@@ -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)
Signature · 1 line
2.6.4
#1 lore raw
Quoted 11 lines · On Monday, December 14, 2015 09:48:31 Sven Eckelmann wrote:

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 <[email protected]>

---
 compat-include/linux/netdevice.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Applied in revision 84e11be.

Thanks,
Marek