]> git.baikalelectronics.ru Git - kernel.git/commit
can: bcm: add support for CAN FD frames
authorOliver Hartkopp <socketcan@hartkopp.net>
Fri, 17 Jun 2016 13:35:27 +0000 (15:35 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 17 Jun 2016 13:39:46 +0000 (15:39 +0200)
commit53c6ef2598b73c6f836d25180fbe1a024b376ed4
tree385a3c2b38bbee79bbec91ed6d5969eb49021820
parent48442cf1e6c07df565e159fdacc48d20b2aae76e
can: bcm: add support for CAN FD frames

The programming API of the CAN_BCM depends on struct can_frame which is
given as array directly behind the bcm_msg_head structure. To follow this
schema for the CAN FD frames a new flag 'CAN_FD_FRAME' in the bcm_msg_head
flags indicates that the concatenated CAN frame structures behind the
bcm_msg_head are defined as struct canfd_frame.

This patch adds the support to handle CAN and CAN FD frames on a per BCM-op
base. Main changes:

- generally use struct canfd_frames instead if struct can_frames
- use canfd_frame.flags instead of can_frame.can_dlc for private BCM flags
- make all CAN frame sizes depending on the new CAN_FD_FRAME flags
- separate between CAN and CAN FD when sending/receiving frames

Due to the dependence of the CAN_FD_FRAME flag the former binary interface
for classic CAN frames remains stable.

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