OpenCloudOS-Kernel/drivers/net/can/usb
Vincent Mailhol f68eafeb97 can: do not copy the payload of RTR frames
The actual payload length of the CAN Remote Transmission Request (RTR)
frames is always 0, i.e. no payload is transmitted on the wire.
However, those RTR frames still use the DLC to indicate the length of
the requested frame.

For this reason, it is incorrect to copy the payload of RTR frames
(the payload buffer would only contain garbage data). This patch
encapsulates the payload copy in a check toward the RTR flag.

Link: https://lore.kernel.org/all/20211207121531.42941-4-mailhol.vincent@wanadoo.fr
Cc: Yasushi SHOJI <yashi@spacecubics.com>
Tested-by: Yasushi SHOJI <yashi@spacecubics.com>
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-01-05 12:09:05 +01:00
..
etas_es58x can: do not increase rx statistics when generating a CAN rx error message frame 2022-01-05 12:09:05 +01:00
kvaser_usb can: kvaser_usb: do not increase tx statistics when sending error message frames 2022-01-05 12:09:05 +01:00
peak_usb can: do not increase rx statistics when generating a CAN rx error message frame 2022-01-05 12:09:05 +01:00
Kconfig can: kvaser_usb: Add new Kvaser hydra devices 2021-05-27 09:42:23 +02:00
Makefile can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces 2021-04-13 10:15:42 +02:00
ems_usb.c can: do not increase rx statistics when generating a CAN rx error message frame 2022-01-05 12:09:05 +01:00
esd_usb2.c can: do not increase rx statistics when generating a CAN rx error message frame 2022-01-05 12:09:05 +01:00
gs_usb.c can: gs_usb: use %u to print unsigned values 2021-10-24 16:26:05 +02:00
mcba_usb.c can: do not copy the payload of RTR frames 2022-01-05 12:09:05 +01:00
ucan.c can: do not increase rx statistics when generating a CAN rx error message frame 2022-01-05 12:09:05 +01:00
usb_8dev.c can: do not increase rx statistics when generating a CAN rx error message frame 2022-01-05 12:09:05 +01:00