From fd77be7bd43c578614165b1ae5fdb91b8f2f1689 Mon Sep 17 00:00:00 2001 From: Michal Kubecek Date: Sat, 28 Mar 2020 00:01:43 +0100 Subject: 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 Signed-off-by: David S. Miller --- net/ethtool/netlink.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'net/ethtool/netlink.c') 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[] = { -- cgit v1.2.3