linux/drivers/net/can
Marc Kleine-Budde 06b23f7fbb can: pcan_usb: don't provide CAN FD bittimings by non-FD adapters
The CAN FD data bittiming constants are provided via netlink only when there
are valid CAN FD constants available in priv->data_bittiming_const.

Due to the indirection of pointer assignments in the peak_usb driver the
priv->data_bittiming_const never becomes NULL - not even for non-FD adapters.

The data_bittiming_const points to zero'ed data which leads to this result
when running 'ip -details link show can0':

35: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
    link/can  promiscuity 0
    can state STOPPED restart-ms 0
	  pcan_usb: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
	  : dtseg1 0..0 dtseg2 0..0 dsjw 1..0 dbrp 0..0 dbrp-inc 0  <== BROKEN!
	  clock 8000000

This patch changes the struct peak_usb_adapter::bittiming_const and struct
peak_usb_adapter::data_bittiming_const to pointers to fix the assignemnt
problems.

Cc: linux-stable <stable@vger.kernel.org> # >= 4.0
Reported-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-08-25 08:50:00 +02:00
..
c_can can: c_can: Fix default pinmux glitch at init 2015-07-12 20:57:42 +02:00
cc770 can: cc770: don't touch skb after netif_rx() 2015-07-15 09:04:27 +02:00
m_can can: m_cam: m_can_fifo_write(): remove return from void function 2015-03-22 23:50:11 +01:00
mscan can: constify of_device_id array 2015-03-17 15:00:23 -04:00
sja1000 can: sja1000: don't touch skb after netif_rx() 2015-07-15 09:04:28 +02:00
softing can: move can_stats.bus_off++ from can_bus_off into can_change_state 2015-01-20 13:56:53 +01:00
spi can: mcp251x: get regulators optionally 2015-07-16 09:04:22 +02:00
usb can: pcan_usb: don't provide CAN FD bittimings by non-FD adapters 2015-08-25 08:50:00 +02:00
at91_can.c can: at91_can: don't touch skb after netif_receive_skb()/netif_rx() 2015-07-15 09:04:26 +02:00
bfin_can.c can: bfin_can: don't touch skb after netif_rx() 2015-07-15 09:04:27 +02:00
dev.c can: replace timestamp as unique skb attribute 2015-07-12 21:13:22 +02:00
flexcan.c can: flexcan: don't touch skb after netif_receive_skb() 2015-07-15 09:04:27 +02:00
grcan.c can: grcan: don't touch skb after netif_rx() 2015-07-15 09:04:27 +02:00
janz-ican3.c can: janz-ican3: add support for CAL/CANopen firmware 2015-05-06 08:03:20 +02:00
Kconfig can: CAN_GRCAN should depend on HAS_DMA 2015-04-23 14:09:58 -04:00
led.c can: add combined rx/tx LED trigger support 2015-03-22 23:50:11 +01:00
Makefile can: Enable -D__CHECK_ENDIAN__ for sparse by default 2014-12-07 21:22:06 +01:00
pch_can.c can: move can_stats.bus_off++ from can_bus_off into can_change_state 2015-01-20 13:56:53 +01:00
rcar_can.c can: rcar_can: unify error messages 2015-07-12 20:57:41 +02:00
slcan.c can: slcan: don't touch skb after netif_rx_ni() 2015-07-15 09:04:27 +02:00
ti_hecc.c can: ti_heccn: don't touch skb after netif_rx() 2015-07-15 09:04:27 +02:00
vcan.c can: replace timestamp as unique skb attribute 2015-07-12 21:13:22 +02:00
xilinx_can.c net: can: xilinx_can: fix extended frame handling 2015-05-01 10:11:46 +02:00