ethtool: Add support for specifying information source in cable test results
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 22 Aug 2024 12:07:02 +0000 (14:07 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 26 Aug 2024 16:33:58 +0000 (09:33 -0700)
commit4715d87e11ac805ab95a75adfbf93d67dfbdbe81
tree62d0e4abf6c8d22ab454ced0636cacc95beab412
parentabcd3026dd63417692a5e80aff70e7cd9b5c14ea
ethtool: Add support for specifying information source in cable test results

Enhance the ethtool cable test interface by introducing the ability to
specify the source of the diagnostic information for cable test results.
This is particularly useful for PHYs that offer multiple diagnostic
methods, such as Time Domain Reflectometry (TDR) and Active Link Cable
Diagnostic (ALCD).

Key changes:
- Added `ethnl_cable_test_result_with_src` and
  `ethnl_cable_test_fault_length_with_src` functions to allow specifying
  the information source when reporting cable test results.
- Updated existing `ethnl_cable_test_result` and
  `ethnl_cable_test_fault_length` functions to use TDR as the default
  source, ensuring backward compatibility.
- Modified the UAPI to support these new attributes, enabling drivers to
  provide more detailed diagnostic information.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240822120703.1393130-3-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/ethtool_netlink.h
net/ethtool/cabletest.c