can: dev: add hardware TX timestamp
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>
Wed, 27 Jul 2022 10:16:33 +0000 (19:16 +0900)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 28 Jul 2022 09:44:30 +0000 (11:44 +0200)
commit8bdd1112edcd3edce2843e03826204a84a61042d
tree8b45d63f15cb2def64a421c675d9d3f5f504b149
parent409c188c57cdb5cb1dfcac79e72b5169f0463fe4
can: dev: add hardware TX timestamp

Because of the loopback feature of socket CAN, hardware TX timestamps
are nothing else than the hardware RX timespamp of the corresponding
loopback packet. This patch simply reuses the hardware RX timestamp.

The rationale to clone this timestamp value is that existing tools
which rely of libpcap (such as tcpdump) expect support for both TX and
RX hardware timestamps in order to activate the feature (i.e. no
granular control to activate either of TX or RX hardware timestamps).

Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/all/20220727101641.198847-7-mailhol.vincent@wanadoo.fr
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev/skb.c