[PATCH 24/30] patches: Revert usage of small_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This reverts upstream Linux kernel commit 66a9b9287d2 ("genetlink: move
to smaller ops wherever possible") for older kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 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

diff --git a/patches/0100-revert-small_ops/mac80211.patch b/patches/0100-revert-small_ops/mac80211.patch
new file mode 100644
index 00000000..37c2fcff
--- /dev/null
+++ b/patches/0100-revert-small_ops/mac80211.patch
@@ -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,
diff --git a/patches/0100-revert-small_ops/mac80211_hwsim.patch b/patches/0100-revert-small_ops/mac80211_hwsim.patch
new file mode 100644
index 00000000..1a764336
--- /dev/null
+++ b/patches/0100-revert-small_ops/mac80211_hwsim.patch
@@ -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),
+ };
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux