aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
diff options
context:
space:
mode:
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>2022-07-27 19:16:39 +0900
committerMarc Kleine-Budde <mkl@pengutronix.de>2022-07-28 11:44:31 +0200
commit1d5eeda23f361827ef6fe459732f0573dce22670 (patch)
treebae53f9c676b7d9acc714fa8f5a61ec25111dc0a /drivers/net/can/usb/peak_usb/pcan_usb_pro.c
parentcan: kvaser_pciefd: advertise timestamping capabilities and add ioctl support (diff)
downloadlinux-dev-1d5eeda23f361827ef6fe459732f0573dce22670.tar.xz
linux-dev-1d5eeda23f361827ef6fe459732f0573dce22670.zip
can: kvaser_usb: advertise timestamping capabilities and add ioctl support
Currently, userland has no method to query which timestamping features are supported by the kvaser_usb driver (aside maybe of getting RX messages and observe whether or not hardware timestamps stay at zero). The canonical way for a network driver to advertise what kind of timestamping it supports is to implement ethtool_ops::get_ts_info(). Here, we use the CAN specific can_ethtool_op_get_ts_info_hwts() function to achieve this. In addition, the driver currently does not support the hardware timestamps ioctls. According to [1], SIOCSHWTSTAMP is "must" and SIOCGHWTSTAMP is "should". This patch fills up that gap by implementing net_device_ops::ndo_eth_ioctl() using the CAN specific function can_eth_ioctl_hwts(). [1] kernel doc Timestamping, section 3.1: "Hardware Timestamping Implementation: Device Drivers" Link: https://docs.kernel.org/networking/timestamping.html#hardware-timestamping-implementation-device-drivers CC: Jimmy Assarsson <extja@kvaser.com> Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20220727101641.198847-13-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions