net: ethtool: Allow PHY cable test TDR data to configured
authorAndrew Lunn <andrew@lunn.ch>
Tue, 26 May 2020 22:21:41 +0000 (00:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2020 06:22:21 +0000 (23:22 -0700)
commitf2bc8ad31a7f814237bc6301d59296d76505a688
tree738fb4f9aa7157772793f5c7c5febbedb6d828f4
parent0c9bcc1d2394acef2c6e89e652d984cc845c7bea
net: ethtool: Allow PHY cable test TDR data to configured

Allow the user to configure where on the cable the TDR data should be
retrieved, in terms of first and last sample, and the step between
samples. Also add the ability to ask for TDR data for just one pair.

If this configuration is not provided, it defaults to 1-150m at 1m
intervals for all pairs.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
v3:
Move the TDR configuration into a structure
Add a range check on step
Use NL_SET_ERR_MSG_ATTR() when appropriate
Move TDR configuration into a nest
Document attributes in the request

Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/ethtool-netlink.rst
drivers/net/phy/marvell.c
drivers/net/phy/phy.c
include/linux/phy.h
include/uapi/linux/ethtool_netlink.h
net/ethtool/cabletest.c