can: drivers: introduce helpers to access Classical CAN DLC values
authorOliver Hartkopp <socketcan@hartkopp.net>
Tue, 10 Nov 2020 15:49:12 +0000 (16:49 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 20 Nov 2020 11:05:14 +0000 (12:05 +0100)
commite8e73562ce0b24d691ad35df3de34b324248458f
treef9f15ecc59d9d8dc1348bc2e984059806aecea52
parent75191707c7f5299764f00c8d2e9996af662ac2dd
can: drivers: introduce helpers to access Classical CAN DLC values

This patch adds the following helper to functions to access Classical CAN DLC
values.

can_get_cc_dlc(): get the data length code for Classical CAN raw DLC access
can_frame_set_cc_len(): set len and len8_dlc value for Classical CAN raw DLC access

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/r/20201110154913.1404582-2-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
include/linux/can/dev.h