#include <linux/completion.h>
#include <linux/device.h>
#include <linux/ethtool.h>
#include <linux/gfp.h>
#include <linux/if.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/usb.h>
#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/can/error.h>
#include <linux/can/netlink.h>
#include "kvaser_usb.h"
#define KVASER_VENDOR_ID …
#define USB_LEAF_DEVEL_PRODUCT_ID …
#define USB_LEAF_LITE_PRODUCT_ID …
#define USB_LEAF_PRO_PRODUCT_ID …
#define USB_LEAF_SPRO_PRODUCT_ID …
#define USB_LEAF_PRO_LS_PRODUCT_ID …
#define USB_LEAF_PRO_SWC_PRODUCT_ID …
#define USB_LEAF_PRO_LIN_PRODUCT_ID …
#define USB_LEAF_SPRO_LS_PRODUCT_ID …
#define USB_LEAF_SPRO_SWC_PRODUCT_ID …
#define USB_MEMO2_DEVEL_PRODUCT_ID …
#define USB_MEMO2_HSHS_PRODUCT_ID …
#define USB_UPRO_HSHS_PRODUCT_ID …
#define USB_LEAF_LITE_GI_PRODUCT_ID …
#define USB_LEAF_PRO_OBDII_PRODUCT_ID …
#define USB_MEMO2_HSLS_PRODUCT_ID …
#define USB_LEAF_LITE_CH_PRODUCT_ID …
#define USB_BLACKBIRD_SPRO_PRODUCT_ID …
#define USB_OEM_MERCURY_PRODUCT_ID …
#define USB_OEM_LEAF_PRODUCT_ID …
#define USB_CAN_R_PRODUCT_ID …
#define USB_LEAF_LITE_V2_PRODUCT_ID …
#define USB_MINI_PCIE_HS_PRODUCT_ID …
#define USB_LEAF_LIGHT_HS_V2_OEM_PRODUCT_ID …
#define USB_USBCAN_LIGHT_2HS_PRODUCT_ID …
#define USB_MINI_PCIE_2HS_PRODUCT_ID …
#define USB_USBCAN_R_V2_PRODUCT_ID …
#define USB_LEAF_LIGHT_R_V2_PRODUCT_ID …
#define USB_LEAF_LIGHT_HS_V2_OEM2_PRODUCT_ID …
#define USB_USBCAN_REVB_PRODUCT_ID …
#define USB_VCI2_PRODUCT_ID …
#define USB_USBCAN2_PRODUCT_ID …
#define USB_MEMORATOR_PRODUCT_ID …
#define USB_BLACKBIRD_V2_PRODUCT_ID …
#define USB_MEMO_PRO_5HS_PRODUCT_ID …
#define USB_USBCAN_PRO_5HS_PRODUCT_ID …
#define USB_USBCAN_LIGHT_4HS_PRODUCT_ID …
#define USB_LEAF_PRO_HS_V2_PRODUCT_ID …
#define USB_USBCAN_PRO_2HS_V2_PRODUCT_ID …
#define USB_MEMO_2HS_PRODUCT_ID …
#define USB_MEMO_PRO_2HS_V2_PRODUCT_ID …
#define USB_HYBRID_2CANLIN_PRODUCT_ID …
#define USB_ATI_USBCAN_PRO_2HS_V2_PRODUCT_ID …
#define USB_ATI_MEMO_PRO_2HS_V2_PRODUCT_ID …
#define USB_HYBRID_PRO_2CANLIN_PRODUCT_ID …
#define USB_U100_PRODUCT_ID …
#define USB_U100P_PRODUCT_ID …
#define USB_U100S_PRODUCT_ID …
#define USB_USBCAN_PRO_4HS_PRODUCT_ID …
#define USB_HYBRID_CANLIN_PRODUCT_ID …
#define USB_HYBRID_PRO_CANLIN_PRODUCT_ID …
#define USB_LEAF_V3_PRODUCT_ID …
#define USB_VINING_800_PRODUCT_ID …
#define USB_USBCAN_PRO_5XCAN_PRODUCT_ID …
#define USB_MINI_PCIE_1XCAN_PRODUCT_ID …
static const struct kvaser_usb_driver_info kvaser_usb_driver_info_hydra = …;
static const struct kvaser_usb_driver_info kvaser_usb_driver_info_usbcan = …;
static const struct kvaser_usb_driver_info kvaser_usb_driver_info_leaf = …;
static const struct kvaser_usb_driver_info kvaser_usb_driver_info_leaf_err = …;
static const struct kvaser_usb_driver_info kvaser_usb_driver_info_leaf_err_listen = …;
static const struct kvaser_usb_driver_info kvaser_usb_driver_info_leafimx = …;
static const struct usb_device_id kvaser_usb_table[] = …;
MODULE_DEVICE_TABLE(usb, kvaser_usb_table);
int kvaser_usb_send_cmd(const struct kvaser_usb *dev, void *cmd, int len)
{ … }
int kvaser_usb_recv_cmd(const struct kvaser_usb *dev, void *cmd, int len,
int *actual_len)
{ … }
static void kvaser_usb_send_cmd_callback(struct urb *urb)
{ … }
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)
{ … }
static void kvaser_usb_read_bulk_callback(struct urb *urb)
{ … }
static int kvaser_usb_setup_rx_urbs(struct kvaser_usb *dev)
{ … }
static int kvaser_usb_open(struct net_device *netdev)
{ … }
static void kvaser_usb_reset_tx_urb_contexts(struct kvaser_usb_net_priv *priv)
{ … }
void kvaser_usb_unlink_tx_urbs(struct kvaser_usb_net_priv *priv)
{ … }
static void kvaser_usb_unlink_all_urbs(struct kvaser_usb *dev)
{ … }
static int kvaser_usb_close(struct net_device *netdev)
{ … }
static int kvaser_usb_set_bittiming(struct net_device *netdev)
{ … }
static int kvaser_usb_set_data_bittiming(struct net_device *netdev)
{ … }
static void kvaser_usb_write_bulk_callback(struct urb *urb)
{ … }
static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb,
struct net_device *netdev)
{ … }
static const struct net_device_ops kvaser_usb_netdev_ops = …;
static const struct net_device_ops kvaser_usb_netdev_ops_hwts = …;
static const struct ethtool_ops kvaser_usb_ethtool_ops = …;
static const struct ethtool_ops kvaser_usb_ethtool_ops_hwts = …;
static void kvaser_usb_remove_interfaces(struct kvaser_usb *dev)
{ … }
static int kvaser_usb_init_one(struct kvaser_usb *dev, int channel)
{ … }
static int kvaser_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static void kvaser_usb_disconnect(struct usb_interface *intf)
{ … }
static struct usb_driver kvaser_usb_driver = …;
module_usb_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;