@@ -1,4 +1,4 @@
-#include <linux/version.h>
+#include "main.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
@@ -959,3 +959,31 @@ int bat_seq_printf(struct seq_file *m, const char *f, ...)
}
#endif /* < KERNEL_VERSION(2, 6, 29) */
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 1234)
+
+void free_rcu_gw_node(struct rcu_head *rcu)
+{
+ struct gw_node *gw_node;
+
+ gw_node = container_of(rcu, struct gw_node, rcu);
+ kfree(gw_node);
+}
+
+void free_rcu_neigh_node(struct rcu_head *rcu)
+{
+ struct neigh_node *neigh_node;
+
+ neigh_node = container_of(rcu, struct neigh_node, rcu);
+ kfree(neigh_node);
+}
+
+void free_rcu_softif_neigh(struct rcu_head *rcu)
+{
+ struct softif_neigh *softif_neigh;
+
+ softif_neigh = container_of(rcu, struct softif_neigh, rcu);
+ kfree(softif_neigh);
+}
+
+#endif /* < KERNEL_VERSION(2, 6, 1234) */
@@ -291,4 +291,14 @@ int bat_seq_printf(struct seq_file *m, const char *f, ...);
#endif /* < KERNEL_VERSION(2, 6, 36) */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 1234)
+
+#define kfree_rcu(ptr, rcu_head) call_rcu(&ptr->rcu_head, free_rcu_##ptr)
+
+void free_rcu_gw_node(struct rcu_head *rcu);
+void free_rcu_neigh_node(struct rcu_head *rcu);
+void free_rcu_softif_neigh(struct rcu_head *rcu);
+
+#endif /* < KERNEL_VERSION(2, 6, 1234) */
+
#endif /* _NET_BATMAN_ADV_COMPAT_H_ */
Signed-off-by: Sven Eckelmann <sven@narfation.org> --- compat.c | 30 +++++++++++++++++++++++++++++- compat.h | 10 ++++++++++ 2 files changed, 39 insertions(+), 1 deletions(-)