ethtool: provide link settings with LINKINFO_GET request
authorMichal Kubecek <mkubecek@suse.cz>
Fri, 27 Dec 2019 14:55:48 +0000 (15:55 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Dec 2019 00:40:02 +0000 (16:40 -0800)
commit459e0b81b37043545d90629fdfb243444151e77d
tree39110fc4e4d43831dd54ee766731bd5d54827cd5
parent71921690f9745fef60a2bad425f30adf8cdc9da0
ethtool: provide link settings with LINKINFO_GET request

Implement LINKINFO_GET netlink request to get basic link settings provided
by ETHTOOL_GLINKSETTINGS and ETHTOOL_GSET ioctl commands.

This request provides settings not directly related to autonegotiation and
link mode selection: physical port, phy MDIO address, MDI(-X) status,
MDI(-X) control and transceiver.

LINKINFO_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>
Documentation/networking/ethtool-netlink.rst
include/uapi/linux/ethtool_netlink.h
net/ethtool/Makefile
net/ethtool/common.c
net/ethtool/common.h
net/ethtool/ioctl.c
net/ethtool/linkinfo.c [new file with mode: 0644]
net/ethtool/netlink.c
net/ethtool/netlink.h