summaryrefslogtreecommitdiff
path: root/net/ethtool/ts.h
AgeCommit message (Collapse)Author
2026-09-28net: ethtool: reject an out of range hwtstamp provider indexNicolai Buchwitz
A provider index of 0xFFFFFFFF picks a provider on hardware that has none. phc_index is an int where -1 means no PHC, and the u32 from user space ends up as -1, so the two match. TSINFO_GET uses -1 for "no provider requested" and answers with the default provider instead of an error. Reject the value in the netlink policy, which covers every comparison site. Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de> Reviewed-by: Kory Maincent <kory.maincent@bootlin.com> Link: https://patch.msgid.link/20260925135237.3432266-2-nb@tipi-net.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-12-16net: ethtool: tsinfo: Enhance tsinfo to support several hwtstamp by net topologyKory Maincent
Either the MAC or the PHY can provide hwtstamp, so we should be able to read the tsinfo for any hwtstamp provider. Enhance 'get' command to retrieve tsinfo of hwtstamp providers within a network topology. Add support for a specific dump command to retrieve all hwtstamp providers within the network topology, with added functionality for filtered dump to target a single interface. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>