aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/ethtool_netlink.h
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2019-12-27 15:56:08 +0100
committerDavid S. Miller <davem@davemloft.net>2019-12-27 16:40:02 -0800
commitf625aa9be8c10f2e4dc677837e240730a25feda7 (patch)
tree0d6ee55c38a6a26d3101c74ac594c0641e016436 /include/linux/ethtool_netlink.h
parentethtool: add LINKINFO_NTF notification (diff)
downloadwireguard-linux-f625aa9be8c10f2e4dc677837e240730a25feda7.tar.xz
wireguard-linux-f625aa9be8c10f2e4dc677837e240730a25feda7.zip
ethtool: provide link mode information with LINKMODES_GET request
Implement LINKMODES_GET netlink request to get link modes related information provided by ETHTOOL_GLINKSETTINGS and ETHTOOL_GSET ioctl commands. This request provides supported, advertised and peer advertised link modes, autonegotiation flag, speed and duplex. LINKMODES_GET request can be used with NLM_F_DUMP (without device identification) to request the information for all devices in current network namespace providing the data. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ethtool_netlink.h')
-rw-r--r--include/linux/ethtool_netlink.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/ethtool_netlink.h b/include/linux/ethtool_netlink.h
index c98f6852c8eb..d01b77887f82 100644
--- a/include/linux/ethtool_netlink.h
+++ b/include/linux/ethtool_netlink.h
@@ -7,6 +7,9 @@
#include <linux/ethtool.h>
#include <linux/netdevice.h>
+#define __ETHTOOL_LINK_MODE_MASK_NWORDS \
+ DIV_ROUND_UP(__ETHTOOL_LINK_MODE_MASK_NBITS, 32)
+
enum ethtool_multicast_groups {
ETHNL_MCGRP_MONITOR,
};