• Vincent Mailhol's avatar
    can: dev: add generic function can_ethtool_op_get_ts_info_hwts() · 7fb48d25
    Vincent Mailhol authored
    Add function can_ethtool_op_get_ts_info_hwts(). This function will be
    used by CAN devices with hardware TX/RX timestamping support to
    implement ethtool_ops::get_ts_info. This function does not offer
    support to activate/deactivate hardware timestamps at device level nor
    support the filter options (which is currently the case for all CAN
    devices with hardware timestamping support).
    
    The fact that hardware timestamp can not be deactivated at hardware
    level does not impact the userland. As long as the user do not set
    SO_TIMESTAMPING using a setsockopt() or ioctl(), the kernel will not
    emit TX timestamps (RX timestamps will still be reproted as it is the
    case currently).
    
    Drivers which need more fine grained control remains free to implement
    their own function, but we foresee that the generic function
    introduced here will be sufficient for the majority.
    Signed-off-by: default avatarVincent Mailhol <mailhol.vincent@wanadoo.fr>
    Link: https://lore.kernel.org/all/20220727101641.198847-8-mailhol.vincent@wanadoo.frSigned-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
    7fb48d25
dev.c 13 KB