diff options
| author | Stefan Mätje <Stefan.Maetje@esd.eu> | 2017-10-18 13:25:17 +0200 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-11-06 15:34:45 +0100 |
| commit | 746e0a5db7422198563e092819f851eaa60d1178 (patch) | |
| tree | bba70da33803279cb53d12edd649e607f092c9fb /drivers/net | |
| parent | b2c557103979f984b9ac1faa4e22b14c69dd8204 (diff) | |
| download | android_kernel_m2note-746e0a5db7422198563e092819f851eaa60d1178.tar.gz | |
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>
Diffstat (limited to 'drivers/net')
| -rw-r--r-- | drivers/net/can/usb/esd_usb2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c index d5455c760..503f37850 100644 --- a/drivers/net/can/usb/esd_usb2.c +++ b/drivers/net/can/usb/esd_usb2.c @@ -335,7 +335,7 @@ static void esd_usb2_rx_can_msg(struct esd_usb2_net_priv *priv, } cf->can_id = id & ESD_IDMASK; - cf->can_dlc = get_can_dlc(msg->msg.rx.dlc); + cf->can_dlc = get_can_dlc(msg->msg.rx.dlc & ~ESD_RTR); if (id & ESD_EXTID) cf->can_id |= CAN_EFF_FLAG; |
