mac80211: fix build with linux kernel 6.6
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / build / 240-backport_genl_split_ops.patch
diff --git a/package/kernel/mac80211/patches/build/240-backport_genl_split_ops.patch b/package/kernel/mac80211/patches/build/240-backport_genl_split_ops.patch
new file mode 100644 (file)
index 0000000..b22804c
--- /dev/null
@@ -0,0 +1,32 @@
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -16442,8 +16442,14 @@ static u32 nl80211_internal_flags[] = {
+ #undef SELECTOR
+ };
++#if LINUX_VERSION_IS_LESS(6,2,0)
+ static int nl80211_pre_doit(const struct genl_ops *ops, struct sk_buff *skb,
+                           struct genl_info *info)
++#else
++static int nl80211_pre_doit(const struct genl_split_ops *ops,
++                          struct sk_buff *skb,
++                          struct genl_info *info)
++#endif
+ {
+       struct cfg80211_registered_device *rdev = NULL;
+       struct wireless_dev *wdev = NULL;
+@@ -16543,8 +16549,14 @@ out_unlock:
+       return err;
+ }
++#if LINUX_VERSION_IS_LESS(6,2,0)
+ static void nl80211_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
+                             struct genl_info *info)
++#else
++static void nl80211_post_doit(const struct genl_split_ops *ops,
++                            struct sk_buff *skb,
++                            struct genl_info *info)
++#endif
+ {
+       u32 internal_flags = nl80211_internal_flags[ops->internal_flags];