can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device
authorJimmy Assarsson <extja@kvaser.com>
Mon, 10 Oct 2022 18:52:28 +0000 (20:52 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 26 Oct 2022 08:18:36 +0000 (10:18 +0200)
commit35364f5b41a4917fe94a3f393d149b63ec583297
tree3e95dd22e1763a057b2277ffe0ff7af9994f9312
parenta6375fd791cd38b005ade9da0fb85367bdfaf731
can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device

Use the CMD_GET_CAPABILITIES_REQ command to query the device for certain
capabilities. We are only interested in LISTENONLY mode and wither the
device reports CAN error counters.

Fixes: 080f40a6fa28 ("can: kvaser_usb: Add support for Kvaser CAN/USB devices")
Reported-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Tested-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Signed-off-by: Jimmy Assarsson <extja@kvaser.com>
Link: https://lore.kernel.org/all/20221010185237.319219-3-extja@kvaser.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c