linux/drivers/net
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
..
appletalk
arcnet drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
bonding bonding: Gratuitous ARP gets dropped when first slave added 2015-08-12 14:37:33 -07:00
caif
can can: pcan_usb: don't provide CAN FD bittimings by non-FD adapters 2015-08-25 08:50:00 +02:00
cris
dsa net: dsa: bcm_sf2: do not use indirect reads and writes for 7445E0 2015-07-20 16:47:30 -07:00
ethernet net: bcmgenet: fix uncleaned dma flags 2015-08-23 23:00:41 -07:00
fddi fddi: print an address with %p format specifier rather than %x 2015-06-07 00:31:22 -07:00
hamradio mkiss: Fix error handling in mkiss_open() 2015-08-10 21:10:31 -07:00
hippi
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-06-24 16:49:49 -07:00
ieee802154 at86rf230: cleanup start and stop callbacks 2015-06-16 18:55:11 +02:00
ipvlan ipvlan: ignore addresses from ipv6 autoconfiguration 2015-07-15 21:33:40 -07:00
irda irda: irda-usb: use msecs_to_jiffies for conversions 2015-05-25 17:39:21 -04:00
phy net: phy: fix semicolon.cocci warnings 2015-08-17 15:53:06 -07:00
plip
ppp ppp: fix device unregistration upon netns deletion 2015-08-17 12:22:20 -07:00
slip
team switchdev: add support for fdb add/del/dump via switchdev_port_obj ops. 2015-05-17 22:49:09 -04:00
usb net: qmi_wwan: add HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module 2015-08-17 15:39:58 -07:00
vmxnet3 vmxnet3: prevent receive getting out of sequence on napi poll 2015-07-08 23:36:11 -07:00
wan cosa: missing error code on failure in probe() 2015-08-12 16:53:11 -07:00
wimax
wireless rtlwifi: rtl8723be: Add module parameter for MSI interrupts 2015-08-03 11:26:24 +03:00
xen-netback xen/netback: Wake dealloc thread after completing zerocopy work 2015-08-06 23:42:48 -07:00
dummy.c
eql.c
geneve.c geneve: allow user to specify TOS info for tunnel frames 2015-06-01 17:05:04 -07:00
ifb.c
Kconfig A very significant modification to NTB in this series. 2015-07-04 14:07:47 -07:00
LICENSE.SRC
loopback.c
macvlan.c
macvtap.c macvtap: fix network header pointer for VLAN tagged pkts 2015-07-27 14:49:54 -07:00
Makefile geneve: add initial netdev driver for GENEVE tunnels 2015-05-13 15:59:13 -04:00
mdio.c
mii.c
netconsole.c netconsole: implement extended console support 2015-06-25 17:00:39 -07:00
nlmon.c
ntb_netdev.c NTB: ntb_netdev not covering all receive errors 2015-08-09 16:32:21 -04:00
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c virtio/vhost: cross endian support 2015-07-03 16:02:25 -07:00
veth.c
virtio_net.c virtio-net: drop NETIF_F_FRAGLIST 2015-08-07 00:13:10 -07:00
vxlan.c vxlan: release lock after each bucket in vxlan_cleanup 2015-05-27 13:33:21 -04:00
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-01 14:58:07 -07:00