提交 fd15dd05 编写于 作者: J Johannes Berg 提交者: Jakub Kicinski

ethtool: correct policy for ETHTOOL_MSG_CHANNELS_SET

This accidentally got wired up to the *get* policy instead
of the *set* policy, causing operations to be rejected. Fix
it by wiring up the correct policy instead.

Fixes: 5028588b ("ethtool: wire up set policies to ops")
Reported-by: NLeon Romanovsky <leon@kernel.org>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Tested-by: NLeon Romanovsky <leonro@nvidia.com>
Reviewed-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 db972e53
...@@ -830,8 +830,8 @@ static const struct genl_ops ethtool_genl_ops[] = { ...@@ -830,8 +830,8 @@ static const struct genl_ops ethtool_genl_ops[] = {
.cmd = ETHTOOL_MSG_CHANNELS_SET, .cmd = ETHTOOL_MSG_CHANNELS_SET,
.flags = GENL_UNS_ADMIN_PERM, .flags = GENL_UNS_ADMIN_PERM,
.doit = ethnl_set_channels, .doit = ethnl_set_channels,
.policy = ethnl_channels_get_policy, .policy = ethnl_channels_set_policy,
.maxattr = ARRAY_SIZE(ethnl_channels_get_policy) - 1, .maxattr = ARRAY_SIZE(ethnl_channels_set_policy) - 1,
}, },
{ {
.cmd = ETHTOOL_MSG_COALESCE_GET, .cmd = ETHTOOL_MSG_COALESCE_GET,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册