batman-adv: Drop support for kernel < 5.15
[feed/routing.git] / batman-adv / src / compat-hacks.h
index ee51b8748d4a8d3541659c6f9e0869c9861511d2..fcf7b936c7b11a3bd031f61798106706a2cdda47 100644 (file)
@@ -5,49 +5,6 @@
 #include <linux/version.h>     /* LINUX_VERSION_CODE */
 #include <linux/types.h>
 
-#if LINUX_VERSION_IS_LESS(5, 14, 0)
-
-#include <linux/if_bridge.h>
-#include <net/addrconf.h>
-
-#if IS_ENABLED(CONFIG_IPV6)
-static inline bool
-br_multicast_has_router_adjacent(struct net_device *dev, int proto)
-{
-       struct list_head bridge_mcast_list = LIST_HEAD_INIT(bridge_mcast_list);
-       struct br_ip_list *br_ip_entry, *tmp;
-       int ret;
-
-       if (proto != ETH_P_IPV6)
-               return true;
-
-       ret = br_multicast_list_adjacent(dev, &bridge_mcast_list);
-       if (ret < 0)
-               return true;
-
-       ret = false;
-
-       list_for_each_entry_safe(br_ip_entry, tmp, &bridge_mcast_list, list) {
-               if (br_ip_entry->addr.proto == htons(ETH_P_IPV6) &&
-                   ipv6_addr_is_ll_all_routers(&br_ip_entry->addr.dst.ip6))
-                       ret = true;
-
-               list_del(&br_ip_entry->list);
-               kfree(br_ip_entry);
-       }
-
-       return ret;
-}
-#else
-static inline bool
-br_multicast_has_router_adjacent(struct net_device *dev, int proto)
-{
-       return true;
-}
-#endif
-
-#endif /* LINUX_VERSION_IS_LESS(5, 14, 0) */
-
 #if LINUX_VERSION_IS_LESS(6, 0, 0)
 
 #define __vstring(item, fmt, ap) __dynamic_array(char, item, 256)