ethtool: provide WoL settings with WOL_GET request
Implement WOL_GET request to get wake-on-lan settings for a device, traditionally available via ETHTOOL_GWOL ioctl request. As part of the implementation, provide symbolic names for wake-on-line modes as ETH_SS_WOL_MODES string set. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0bda7af39d
commit
51ea22b04e
@@ -214,6 +214,7 @@ ethnl_default_requests[__ETHTOOL_MSG_USER_CNT] = {
|
||||
[ETHTOOL_MSG_LINKMODES_GET] = ðnl_linkmodes_request_ops,
|
||||
[ETHTOOL_MSG_LINKSTATE_GET] = ðnl_linkstate_request_ops,
|
||||
[ETHTOOL_MSG_DEBUG_GET] = ðnl_debug_request_ops,
|
||||
[ETHTOOL_MSG_WOL_GET] = ðnl_wol_request_ops,
|
||||
};
|
||||
|
||||
static struct ethnl_dump_ctx *ethnl_dump_context(struct netlink_callback *cb)
|
||||
@@ -679,6 +680,14 @@ static const struct genl_ops ethtool_genl_ops[] = {
|
||||
.flags = GENL_UNS_ADMIN_PERM,
|
||||
.doit = ethnl_set_debug,
|
||||
},
|
||||
{
|
||||
.cmd = ETHTOOL_MSG_WOL_GET,
|
||||
.flags = GENL_UNS_ADMIN_PERM,
|
||||
.doit = ethnl_default_doit,
|
||||
.start = ethnl_default_start,
|
||||
.dumpit = ethnl_default_dumpit,
|
||||
.done = ethnl_default_done,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct genl_multicast_group ethtool_nl_mcgrps[] = {
|
||||
|
Reference in New Issue
Block a user