aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/usb/peak_usb/pcan_usb_core.h
diff options
context:
space:
mode:
authorStephane Grosjean <s.grosjean@peak-system.com>2015-01-23 11:31:20 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-01-28 14:47:05 +0100
commite3629f5657e653c413b2970a91e5f9ea123b36dc (patch)
tree11240bb5878a4722773b10cc12baac38fd2e7fa3 /drivers/net/can/usb/peak_usb/pcan_usb_core.h
parentcan: peak_usb: export ctrlmode_supported to adapter specific definition (diff)
downloadlinux-dev-e3629f5657e653c413b2970a91e5f9ea123b36dc.tar.xz
linux-dev-e3629f5657e653c413b2970a91e5f9ea123b36dc.zip
can: peak_usb: add adapter BEC callback definition
Add the definition of a new callback that enable any PEAK-System CAN USB adapter to grant read access to its Bus Error Counters value. This ability is not supported by all the PEAK-System adapters, thus, for those, the callback pointer will be initiaized to NULL, which is correct regarding the linux-can device driver specs. Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/usb/peak_usb/pcan_usb_core.h')
-rw-r--r--drivers/net/can/usb/peak_usb/pcan_usb_core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.h b/drivers/net/can/usb/peak_usb/pcan_usb_core.h
index 54fdb5978a05..739a344427a2 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.h
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.h
@@ -67,6 +67,8 @@ struct peak_usb_adapter {
int (*dev_stop)(struct peak_usb_device *dev);
int (*dev_restart_async)(struct peak_usb_device *dev, struct urb *urb,
u8 *buf);
+ int (*do_get_berr_counter)(const struct net_device *netdev,
+ struct can_berr_counter *bec);
u8 ep_msg_in;
u8 ep_msg_out[PCAN_USB_MAX_CHANNEL];
u8 ts_used_bits;