candump: use linux/net_tstamp.h instead of redefining values ourselves

The project contains a local copy of the timestamp header at
include/linux/net_tstamp.h. However, candump.c redefines the
net_tstamp.h values instead of relying on the header.

Replace these by a "include <linux/net_tstamp.h>".

Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/all/20221114163848.3398-7-mailhol.vincent@wanadoo.fr
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
pull/387/head
Vincent Mailhol 2022-11-15 01:38:48 +09:00 committed by Marc Kleine-Budde
parent 8e45fc5158
commit 4764212483
1 changed files with 1 additions and 4 deletions

View File

@ -63,6 +63,7 @@
#include <linux/can.h>
#include <linux/can/raw.h>
#include <linux/net_tstamp.h>
#include "terminal.h"
#include "lib.h"
@ -72,10 +73,6 @@
#define SO_TIMESTAMPING 37
#endif
/* from #include <linux/net_tstamp.h> - since Linux 2.6.30 */
#define SOF_TIMESTAMPING_SOFTWARE (1 << 4)
#define SOF_TIMESTAMPING_RX_SOFTWARE (1 << 3)
#define SOF_TIMESTAMPING_RAW_HARDWARE (1 << 6)
#define TIMESTAMPSZ 50 /* string 'absolute with date' requires max 49 bytes */
#define MAXSOCK 16 /* max. number of CAN interfaces given on the cmdline */