batman-adv: drop support for kernels < 6.12

OpenWrt only supports Linux 6.12 at the moment. It is no longer necessary
to support older versions of the kernel.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
Sven Eckelmann
2025-12-20 18:34:33 +01:00
parent 091138d5b3
commit e8d322e216
4 changed files with 1 additions and 128 deletions

View File

@@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=batman-adv
PKG_VERSION:=2025.5
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)

View File

@@ -1,72 +0,0 @@
From: Sven Eckelmann <sven@narfation.org>
Date: Fri, 2 Feb 2024 22:49:48 +0100
Subject: Revert "batman-adv: Switch to linux/array_size.h"
The original patch requires Linux 6.7.0 or a mac80211 compat header with this
name. But the mac80211 package is currently not providing this header and
OpenWrt main is still using older Linux kernel versions for some targets.
This reverts commit f33d7f724675544a36b24c77f8d4b95d41252ae2.
--- a/compat-include/linux/array_size.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_ARRAY_SIZE_H_
-#define _NET_BATMAN_ADV_COMPAT_LINUX_ARRAY_SIZE_H_
-
-#include <linux/version.h>
-#if (LINUX_VERSION_IS_GEQ(5, 15, 197) && LINUX_VERSION_IS_LESS(5, 16, 0)) || \
- (LINUX_VERSION_IS_GEQ(6, 1, 159) && LINUX_VERSION_IS_LESS(6, 2, 0)) || \
- (LINUX_VERSION_IS_GEQ(6, 6, 118) && LINUX_VERSION_IS_LESS(6, 7, 0)) || \
- LINUX_VERSION_IS_GEQ(6, 7, 0)
-#include_next <linux/array_size.h>
-#else
-#include <linux/kernel.h>
-#endif
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_ARRAY_SIZE_H_ */
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -6,7 +6,6 @@
#include "main.h"
-#include <linux/array_size.h>
#include <linux/atomic.h>
#include <linux/build_bug.h>
#include <linux/byteorder/generic.h>
@@ -19,6 +18,7 @@
#include <linux/init.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
+#include <linux/kernel.h>
#include <linux/kobject.h>
#include <linux/kref.h>
#include <linux/list.h>
--- a/net/batman-adv/netlink.c
+++ b/net/batman-adv/netlink.c
@@ -7,7 +7,6 @@
#include "netlink.h"
#include "main.h"
-#include <linux/array_size.h>
#include <linux/atomic.h>
#include <linux/bitops.h>
#include <linux/bug.h>
@@ -19,6 +18,7 @@
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/init.h>
+#include <linux/kernel.h>
#include <linux/limits.h>
#include <linux/minmax.h>
#include <linux/netdevice.h>

View File

@@ -1,49 +0,0 @@
From: Sven Eckelmann <sven@narfation.org>
Date: Tue, 10 Dec 2024 22:31:33 +0100
Subject: Revert "batman-adv: move asm/unaligned.h to linux/unaligned.h"
This header is only available with Linux 6.12
This reverts commit ee60832ebec47a023d634b06f9434103ec090aed.
--- a/compat-include/linux/unaligned.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_UNALIGNED_H_
-#define _NET_BATMAN_ADV_COMPAT_LINUX_UNALIGNED_H_
-
-#include <linux/version.h>
-#if LINUX_VERSION_IS_GEQ(6, 12, 0)
-#include_next <linux/unaligned.h>
-#else
-#include <asm/unaligned.h>
-#endif
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_UNALIGNED_H_ */
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -7,6 +7,7 @@
#include "distributed-arp-table.h"
#include "main.h"
+#include <asm/unaligned.h>
#include <linux/atomic.h>
#include <linux/bitops.h>
#include <linux/byteorder/generic.h>
@@ -32,7 +33,6 @@
#include <linux/stddef.h>
#include <linux/string.h>
#include <linux/udp.h>
-#include <linux/unaligned.h>
#include <linux/workqueue.h>
#include <net/arp.h>
#include <net/genetlink.h>

View File

@@ -5,12 +5,6 @@
#include <linux/version.h> /* LINUX_VERSION_CODE */
#include <linux/types.h>
#if LINUX_VERSION_IS_LESS(6, 10, 0)
#define __counted_by_be(member)
#endif /* LINUX_VERSION_IS_LESS(6, 10, 0) */
#if LINUX_VERSION_IS_LESS(6, 15, 0)
#include <linux/crc32c.h>
#endif /* LINUX_VERSION_IS_LESS(6, 15, 0) */