diff options
author | Andrew Lunn <andrew@lunn.ch> | 2020-05-10 21:12:36 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-05-10 12:28:41 -0700 |
commit | 1dd3f212af30b42c90ba252c165f2f6d2ddf5230 (patch) | |
tree | de9a4697a11d2968403b1de30b5f00a8974941d8 /include/linux/phy.h | |
parent | 0df960f14e17e55e68dfd1342f063d17dbcc6107 (diff) | |
download | lwn-1dd3f212af30b42c90ba252c165f2f6d2ddf5230.tar.gz lwn-1dd3f212af30b42c90ba252c165f2f6d2ddf5230.zip |
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>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r-- | include/linux/phy.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index f58eee735a45..169fae4249a9 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -523,6 +523,11 @@ struct phy_device { /* For use by PHYs inside the same package that need a shared state. */ struct phy_package_shared *shared; + /* Reporting cable test results */ + struct sk_buff *skb; + void *ehdr; + struct nlattr *nest; + /* Interrupt and Polling infrastructure */ struct delayed_work state_queue; |