/* content of u32 gwjob.flags */
#define CAN_TX_LOOPBACK 0x00000001
+#define CAN_TX_SRC_TSTAMP 0x00000002
/* modification functions that are invoked in the hot path in gw_rcv */
void mod_and_id (struct can_frame *cf, struct can_can_gw *mod) {
while (modidx < MAX_MODFUNCTIONS && gwj->ccgw.modfunc[modidx])
(*gwj->ccgw.modfunc[modidx++])(cf, &gwj->ccgw);
+ /* clear the skb timestamp if not configured the other way */
+ if (!(gwj->flags & CAN_TX_SRC_TSTAMP))
+ skb->tstamp.tv64 = 0;
+
/* send to netdevice */
if (can_send(nskb, gwj->flags & CAN_TX_LOOPBACK))
gwj->dropped_frames++;
if (r->can_txflags & CAN_GW_TXFLAGS_LOOPBACK)
gwj->flags |= CAN_TX_LOOPBACK;
+ if (r->can_txflags & CAN_GW_TXFLAGS_SRC_TSTAMP)
+ gwj->flags |= CAN_TX_SRC_TSTAMP;
+
memset(&gwj->ccgw, 0, sizeof(gwj->ccgw));
/* check for additional attributes / filters here */