summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2015-08-06 09:48:34 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-08-25 08:50:00 +0200
commit06b23f7fbbf26a025fd68395c7586949db586b47 (patch)
tree48dc69afa78fab7b70010e5ddbe13ab9fb10234d /crypto
parentb6df7d61c8776a882dd47ba4714d1445dd7ef2d9 (diff)
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>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions