2024-02-03 05:46:09 +08:00
|
|
|
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,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_ARRAY_SIZE_H_
|
|
|
|
-#define _NET_BATMAN_ADV_COMPAT_LINUX_ARRAY_SIZE_H_
|
|
|
|
-
|
|
|
|
-#include <linux/version.h>
|
|
|
|
-#if 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>
|
2024-10-16 03:12:36 +08:00
|
|
|
@@ -20,6 +19,7 @@
|
2024-02-03 05:46:09 +08:00
|
|
|
#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>
|
2024-06-23 03:33:40 +08:00
|
|
|
@@ -19,6 +18,7 @@
|
2024-02-03 05:46:09 +08:00
|
|
|
#include <linux/if_ether.h>
|
|
|
|
#include <linux/if_vlan.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
+#include <linux/kernel.h>
|
|
|
|
#include <linux/limits.h>
|
|
|
|
#include <linux/list.h>
|
|
|
|
#include <linux/minmax.h>
|