[PATCH 05/20] headers: add genl_split_ops compat for kernels < 6.2

Yi Cong <[email protected]> Wed, 24 Jun 2026 15:38:29 +0800
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
From: Yi Cong <[email protected]>

genl_split_ops was introduced in v6.2; for older kernels, define it
as an alias for genl_ops so that pre_doit / post_doit callbacks in
nl80211.c compile without changes.

Signed-off-by: Yi Cong <[email protected]>
---
 backport/backport-include/net/genetlink.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/backport/backport-include/net/genetlink.h b/backport/backport-include/net/genetlink.h
index c3f05fc0..b98d7110 100644
--- a/backport/backport-include/net/genetlink.h
+++ b/backport/backport-include/net/genetlink.h
@@ -3,6 +3,10 @@
 #include_next <net/genetlink.h>
 #include <linux/version.h>
 
+#if LINUX_VERSION_IS_LESS(6,2,0)
+#define genl_split_ops genl_ops
+#endif
+
 /* this is for patches we apply */
 static inline struct netlink_ext_ack *genl_callback_extack(struct netlink_callback *cb)
 {
-- 
2.43.0