diff options
| author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2025-05-14 18:19:30 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-05-15 17:56:38 -0700 |
| commit | abb258eb78a9dd9c76a298f4a73c74ffeef06597 (patch) | |
| tree | b1a1b421a767ca62cedc252d9fa586fa1da4c418 /drivers/net/ethernet/microchip/lan743x_ptp.h | |
| parent | net: lan743x: convert to ndo_hwtstamp_set() (diff) | |
| download | linux-abb258eb78a9dd9c76a298f4a73c74ffeef06597.tar.gz linux-abb258eb78a9dd9c76a298f4a73c74ffeef06597.zip | |
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>
Diffstat (limited to 'drivers/net/ethernet/microchip/lan743x_ptp.h')
| -rw-r--r-- | drivers/net/ethernet/microchip/lan743x_ptp.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/microchip/lan743x_ptp.h b/drivers/net/ethernet/microchip/lan743x_ptp.h index 9581a7992ff6..e8d073bfa2ca 100644 --- a/drivers/net/ethernet/microchip/lan743x_ptp.h +++ b/drivers/net/ethernet/microchip/lan743x_ptp.h @@ -51,7 +51,8 @@ int lan743x_ptp_open(struct lan743x_adapter *adapter); void lan743x_ptp_close(struct lan743x_adapter *adapter); void lan743x_ptp_update_latency(struct lan743x_adapter *adapter, u32 link_speed); - +int lan743x_ptp_hwtstamp_get(struct net_device *netdev, + struct kernel_hwtstamp_config *config); int lan743x_ptp_hwtstamp_set(struct net_device *netdev, struct kernel_hwtstamp_config *config, struct netlink_ext_ack *extack); |
