new file mode 100644
@@ -0,0 +1,25 @@
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -14690,9 +14690,11 @@ static const struct genl_ops nl80211_ops
+ .internal_flags = NL80211_FLAG_NEED_WIPHY |
+ NL80211_FLAG_NEED_RTNL,
+ },
++#if LINUX_VERSION_IS_GEQ(5,10,0)
+ };
+
+ static const struct genl_small_ops nl80211_small_ops[] = {
++#endif
+ {
+ .cmd = NL80211_CMD_SET_WIPHY,
+ .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
+@@ -15554,8 +15556,10 @@ static struct genl_family nl80211_fam __
+ .module = THIS_MODULE,
+ .ops = nl80211_ops,
+ .n_ops = ARRAY_SIZE(nl80211_ops),
++#if LINUX_VERSION_IS_GEQ(5,10,0)
+ .small_ops = nl80211_small_ops,
+ .n_small_ops = ARRAY_SIZE(nl80211_small_ops),
++#endif
+ .mcgrps = nl80211_mcgrps,
+ .n_mcgrps = ARRAY_SIZE(nl80211_mcgrps),
+ .parallel_ops = true,
new file mode 100644
@@ -0,0 +1,28 @@
+--- a/drivers/net/wireless/mac80211_hwsim.c
++++ b/drivers/net/wireless/mac80211_hwsim.c
+@@ -3964,7 +3964,11 @@ done:
+ }
+
+ /* Generic Netlink operations array */
++#if LINUX_VERSION_IS_GEQ(5,10,0)
+ static const struct genl_small_ops hwsim_ops[] = {
++#else
++static const struct genl_ops hwsim_ops[] = {
++#endif
+ {
+ .cmd = HWSIM_CMD_REGISTER,
+ .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
+@@ -4008,8 +4012,13 @@ static struct genl_family hwsim_genl_fam
+ .policy = hwsim_genl_policy,
+ .netnsok = true,
+ .module = THIS_MODULE,
++#if LINUX_VERSION_IS_GEQ(5,10,0)
+ .small_ops = hwsim_ops,
+ .n_small_ops = ARRAY_SIZE(hwsim_ops),
++#else
++ .ops = hwsim_ops,
++ .n_ops = ARRAY_SIZE(hwsim_ops),
++#endif
+ .mcgrps = hwsim_mcgrps,
+ .n_mcgrps = ARRAY_SIZE(hwsim_mcgrps),
+ };
This reverts upstream Linux kernel commit 66a9b9287d2 ("genetlink: move to smaller ops wherever possible") for older kernel versions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> --- patches/0100-revert-small_ops/mac80211.patch | 25 +++++++++++++++++ .../mac80211_hwsim.patch | 28 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 patches/0100-revert-small_ops/mac80211.patch create mode 100644 patches/0100-revert-small_ops/mac80211_hwsim.patch