]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite09fe0938e1c4bc1a3736a0f83814ce733c88ed9
tree4af45d1dc678b1479a13915bfc9c306961b0d9e9
parent3fe3725f17f8a6a54be7f7ba14b7541263e9063c
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