b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Sven Eckelmann <sven@narfation.org>
Subject: [PATCH v2] batman-adv: Drop support for Linux < 4.19
Date: Wed, 10 Jan 2024 22:14:37 +0100	[thread overview]
Message-ID: <20240110-drop-compat-4-14-v2-1-0581c371c90f@narfation.org> (raw)

The Linux Kernel 4.14 reached its end of life [1] after 6 years. Instead it
is recommended to use at least kernel 4.19. It is also over 5 years
old but still maintained by the stable kernel team. All older kernels
(4.14 - v4.18) will be dropped to reduce the support overhead.

[1] https://lore.kernel.org/r/2024011046-ecology-tiptoeing-ce50@gregkh/

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
Changes in v2:
- Add EOL announcement URL to commit message
- Fix conflict in README.external.rst
- Link to v1: https://lore.kernel.org/r/20231104-drop-compat-4-14-v1-1-d2453b1cfd45@narfation.org
---
 README.external.rst              |  2 +-
 compat-include/linux/netdevice.h |  8 --------
 compat-include/linux/stddef.h    | 24 ------------------------
 compat-include/net/cfg80211.h    | 40 ----------------------------------------
 compat-include/net/genetlink.h   | 18 ------------------
 compat.h                         |  7 -------
 6 files changed, 1 insertion(+), 98 deletions(-)

diff --git a/README.external.rst b/README.external.rst
index 3b014af8..4e1de973 100644
--- a/README.external.rst
+++ b/README.external.rst
@@ -12,7 +12,7 @@ and as an external module. The external  module   allows  to  get
 new    features without  upgrading  to  a  newer  kernel  version
 and to get batman-adv specific bug fixes for  kernels  that   are
 not   supported   anymore.  It compiles  against  and should work
-with  Linux 4.14  -  6.7.  Supporting  older  versions   is   not
+with  Linux 4.19  -  6.7.  Supporting  older  versions   is   not
 planned,  but it's probably easy to backport it. If you work on a
 backport, feel free to contact us.  :-)
 
diff --git a/compat-include/linux/netdevice.h b/compat-include/linux/netdevice.h
index 3188ad3d..a489ac9b 100644
--- a/compat-include/linux/netdevice.h
+++ b/compat-include/linux/netdevice.h
@@ -13,14 +13,6 @@
 #include <linux/version.h>
 #include_next <linux/netdevice.h>
 
-#if LINUX_VERSION_IS_LESS(4, 15, 0)
-
-#define netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info, extack) \
-	netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info)
-
-#endif /* LINUX_VERSION_IS_LESS(4, 15, 0) */
-
-
 #if LINUX_VERSION_IS_LESS(5, 15, 0)
 
 static inline void batadv_dev_put(struct net_device *dev)
diff --git a/compat-include/linux/stddef.h b/compat-include/linux/stddef.h
deleted file mode 100644
index c4558f81..00000000
--- a/compat-include/linux/stddef.h
+++ /dev/null
@@ -1,24 +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_STDDEF_H_
-#define _NET_BATMAN_ADV_COMPAT_LINUX_STDDEF_H_
-
-#include <linux/version.h>
-#include_next <linux/stddef.h>
-
-#if LINUX_VERSION_IS_LESS(4, 16, 0)
-
-#ifndef sizeof_field
-#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER))
-#endif
-
-#endif /* LINUX_VERSION_IS_LESS(4, 16, 0) */
-
-#endif	/* _NET_BATMAN_ADV_COMPAT_LINUX_STDDEF_H_ */
diff --git a/compat-include/net/cfg80211.h b/compat-include/net/cfg80211.h
deleted file mode 100644
index 4bfcd5a3..00000000
--- a/compat-include/net/cfg80211.h
+++ /dev/null
@@ -1,40 +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_NET_CFG80211_H_
-#define _NET_BATMAN_ADV_COMPAT_NET_CFG80211_H_
-
-#include <linux/version.h>
-#include_next <net/cfg80211.h>
-
-
-#if LINUX_VERSION_IS_LESS(4, 18, 0) && IS_ENABLED(CONFIG_CFG80211)
-
-/* cfg80211 fix: https://patchwork.kernel.org/patch/10449857/ */
-static inline int batadv_cfg80211_get_station(struct net_device *dev,
-					      const u8 *mac_addr,
-					      struct station_info *sinfo)
-{
-	memset(sinfo, 0, sizeof(*sinfo));
-	return cfg80211_get_station(dev, mac_addr, sinfo);
-}
-
-#define cfg80211_get_station(dev, mac_addr, sinfo) \
-	batadv_cfg80211_get_station(dev, mac_addr, sinfo)
-
-#endif /* LINUX_VERSION_IS_LESS(4, 18, 0) && IS_ENABLED(CONFIG_CFG80211) */
-
-
-#if LINUX_VERSION_IS_LESS(4, 18, 0)
-
-#define cfg80211_sinfo_release_content(sinfo)
-
-#endif /* LINUX_VERSION_IS_LESS(4, 18, 0) */
-
-#endif	/* _NET_BATMAN_ADV_COMPAT_NET_CFG80211_H_ */
diff --git a/compat-include/net/genetlink.h b/compat-include/net/genetlink.h
index 05c57ce0..85376044 100644
--- a/compat-include/net/genetlink.h
+++ b/compat-include/net/genetlink.h
@@ -13,24 +13,6 @@
 #include <linux/version.h>
 #include_next <net/genetlink.h>
 
-#if LINUX_VERSION_IS_LESS(4, 15, 0)
-
-static inline
-void batadv_genl_dump_check_consistent(struct netlink_callback *cb,
-				       void *user_hdr)
-{
-	struct genl_family genl_family = {
-		.hdrsize = 0,
-	};
-
-	genl_dump_check_consistent(cb, user_hdr, &genl_family);
-}
-
-#define genl_dump_check_consistent batadv_genl_dump_check_consistent
-
-#endif /* LINUX_VERSION_IS_LESS(4, 15, 0) */
-
-
 #if LINUX_VERSION_IS_LESS(5, 10, 0)
 
 #if LINUX_VERSION_IS_LESS(5, 2, 0)
diff --git a/compat.h b/compat.h
index 8e19f9bb..638bfc54 100644
--- a/compat.h
+++ b/compat.h
@@ -16,13 +16,6 @@
 #include "compat-autoconf.h"
 
 
-#if LINUX_VERSION_IS_LESS(4, 15, 0)
-
-#define batadv_softif_slave_add(__dev, __slave_dev, __extack) \
-	batadv_softif_slave_add(__dev, __slave_dev)
-
-#endif /* LINUX_VERSION_IS_LESS(4, 15, 0) */
-
 #endif /* __KERNEL__ */
 
 #endif /* _NET_BATMAN_ADV_COMPAT_H_ */

---
base-commit: e6fbde1250b73c3c9f49fc5a22ad9a8b10f864d5
change-id: 20231104-drop-compat-4-14-1bba04bac963

Best regards,
-- 
Sven Eckelmann <sven@narfation.org>


                 reply	other threads:[~2024-01-10 21:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240110-drop-compat-4-14-v2-1-0581c371c90f@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).