alistair23-linux/net/can
Oliver Hartkopp 94c23097f9 can: gw: support modification of Classical CAN DLCs
Add support for data length code modifications for Classical CAN.

The netlink configuration interface always allowed to pass any value
that fits into a byte, therefore only the modification process had to be
extended to handle the raw DLC represenation of Classical CAN frames.

When a DLC value from 0 .. F is provided for Classical CAN frame
modifications the 'len' value is modified as-is with the exception that
potentially existing 9 .. F DLC values in the len8_dlc element are moved
to the 'len' element for the modification operation by mod_retrieve_ccdlc().

After the modification the Classical CAN frame DLC information is brought
back into the correct format by mod_store_ccdlc() which is filling 'len'
and 'len8_dlc' accordingly.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/r/20201119084921.2621-1-socketcan@hartkopp.net
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-11-20 12:05:14 +01:00
..
j1939 can: replace can_dlc as variable/element for payload length 2020-11-20 12:04:12 +01:00
af_can.c can: replace can_dlc as variable/element for payload length 2020-11-20 12:04:12 +01:00
af_can.h can: introduce CAN midlayer private and allocate it automatically 2019-09-04 13:29:14 +02:00
bcm.c can: remove obsolete version strings 2020-10-12 10:06:39 +02:00
gw.c can: gw: support modification of Classical CAN DLCs 2020-11-20 12:05:14 +01:00
isotp.c can: isotp: padlen(): make const array static, makes object smaller 2020-11-03 22:30:32 +01:00
Kconfig can: isotp: Explain PDU in CAN_ISOTP help text 2020-11-03 22:30:31 +01:00
Makefile can: add ISO 15765-2:2016 transport protocol 2020-10-07 23:18:33 +02:00
proc.c can: proc: can_remove_proc(): silence remove_proc_entry warning 2020-11-03 22:24:19 +01:00
raw.c can: remove obsolete version strings 2020-10-12 10:06:39 +02:00