summaryrefslogtreecommitdiff
path: root/net/ethtool/netlink.c
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2020-03-28 00:01:43 +0100
committerDavid S. Miller <davem@davemloft.net>2020-03-29 22:32:36 -0700
commitfd77be7bd43c578614165b1ae5fdb91b8f2f1689 (patch)
treeff5e458ea9d78e7a6cb1b0f03dbe8de923aea724 /net/ethtool/netlink.c
parentb7eeefe72eb09a5dd9b259ab970d77d3e0fccdbd (diff)
ethtool: set EEE settings with EEE_SET request
Implement EEE_SET netlink request to set EEE settings of a network device. These are traditionally set with ETHTOOL_SEEE ioctl request. The netlink interface allows setting the EEE status for all link modes supported by kernel but only first 32 link modes can be set at the moment as only those are supported by the ethtool_ops callback. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool/netlink.c')
-rw-r--r--net/ethtool/netlink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c
index f9396d2a96f6..4630206837e0 100644
--- a/net/ethtool/netlink.c
+++ b/net/ethtool/netlink.c
@@ -824,6 +824,11 @@ static const struct genl_ops ethtool_genl_ops[] = {
.dumpit = ethnl_default_dumpit,
.done = ethnl_default_done,
},
+ {
+ .cmd = ETHTOOL_MSG_EEE_SET,
+ .flags = GENL_UNS_ADMIN_PERM,
+ .doit = ethnl_set_eee,
+ },
};
static const struct genl_multicast_group ethtool_nl_mcgrps[] = {