#ifndef KVASER_USB_H
#define KVASER_USB_H
#include <linux/completion.h>
#include <linux/ktime.h>
#include <linux/math64.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/usb.h>
#include <linux/can.h>
#include <linux/can/dev.h>
#define KVASER_USB_MAX_RX_URBS …
#define KVASER_USB_MAX_TX_URBS …
#define KVASER_USB_TIMEOUT …
#define KVASER_USB_RX_BUFFER_SIZE …
#define KVASER_USB_MAX_NET_DEVICES …
#define KVASER_USB_QUIRK_HAS_SILENT_MODE …
#define KVASER_USB_QUIRK_HAS_TXRX_ERRORS …
#define KVASER_USB_QUIRK_IGNORE_CLK_FREQ …
#define KVASER_USB_CAP_BERR_CAP …
#define KVASER_USB_CAP_EXT_CAP …
#define KVASER_USB_HYDRA_CAP_EXT_CMD …
struct kvaser_usb_dev_cfg;
enum kvaser_usb_leaf_family { … };
#define KVASER_USB_HYDRA_MAX_CMD_LEN …
struct kvaser_usb_dev_card_data_hydra { … };
struct kvaser_usb_dev_card_data { … };
struct kvaser_usb_tx_urb_context { … };
struct kvaser_usb_busparams { … } __packed;
struct kvaser_usb { … };
struct kvaser_usb_net_priv { … };
struct kvaser_usb_dev_ops { … };
struct kvaser_usb_driver_info { … };
struct kvaser_usb_dev_cfg { … };
extern const struct kvaser_usb_dev_ops kvaser_usb_hydra_dev_ops;
extern const struct kvaser_usb_dev_ops kvaser_usb_leaf_dev_ops;
void kvaser_usb_unlink_tx_urbs(struct kvaser_usb_net_priv *priv);
int kvaser_usb_recv_cmd(const struct kvaser_usb *dev, void *cmd, int len,
int *actual_len);
int kvaser_usb_send_cmd(const struct kvaser_usb *dev, void *cmd, int len);
int kvaser_usb_send_cmd_async(struct kvaser_usb_net_priv *priv, void *cmd,
int len);
int kvaser_usb_can_rx_over_error(struct net_device *netdev);
extern const struct can_bittiming_const kvaser_usb_flexc_bittiming_const;
static inline ktime_t kvaser_usb_ticks_to_ktime(const struct kvaser_usb_dev_cfg *cfg,
u64 ticks)
{ … }
static inline ktime_t kvaser_usb_timestamp48_to_ktime(const struct kvaser_usb_dev_cfg *cfg,
const __le16 *timestamp)
{ … }
static inline ktime_t kvaser_usb_timestamp64_to_ktime(const struct kvaser_usb_dev_cfg *cfg,
__le64 timestamp)
{ … }
#endif