linux/drivers/net/can
Stephane Grosjean de280f403f can: peak_usb: fix a potential out-of-sync while decoding packets
When decoding a buffer received from PCAN-USB, the first timestamp read in
a packet is a 16-bit coded time base, and the next ones are an 8-bit
offset to this base, regardless of the type of packet read.

This patch corrects a potential loss of synchronization by using a
timestamp index read from the buffer, rather than an index of received
data packets, to determine on the sizeof the timestamp to be read from the
packet being decoded.

Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Fixes: 46be265d33 ("can: usb: PEAK-System Technik PCAN-USB specific part")
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2019-11-04 21:47:20 +01:00
..
c_can treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cc770 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 495 2019-06-19 17:09:52 +02:00
ifi_canfd treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
m_can can: tcan4x5x: Remove checking the wake pin 2019-09-03 10:23:57 +02:00
mscan treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 344 2019-06-05 17:37:07 +02:00
peak_canfd can: mark expected switch fall-throughs 2019-07-25 20:09:42 -05:00
rcar can: rcar_can: Remove unused platform data support 2019-08-20 13:41:25 +02:00
sja1000 can: peak_pci: Make structure peak_pciec_i2c_bit_ops constant 2019-08-20 13:41:25 +02:00
softing net/can: using dev_get_drvdata directly 2019-07-05 15:24:41 -07:00
spi can: mcp251x: Call wrapper instead of regulator_disable() 2019-09-03 10:23:57 +02:00
usb can: peak_usb: fix a potential out-of-sync while decoding packets 2019-11-04 21:47:20 +01:00
at91_can.c can: mark expected switch fall-throughs 2019-07-25 20:09:42 -05:00
dev.c can: dev: add missing of_node_put() after calling of_get_child_by_name() 2019-11-04 21:47:20 +01:00
flexcan.c can: flexcan: disable completely the ECC mechanism 2019-11-04 21:47:20 +01:00
grcan.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
janz-ican3.c net: Remove dev_err() usage after platform_get_irq() 2019-07-30 14:37:35 -07:00
Kconfig can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices 2019-07-24 10:31:53 +02:00
kvaser_pciefd.c can: kvaser_pciefd: the PWM generator is running at the bus frequency of the system. 2019-09-03 10:23:57 +02:00
led.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Makefile can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices 2019-07-24 10:31:53 +02:00
pch_can.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 340 2019-06-05 17:37:07 +02:00
rx-offload.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 344 2019-06-05 17:37:07 +02:00
slcan.c can: make use of preallocated can_ml_priv for per device struct can_dev_rcv_lists 2019-09-04 13:29:15 +02:00
sun4i_can.c net: Remove dev_err() usage after platform_get_irq() 2019-07-30 14:37:35 -07:00
ti_hecc.c can: ti_hecc: ti_hecc_mailbox_read(): remove set but not used variable 'mbx_mask' 2019-08-13 16:40:29 +02:00
vcan.c can: make use of preallocated can_ml_priv for per device struct can_dev_rcv_lists 2019-09-04 13:29:15 +02:00
vxcan.c can: make use of preallocated can_ml_priv for per device struct can_dev_rcv_lists 2019-09-04 13:29:15 +02:00
xilinx_can.c can: xilinx_can: xcan_set_bittiming(): fix the data phase btr1 calculation 2019-08-13 17:32:19 +02:00