Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
commit b609f2633565303738d115561983dc3567d25ab6 Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Oct 19 19:59:41 2014 +0200
batman-adv: move misplaced compat code
consume_skb() has to be re-defined only for kernels <2.6.30 but the macro was accidentally placed right above any #ifdef block causing the function to be always redefined.
Fix this by moving the macro to the proper #ifdef block.
Introduced by: 15fb0fab51a3695738f65dfaab045e979fc89dce ("batman-adv add compat code for consume_skb")
Reported-by: Sven Eckelmann sven@narfation.org Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
b609f2633565303738d115561983dc3567d25ab6 compat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compat.h b/compat.h index d3db201..c22fe1c 100644 --- a/compat.h +++ b/compat.h @@ -23,10 +23,10 @@
#include <linux/version.h> /* LINUX_VERSION_CODE */
-#define consume_skb(_skb) kfree_skb(_skb) - #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
+#define consume_skb(_skb) kfree_skb(_skb) + #undef __alloc_percpu #define __alloc_percpu(size, align) \ percpu_alloc_mask((size), GFP_KERNEL, cpu_possible_map)