[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce5f90f8-4471-43c7-b580-0fa42343d448@linux.dev>
Date: Thu, 2 Jan 2025 17:33:58 +0000
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Jiawen Wu <jiawenwu@...stnetic.com>, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, richardcochran@...il.com, linux@...linux.org.uk,
horms@...nel.org, jacob.e.keller@...el.com, netdev@...r.kernel.org
Cc: mengyuanlou@...-swift.com
Subject: Re: [PATCH net-next 1/4] net: wangxun: Add support for PTP clock
On 02/01/2025 10:30, Jiawen Wu wrote:
> Implement support for PTP clock on Wangxun NICs.
>
> Signed-off-by: Jiawen Wu <jiawenwu@...stnetic.com>
[...]
>
> +int wx_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
> +{
> + struct wx *wx = netdev_priv(netdev);
> +
> + switch (cmd) {
> + case SIOCGHWTSTAMP:
> + return wx_ptp_get_ts_config(wx, ifr);
> + case SIOCSHWTSTAMP:
> + return wx_ptp_set_ts_config(wx, ifr);
> + default:
> + return -EOPNOTSUPP;
> + }
> +}
> +EXPORT_SYMBOL(wx_ioctl);
> +
> MODULE_DESCRIPTION("Common library for Wangxun(R) Ethernet drivers.");
> MODULE_LICENSE("GPL");
[...]
> @@ -507,6 +513,7 @@ static const struct net_device_ops ngbe_netdev_ops = {
> .ndo_get_stats64 = wx_get_stats64,
> .ndo_vlan_rx_add_vid = wx_vlan_rx_add_vid,
> .ndo_vlan_rx_kill_vid = wx_vlan_rx_kill_vid,
> + .ndo_eth_ioctl = wx_ioctl,
> };
>
> /**
[...]
> @@ -479,6 +488,7 @@ static const struct net_device_ops txgbe_netdev_ops = {
> .ndo_get_stats64 = wx_get_stats64,
> .ndo_vlan_rx_add_vid = wx_vlan_rx_add_vid,
> .ndo_vlan_rx_kill_vid = wx_vlan_rx_kill_vid,
> + .ndo_eth_ioctl = wx_ioctl,
> };
>
ioctl interface is deprecated for this case. Could you please use
.ndo_hwtstamp_get and .ndo_hwtstamp_set for the new code?
Powered by blists - more mailing lists