diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2020-11-29 14:22:10 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2020-12-05 21:24:57 +0100 |
commit | 6e8afd0110a04c99c1c5ae6e623e5a7b97815b6f (patch) | |
tree | 1e457b9013eab1f54c765245ff9a9ceb6d7a5ee9 | |
parent | d11f102a550b927b5321ecd93d70cc3b8b1f648b (diff) | |
download | backports-6e8afd0110a04c99c1c5ae6e623e5a7b97815b6f.tar.gz |
patches: Revert usage of small_ops
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>
-rw-r--r-- | patches/0100-revert-small_ops/mac80211.patch | 25 | ||||
-rw-r--r-- | patches/0100-revert-small_ops/mac80211_hwsim.patch | 28 |
2 files changed, 53 insertions, 0 deletions
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), + }; |