batman-adv: update to version 2023.0
authorSven Eckelmann <sven@narfation.org>
Thu, 26 Jan 2023 21:29:55 +0000 (22:29 +0100)
committerSven Eckelmann <sven@narfation.org>
Thu, 26 Jan 2023 21:29:55 +0000 (22:29 +0100)
* support latest kernels (4.14 - 6.2)

Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv/Makefile
batman-adv/src/compat-hacks.h

index 1ef5706973d89f8493279caf072e10827f189175..e3906707f8df57e304505449831aa589e9b82ca9 100644 (file)
@@ -3,12 +3,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=batman-adv
-PKG_VERSION:=2022.3
+PKG_VERSION:=2023.0
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
-PKG_HASH:=218ffb534fead1c9b5b0d90ec1b2fba688209cdf00e861bece1cbf469fe69953
+PKG_HASH:=2ce4ec04063252e7bfec3a2b3fa2a61b3b42c7b04d698ba60132bfab1d60a5cd
 PKG_EXTMOD_SUBDIRS:=net/batman-adv
 
 PKG_MAINTAINER:=Simon Wunderlich <sw@simonwunderlich.de>
index 495ea16d528d749a1c225b3a66273065f8c34dda..646e179b0d0f825836ef847a2815ab97691d8e67 100644 (file)
@@ -48,39 +48,28 @@ br_multicast_has_router_adjacent(struct net_device *dev, int proto)
 
 #endif /* LINUX_VERSION_IS_LESS(5, 14, 0) */
 
-#if LINUX_VERSION_IS_LESS(5, 15, 0)
+#if LINUX_VERSION_IS_LESS(6, 0, 0)
 
-static inline void batadv_eth_hw_addr_set(struct net_device *dev,
-                                         const u8 *addr)
-{
-       ether_addr_copy(dev->dev_addr, addr);
-}
-#define eth_hw_addr_set batadv_eth_hw_addr_set
+#define __vstring(item, fmt, ap) __dynamic_array(char, item, 256)
+#define __assign_vstr(dst, fmt, va) \
+       WARN_ON_ONCE(vsnprintf(__get_dynamic_array(dst), 256, fmt, *va) >= 256)
+
+#endif /* LINUX_VERSION_IS_LESS(6, 0, 0) */
 
-#endif /* LINUX_VERSION_IS_LESS(5, 15, 0) */
+#if LINUX_VERSION_IS_LESS(6, 2, 0)
 
-#if LINUX_VERSION_IS_LESS(5, 18, 0)
+#include <linux/random.h>
 
-#include <linux/netdevice.h>
+#define genl_split_ops genl_ops
 
-static inline int batadv_netif_rx(struct sk_buff *skb)
+static inline u32 batadv_get_random_u32_below(u32 ep_ro)
 {
-       if (in_interrupt())
-               return netif_rx(skb);
-       else
-               return netif_rx_ni(skb);
+       return prandom_u32_max(ep_ro);
 }
-#define netif_rx batadv_netif_rx
 
-#endif /* LINUX_VERSION_IS_LESS(5, 18, 0) */
+#define get_random_u32_below batadv_get_random_u32_below
 
-#if LINUX_VERSION_IS_LESS(6, 0, 0)
-
-#define __vstring(item, fmt, ap) __dynamic_array(char, item, 256)
-#define __assign_vstr(dst, fmt, va) \
-       WARN_ON_ONCE(vsnprintf(__get_dynamic_array(dst), 256, fmt, *va) >= 256)
-
-#endif /* LINUX_VERSION_IS_LESS(6, 0, 0) */
+#endif /* LINUX_VERSION_IS_LESS(6, 2, 0) */
 
 /* <DECLARE_EWMA> */