batman-adv: fix compat of net_ratelimited_function for >3.2.46

Message ID 1380834133-10808-1-git-send-email-siwu@hrz.tu-chemnitz.de (mailing list archive)
State Accepted, archived
Commit 227df84f96206b2b26cecdc3d5d75d0ab675f577
Headers

Commit Message

Simon Wunderlich Oct. 3, 2013, 9:02 p.m. UTC
  From: Simon Wunderlich <simon@open-mesh.com>

Appearently net_ratelimited_function was added to the stable series of
from 3.2.47, which results in a lot of warnings when compiling against
this kernel. This patch avoids this redefinition.

Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
---
 compat.h |    2 ++
 1 file changed, 2 insertions(+)
  

Comments

Marek Lindner Oct. 9, 2013, 8:14 a.m. UTC | #1
On Thursday 03 October 2013 23:02:13 Simon Wunderlich wrote:
> From: Simon Wunderlich <simon@open-mesh.com>
> 
> Appearently net_ratelimited_function was added to the stable series of
> from 3.2.47, which results in a lot of warnings when compiling against
> this kernel. This patch avoids this redefinition.
> 
> Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
> ---
>  compat.h |    2 ++
>  1 file changed, 2 insertions(+)

Applied in revision 227df84.

Thanks,
Marek
  
Bastian Bittorf Oct. 9, 2013, 10:35 a.m. UTC | #2
* Marek Lindner <mareklindner@neomailbox.ch> [09.10.2013 12:28]:
> > Appearently net_ratelimited_function was added to the stable series of
> > from 3.2.47, which results in a lot of warnings when compiling against
> > this kernel. This patch avoids this redefinition.
> > 
> > Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
> > ---
> >  compat.h |    2 ++
> >  1 file changed, 2 insertions(+)
> 
> Applied in revision 227df84.

can this be backported to 'openwrt-routing' feed?

bye, bastian
  
Marek Lindner Oct. 9, 2013, 12:05 p.m. UTC | #3
On Wednesday 09 October 2013 12:35:15 Bastian Bittorf wrote:
> * Marek Lindner <mareklindner@neomailbox.ch> [09.10.2013 12:28]:
> > > Appearently net_ratelimited_function was added to the stable series of
> > > from 3.2.47, which results in a lot of warnings when compiling against
> > > this kernel. This patch avoids this redefinition.
> > > 
> > > Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
> > > ---
> > > 
> > >  compat.h |    2 ++
> > >  1 file changed, 2 insertions(+)
> > 
> > Applied in revision 227df84.
> 
> can this be backported to 'openwrt-routing' feed?

Is it urgent ? This weekend we planned to release the next batman-adv version 
which includes this fix.

Cheers,
Marek
  

Patch

diff --git a/compat.h b/compat.h
index 7e0a7f0..04a2256 100644
--- a/compat.h
+++ b/compat.h
@@ -241,11 +241,13 @@  static inline void batadv_eth_hw_addr_random(struct net_device *dev)
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0)
 
+#ifndef net_ratelimited_function
 #define net_ratelimited_function(func, ...) \
 	do { \
 		if (net_ratelimit()) \
 			func(__VA_ARGS__); \
 	} while (0)
+#endif /* ifndef net_ratelimited_function */
 
 #endif /* < KERNEL_VERSION(3, 5, 0) */