Re: [PATCH net-next] net: enetc: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set()

From: Vadim Fedorenko
Date: Thu May 08 2025 - 16:31:25 EST


On 08/05/2025 12:43, Vladimir Oltean wrote:
New timestamping API was introduced in commit 66f7223039c0 ("net: add
NDOs for configuring hardware timestamping") from kernel v6.6. It is
time to convert the ENETC driver to the new API, so that the
ndo_eth_ioctl() path can be removed completely.

Move the enetc_hwtstamp_get() and enetc_hwtstamp_set() calls away from
enetc_ioctl() to dedicated net_device_ops for the LS1028A PF and VF
(NETC v4 does not yet implement enetc_ioctl()), adapt the prototypes and
export these symbols (enetc_ioctl() is also exported).

Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>

Again, extack can be potentially used to provide some info in case of
enetc_hwtstamp_set() fail, but in this case it's more obvious.

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@xxxxxxxxx>