diff options
| author | Vladimir Oltean <[email protected]> | 2025-05-13 10:11:28 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2025-07-03 16:37:49 +0000 |
| commit | 23ddacab4e81d9949eac818be2983ccdb6a25eee (patch) | |
| tree | bdc3f412af96bcaf98a05309765cfccf40ea81b6 /drivers/net/ethernet/intel/ice/ice_main.c | |
| parent | ipv6: Cleanup fib6_drop_pcpu_from() (diff) | |
| download | kernel-23ddacab4e81d9949eac818be2983ccdb6a25eee.tar.gz kernel-23ddacab4e81d9949eac818be2983ccdb6a25eee.zip | |
ice: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set()
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 Intel ice driver to the new API, so that
timestamping configuration can be removed from the ndo_eth_ioctl() path
completely.
Signed-off-by: Vladimir Oltean <[email protected]>
Acked-by: Jacob Keller <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Vadim Fedorenko <[email protected]>
Reviewed-by: Milena Olech <[email protected]>
Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_main.c')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_main.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index f8ef80069e3d..af68869693ed 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -7902,27 +7902,6 @@ int ice_change_mtu(struct net_device *netdev, int new_mtu) } /** - * ice_eth_ioctl - Access the hwtstamp interface - * @netdev: network interface device structure - * @ifr: interface request data - * @cmd: ioctl command - */ -static int ice_eth_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) -{ - struct ice_netdev_priv *np = netdev_priv(netdev); - struct ice_pf *pf = np->vsi->back; - - switch (cmd) { - case SIOCGHWTSTAMP: - return ice_ptp_get_ts_config(pf, ifr); - case SIOCSHWTSTAMP: - return ice_ptp_set_ts_config(pf, ifr); - default: - return -EOPNOTSUPP; - } -} - -/** * ice_aq_str - convert AQ err code to a string * @aq_err: the AQ error code to convert */ @@ -9761,7 +9740,6 @@ static const struct net_device_ops ice_netdev_ops = { .ndo_change_mtu = ice_change_mtu, .ndo_get_stats64 = ice_get_stats64, .ndo_set_tx_maxrate = ice_set_tx_maxrate, - .ndo_eth_ioctl = ice_eth_ioctl, .ndo_set_vf_spoofchk = ice_set_vf_spoofchk, .ndo_set_vf_mac = ice_set_vf_mac, .ndo_get_vf_config = ice_get_vf_cfg, @@ -9785,4 +9763,6 @@ static const struct net_device_ops ice_netdev_ops = { .ndo_bpf = ice_xdp, .ndo_xdp_xmit = ice_xdp_xmit, .ndo_xsk_wakeup = ice_xsk_wakeup, + .ndo_hwtstamp_get = ice_ptp_hwtstamp_get, + .ndo_hwtstamp_set = ice_ptp_hwtstamp_set, }; |
