OSDN Git Service

can: gw: add support for CAN FD frames
authorOliver Hartkopp <socketcan@hartkopp.net>
Sat, 10 Aug 2019 19:18:10 +0000 (21:18 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 13 Aug 2019 15:32:21 +0000 (17:32 +0200)
commit456a8a646b2563438c16a9b27decf9aa717f1ebb
tree4af45d1dc678b1479a13915bfc9c306961b0d9e9
parente9dc7c60507c822992e793bd3845f0556ae0ff98
can: gw: add support for CAN FD frames

Introduce CAN FD support which needs an extension of the netlink API to
pass CAN FD type content to the kernel which has a different size to
Classic CAN. Additionally the struct canfd_frame has a new 'flags' element
that can now be modified with can-gw.

The new CGW_FLAGS_CAN_FD option flag defines whether the routing job
handles Classic CAN or CAN FD frames. This setting is very strict at
reception time and enables the new possibilities, e.g. CGW_FDMOD_* and
modifying the flags element of struct canfd_frame, only when
CGW_FLAGS_CAN_FD is set.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
include/uapi/linux/can/gw.h
net/can/gw.c