can: esd_usb2: Fix can_dlc value for received RTR, frames
authorStefan Mätje <Stefan.Maetje@esd.eu>
Wed, 18 Oct 2017 11:25:17 +0000 (13:25 +0200)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:18:39 +0000 (13:18 +0000)
commita90748a85e51129ceb41a34504d06794f287fdf0
treeabb40ab3ac832a826329813bb9754567c9e0cc90
parentc6c252dbbb1d38f8e1db9d250154b51e02e95d1b
can: esd_usb2: Fix can_dlc value for received RTR, frames

commit 72d92e865d1560723e1957ee3f393688c49ca5bf upstream.

The dlc member of the struct rx_msg contains also the ESD_RTR flag to
mark received RTR frames. Without the fix the can_dlc value for received
RTR frames would always be set to 8 by get_can_dlc() instead of the
received value.

Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device")
Signed-off-by: Stefan Mätje <stefan.maetje@esd.eu>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/net/can/usb/esd_usb2.c