summaryrefslogtreecommitdiff
path: root/net/ethtool/wol.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ethtool/wol.c')
-rw-r--r--net/ethtool/wol.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/ethtool/wol.c b/net/ethtool/wol.c
index 5bc38e2f5f61..5a306ffadffe 100644
--- a/net/ethtool/wol.c
+++ b/net/ethtool/wol.c
@@ -98,8 +98,7 @@ const struct ethnl_request_ops ethnl_wol_request_ops = {
/* WOL_SET */
-static const struct nla_policy
-wol_set_policy[ETHTOOL_A_WOL_MAX + 1] = {
+const struct nla_policy ethnl_wol_set_policy[ETHTOOL_A_WOL_MAX + 1] = {
[ETHTOOL_A_WOL_UNSPEC] = { .type = NLA_REJECT },
[ETHTOOL_A_WOL_HEADER] = { .type = NLA_NESTED },
[ETHTOOL_A_WOL_MODES] = { .type = NLA_NESTED },
@@ -110,16 +109,12 @@ wol_set_policy[ETHTOOL_A_WOL_MAX + 1] = {
int ethnl_set_wol(struct sk_buff *skb, struct genl_info *info)
{
struct ethtool_wolinfo wol = { .cmd = ETHTOOL_GWOL };
- struct nlattr *tb[ETHTOOL_A_WOL_MAX + 1];
struct ethnl_req_info req_info = {};
+ struct nlattr **tb = info->attrs;
struct net_device *dev;
bool mod = false;
int ret;
- ret = nlmsg_parse(info->nlhdr, GENL_HDRLEN, tb, ETHTOOL_A_WOL_MAX,
- wol_set_policy, info->extack);
- if (ret < 0)
- return ret;
ret = ethnl_parse_header_dev_get(&req_info, tb[ETHTOOL_A_WOL_HEADER],
genl_info_net(info), info->extack,
true);