public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: Fix build with linux < 3.9.0
@ 2015-12-14  8:48 Sven Eckelmann
  2015-12-14 12:48 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2015-12-14  8:48 UTC (permalink / raw)
  To: b.a.t.m.a.n

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)
-- 
2.6.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix build with linux < 3.9.0
  2015-12-14  8:48 [B.A.T.M.A.N.] [PATCH] batman-adv: Fix build with linux < 3.9.0 Sven Eckelmann
@ 2015-12-14 12:48 ` Marek Lindner
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2015-12-14 12:48 UTC (permalink / raw)
  To: b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 668 bytes --]

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
> <sven@narfation.org>
> ---
>  compat-include/linux/netdevice.h | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Applied in revision 84e11be.

Thanks,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-14 12:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-14  8:48 [B.A.T.M.A.N.] [PATCH] batman-adv: Fix build with linux < 3.9.0 Sven Eckelmann
2015-12-14 12:48 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox