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
@@ -190,6 +190,18 @@ const char netif_msg_class_names[][ETH_GSTRING_LEN] = {
|
||||
};
|
||||
static_assert(ARRAY_SIZE(netif_msg_class_names) == NETIF_MSG_CLASS_COUNT);
|
||||
|
||||
const char wol_mode_names[][ETH_GSTRING_LEN] = {
|
||||
[const_ilog2(WAKE_PHY)] = "phy",
|
||||
[const_ilog2(WAKE_UCAST)] = "ucast",
|
||||
[const_ilog2(WAKE_MCAST)] = "mcast",
|
||||
[const_ilog2(WAKE_BCAST)] = "bcast",
|
||||
[const_ilog2(WAKE_ARP)] = "arp",
|
||||
[const_ilog2(WAKE_MAGIC)] = "magic",
|
||||
[const_ilog2(WAKE_MAGICSECURE)] = "magicsecure",
|
||||
[const_ilog2(WAKE_FILTER)] = "filter",
|
||||
};
|
||||
static_assert(ARRAY_SIZE(wol_mode_names) == WOL_MODE_COUNT);
|
||||
|
||||
/* return false if legacy contained non-0 deprecated fields
|
||||
* maxtxpkt/maxrxpkt. rest of ksettings always updated
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user