ethtool: provide EEE settings with EEE_GET request
Implement EEE_GET request to get EEE settings of a network device. These are traditionally available via ETHTOOL_GEEE ioctl request. The netlink interface allows reporting EEE status for all link modes supported by kernel but only first 32 link modes are provided at the moment as only those are reported by the ethtool_ops callback and drivers. v2: fix alignment (whitespace only) Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
bf37faa386
commit
b7eeefe72e
@@ -36,6 +36,7 @@ enum {
|
||||
ETHTOOL_MSG_COALESCE_SET,
|
||||
ETHTOOL_MSG_PAUSE_GET,
|
||||
ETHTOOL_MSG_PAUSE_SET,
|
||||
ETHTOOL_MSG_EEE_GET,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_MSG_USER_CNT,
|
||||
@@ -68,6 +69,7 @@ enum {
|
||||
ETHTOOL_MSG_COALESCE_NTF,
|
||||
ETHTOOL_MSG_PAUSE_GET_REPLY,
|
||||
ETHTOOL_MSG_PAUSE_NTF,
|
||||
ETHTOOL_MSG_EEE_GET_REPLY,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_MSG_KERNEL_CNT,
|
||||
@@ -365,6 +367,23 @@ enum {
|
||||
ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1)
|
||||
};
|
||||
|
||||
/* EEE */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_EEE_UNSPEC,
|
||||
ETHTOOL_A_EEE_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_EEE_MODES_OURS, /* bitset */
|
||||
ETHTOOL_A_EEE_MODES_PEER, /* bitset */
|
||||
ETHTOOL_A_EEE_ACTIVE, /* u8 */
|
||||
ETHTOOL_A_EEE_ENABLED, /* u8 */
|
||||
ETHTOOL_A_EEE_TX_LPI_ENABLED, /* u8 */
|
||||
ETHTOOL_A_EEE_TX_LPI_TIMER, /* u32 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_EEE_CNT,
|
||||
ETHTOOL_A_EEE_MAX = (__ETHTOOL_A_EEE_CNT - 1)
|
||||
};
|
||||
|
||||
/* generic netlink info */
|
||||
#define ETHTOOL_GENL_NAME "ethtool"
|
||||
#define ETHTOOL_GENL_VERSION 1
|
||||
|
Reference in New Issue
Block a user