This reverts commit 725b4ef5be840cfcd0ca33b9393c14dee40c10f7.
diff --git a/compat-include/net/genetlink.h b/compat-include/net/genetlink.h
-index f16355febac42294491531a3f8049bc680560d0c..d1f80cd88503cdd11e9051f2e90ea533bee89a67 100644
+index 56a9ab22c062b1d0d01ef9d09ce796075d3d6df7..8f542bef10dc0f2682ab2d428c90df9ab97977ce 100644
--- a/compat-include/net/genetlink.h
+++ b/compat-include/net/genetlink.h
@@ -31,17 +31,15 @@ void batadv_genl_dump_check_consistent(struct netlink_callback *cb,
#endif /* _NET_BATMAN_ADV_COMPAT_NET_GENETLINK_H_ */
diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c
-index 97bcf149633d850ff4fcece6d7dc0d799adb1444..a8f15c04826af1144db655887b754758fc5ab47a 100644
+index f317d206b411d87b4da2f57e35c3fb78cedfb160..bdac5dbd899a9540d58052fd32c8c89520927390 100644
--- a/net/batman-adv/netlink.c
+++ b/net/batman-adv/netlink.c
@@ -1351,7 +1351,7 @@ static void batadv_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
diff --git a/compat-include/linux/minmax.h b/compat-include/linux/minmax.h
deleted file mode 100644
-index 4b19479bc5ea12c5005485f623decfad90a85cff..0000000000000000000000000000000000000000
+index 9b7269e8a760361c1650b947c77702f0bdcd73d9..0000000000000000000000000000000000000000
--- a/compat-include/linux/minmax.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
--/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
+-/* Copyright (C) B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_MINMAX_H_ */
diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c
-index e4455babe4c28f8c1527a17e825675183c37ea1d..22183e954647089ca72a941e744375d72e1f94b0 100644
+index e1ca2b8c315235f234c9061fc73cde2c1b76aa46..eeb3f6d00d8541b377c9703837ef76b05e8d061e 100644
--- a/net/batman-adv/bat_v.c
+++ b/net/batman-adv/bat_v.c
@@ -15,7 +15,6 @@
#include <linux/netlink.h>
#include <linux/rculist.h>
diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
-index 0512ea6cd818c22768e601f446ff806cf863163b..79a7dfc32e76c511c5b5d8716cbebf64f6228d9d 100644
+index 423c2d17170387bfe89b83c4e20f06d525a36b30..4d8e3fdb4427a431cab903bc8a20edb816079fd7 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -18,7 +18,6 @@
#include <linux/nl80211.h>
#include <linux/prandom.h>
diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c
-index 798d659855d0bcc9d7638901fedeb77d830f1980..8c1148fc73d776c076bdb35896f5536d7378578d 100644
+index a0a9636d17406362f879f342300a18e75424efa5..89ba88322c9c11acc49a9dcd9877ad8767fe713b 100644
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -18,7 +18,6 @@
#include <linux/netdevice.h>
#include <linux/prandom.h>
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
-index e522f1fcfd9af04ee2d92b1b11ace6960d6f9c9f..ea40e54867573320d44e68524589454db553fb81 100644
+index a5d9d800082bade3a1d52cc040557e41f963fac3..96873d47fac5cb9b4fbfa217eedf1f92818b0e98 100644
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@ -14,8 +14,8 @@
#include <linux/skbuff.h>
#include <linux/slab.h>
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
-index 0f186ddc15e30a9c9f5e4de44b96b2c7b27d8b86..b57e95c959cf064a74a01d25a24bdc495caa6324 100644
+index 4a6a25d551a83b1723e80a349e1a655a2152b0ac..eabde547d308438257622879e77d84c24daa2199 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -18,7 +18,6 @@
#include <linux/netdevice.h>
#include <linux/printk.h>
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
-index ed9d87ce3407614e5e37922fe3039324adb027cc..edc0d53e9ba0a79ad0c37986e15ec362fb009f4f 100644
+index 3ddd66e4c29ef532de33c7182cc0cc470b33fd4f..c552bc4168d0abd7bf6d23e570d583806fb162b1 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -23,7 +23,6 @@
#include <linux/netdevice.h>
#include <linux/printk.h>
diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c
-index a8f15c04826af1144db655887b754758fc5ab47a..dc193618a761c0b451e860ca83921007d286e09b 100644
+index bdac5dbd899a9540d58052fd32c8c89520927390..b6a703ddd8e97e6a02e8d73c5728802f090ab419 100644
--- a/net/batman-adv/netlink.c
+++ b/net/batman-adv/netlink.c
@@ -23,7 +23,6 @@
#include <linux/netlink.h>
#include <linux/printk.h>
diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c
-index d4e10005df6cd2936a3132e1ad7bd8bf3c1d99b6..db7e3774825b5f5871b23c0e4fa5ce7afb2accd6 100644
+index 789c851732b78ad9d1515f7b171219cc770c7045..46b774c08c947def8f72f260224254b01c3a387d 100644
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@ -23,7 +23,6 @@
--- /dev/null
+From: Sven Eckelmann <sven@narfation.org>
+Date: Fri, 14 May 2021 19:34:35 +0200
+Subject: batman-adv: Fix build of multicast code against Linux < 5.13
+
+Fixes: 007b4c4b031f ("batman-adv: convert ifmcaddr6 to RCU")
+Signed-off-by: Sven Eckelmann <sven@narfation.org>
+
+diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
+index 1d63c8cbbfe7b16e360e91bcf3bb77ec7b12893b..ece9fb5dd81bfadbdbe15363dfd8fd257dbe942f 100644
+--- a/net/batman-adv/multicast.c
++++ b/net/batman-adv/multicast.c
+@@ -454,9 +454,14 @@ batadv_mcast_mla_softif_get_ipv6(struct net_device *dev,
+ return 0;
+ }
+
++#if LINUX_VERSION_IS_LESS(5, 13, 0)
++ read_lock_bh(&in6_dev->lock);
++ for (pmc6 = in6_dev->mc_list; pmc6; pmc6 = pmc6->next) {
++#else
+ for (pmc6 = rcu_dereference(in6_dev->mc_list);
+ pmc6;
+ pmc6 = rcu_dereference(pmc6->next)) {
++#endif
+ if (IPV6_ADDR_MC_SCOPE(&pmc6->mca_addr) <
+ IPV6_ADDR_SCOPE_LINKLOCAL)
+ continue;
+@@ -485,6 +490,9 @@ batadv_mcast_mla_softif_get_ipv6(struct net_device *dev,
+ hlist_add_head(&new->list, mcast_list);
+ ret++;
+ }
++#if LINUX_VERSION_IS_LESS(5, 13, 0)
++ read_unlock_bh(&in6_dev->lock);
++#endif
+ rcu_read_unlock();
+
+ return ret;