net: lan743x: implement ndo_hwtstamp_get()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 14 May 2025 15:19:30 +0000 (18:19 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 16 May 2025 00:56:38 +0000 (17:56 -0700)
commitabb258eb78a9dd9c76a298f4a73c74ffeef06597
treeb1a1b421a767ca62cedc252d9fa586fa1da4c418
parent958a857a626cd9144889a66115eb4230d922a2f5
net: lan743x: implement ndo_hwtstamp_get()

Permit programs such as "hwtstamp_ctl -i eth0" to retrieve the current
timestamping configuration of the NIC, rather than returning "Device
driver does not have support for non-destructive SIOCGHWTSTAMP."

The driver configures all channels with the same timestamping settings.
On TX, retrieve the settings of the first channel, those should be
representative for the entire NIC. On RX, save the filter settings in a
new adapter field.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Gerhard Engleder <gerhard@engleder-embedded.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20250514151931.1988047-2-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/lan743x_main.c
drivers/net/ethernet/microchip/lan743x_main.h
drivers/net/ethernet/microchip/lan743x_ptp.c
drivers/net/ethernet/microchip/lan743x_ptp.h