]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethtool: Add helpers for reporting test results
authorAndrew Lunn <andrew@lunn.ch>
Sun, 10 May 2020 19:12:37 +0000 (21:12 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sun, 10 May 2020 19:28:41 +0000 (12:28 -0700)
commit40b2b5956a7ab1ac680f2d9b2b1d8e67a19a2505
tree47601606f65e997a2e21d35df85908673c3cfff5
parent5d5194a30e522a02adb290bbdb5036c467cc33ab
net: ethtool: Add helpers for reporting test results

The PHY drivers can use these helpers for reporting the results. The
results get translated into netlink attributes which are added to the
pre-allocated skbuf.

v3:
Poison phydev->skb
Return -EMSGSIZE when ethnl_bcastmsg_put() fails
Return valid error code when nla_nest_start() fails
Use u8 for results
Actually put u32 length into message

v4:
s/ENOTSUPP/EOPNOTSUPP/g

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