net: ethtool: Add infrastructure for reporting cable test results
authorAndrew Lunn <andrew@lunn.ch>
Sun, 10 May 2020 19:12:36 +0000 (21:12 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sun, 10 May 2020 19:28:41 +0000 (12:28 -0700)
commit1dd3f212af30b42c90ba252c165f2f6d2ddf5230
treede9a4697a11d2968403b1de30b5f00a8974941d8
parent0df960f14e17e55e68dfd1342f063d17dbcc6107
net: ethtool: Add infrastructure for reporting cable test results

Provide infrastructure for PHY drivers to report the cable test
results.  A netlink skb is associated to the phydev. Helpers will be
added which can add results to this skb. Once the test has finished
the results are sent to user space.

When netlink ethtool is not part of the kernel configuration stubs are
provided. It is also impossible to trigger a cable test, so the error
code returned by the alloc function is of no consequence.

v2:
Include the status complete in the netlink notification message

v4:
Replace -EINVAL with -EMSGSIZE

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phy.c
include/linux/ethtool_netlink.h
include/linux/phy.h
net/ethtool/cabletest.c