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@narfation.org --- 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)