#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/usb.h>
#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/can/error.h>
#include <linux/can/dev/peak_canfd.h>
#include "pcan_usb_core.h"
#include "pcan_usb_pro.h"
#define PCAN_USBPROFD_CHANNEL_COUNT …
#define PCAN_USBFD_CHANNEL_COUNT …
#define PCAN_UFD_CRYSTAL_HZ …
#define PCAN_UFD_CMD_BUFFER_SIZE …
#define PCAN_UFD_LOSPD_PKT_SIZE …
#define PCAN_UFD_CMD_TIMEOUT_MS …
#define PCAN_UFD_RX_BUFFER_SIZE …
#define PCAN_UFD_TX_BUFFER_SIZE …
#define PCAN_USBFD_TYPE_STD …
#define PCAN_USBFD_TYPE_EXT …
struct __packed pcan_ufd_fw_info { … };
struct pcan_usb_fd_if { … };
struct pcan_usb_fd_device { … };
#define PCAN_UFD_CMD_CLK_SET …
#define PCAN_UFD_CLK_80MHZ …
#define PCAN_UFD_CLK_60MHZ …
#define PCAN_UFD_CLK_40MHZ …
#define PCAN_UFD_CLK_30MHZ …
#define PCAN_UFD_CLK_24MHZ …
#define PCAN_UFD_CLK_20MHZ …
#define PCAN_UFD_CLK_DEF …
struct __packed pcan_ufd_clock { … };
#define PCAN_UFD_CMD_LED_SET …
#define PCAN_UFD_LED_DEV …
#define PCAN_UFD_LED_FAST …
#define PCAN_UFD_LED_SLOW …
#define PCAN_UFD_LED_ON …
#define PCAN_UFD_LED_OFF …
#define PCAN_UFD_LED_DEF …
struct __packed pcan_ufd_led { … };
#define PCAN_UFD_FLTEXT_CALIBRATION …
struct __packed pcan_ufd_options { … };
#define PCAN_UFD_MSG_CALIBRATION …
struct __packed pcan_ufd_ts_msg { … };
#define PCAN_UFD_MSG_OVERRUN …
#define PCAN_UFD_OVMSG_CHANNEL(o) …
struct __packed pcan_ufd_ovr_msg { … };
#define PCAN_UFD_CMD_DEVID_SET …
struct __packed pcan_ufd_device_id { … };
static inline int pufd_omsg_get_channel(struct pcan_ufd_ovr_msg *om)
{ … }
static const u32 pcan_usb_fd_clk_freq[6] = …;
static inline
struct pcan_usb_fd_if *pcan_usb_fd_dev_if(struct peak_usb_device *dev)
{ … }
static inline void *pcan_usb_fd_cmd_buffer(struct peak_usb_device *dev)
{ … }
static int pcan_usb_fd_send_cmd(struct peak_usb_device *dev, void *cmd_tail)
{ … }
static int pcan_usb_fd_read_fwinfo(struct peak_usb_device *dev,
struct pcan_ufd_fw_info *fw_info)
{ … }
static int pcan_usb_fd_build_restart_cmd(struct peak_usb_device *dev, u8 *buf)
{ … }
static int pcan_usb_fd_set_bus(struct peak_usb_device *dev, u8 onoff)
{ … }
static int pcan_usb_fd_set_filter_std(struct peak_usb_device *dev, int idx,
u32 mask)
{ … }
static int pcan_usb_fd_set_options(struct peak_usb_device *dev,
bool onoff, u16 ucan_mask, u16 usb_mask)
{ … }
static int pcan_usb_fd_set_can_led(struct peak_usb_device *dev, u8 led_mode)
{ … }
static int pcan_usb_fd_set_clock_domain(struct peak_usb_device *dev,
u8 clk_mode)
{ … }
static int pcan_usb_fd_set_bittiming_slow(struct peak_usb_device *dev,
struct can_bittiming *bt)
{ … }
static int pcan_usb_fd_set_bittiming_fast(struct peak_usb_device *dev,
struct can_bittiming *bt)
{ … }
static int pcan_usb_fd_get_can_channel_id(struct peak_usb_device *dev,
u32 *can_ch_id)
{ … }
static int pcan_usb_fd_set_can_channel_id(struct peak_usb_device *dev, u32 can_ch_id)
{ … }
static int pcan_usb_fd_restart_async(struct peak_usb_device *dev,
struct urb *urb, u8 *buf)
{ … }
static int pcan_usb_fd_drv_loaded(struct peak_usb_device *dev, bool loaded)
{ … }
static int pcan_usb_fd_decode_canmsg(struct pcan_usb_fd_if *usb_if,
struct pucan_msg *rx_msg)
{ … }
static int pcan_usb_fd_decode_status(struct pcan_usb_fd_if *usb_if,
struct pucan_msg *rx_msg)
{ … }
static int pcan_usb_fd_decode_error(struct pcan_usb_fd_if *usb_if,
struct pucan_msg *rx_msg)
{ … }
static int pcan_usb_fd_decode_overrun(struct pcan_usb_fd_if *usb_if,
struct pucan_msg *rx_msg)
{ … }
static void pcan_usb_fd_decode_ts(struct pcan_usb_fd_if *usb_if,
struct pucan_msg *rx_msg)
{ … }
static int pcan_usb_fd_decode_buf(struct peak_usb_device *dev, struct urb *urb)
{ … }
static int pcan_usb_fd_encode_msg(struct peak_usb_device *dev,
struct sk_buff *skb, u8 *obuf, size_t *size)
{ … }
static int pcan_usb_fd_start(struct peak_usb_device *dev)
{ … }
static int pcan_usb_fd_get_berr_counter(const struct net_device *netdev,
struct can_berr_counter *bec)
{ … }
static int pcan_usb_fd_probe(struct usb_interface *intf)
{ … }
static int pcan_usb_fd_stop(struct peak_usb_device *dev)
{ … }
static int pcan_usb_fd_init(struct peak_usb_device *dev)
{ … }
static void pcan_usb_fd_exit(struct peak_usb_device *dev)
{ … }
static void pcan_usb_fd_free(struct peak_usb_device *dev)
{ … }
static int pcan_usb_fd_set_phys_id(struct net_device *netdev,
enum ethtool_phys_id_state state)
{ … }
static const struct ethtool_ops pcan_usb_fd_ethtool_ops = …;
static const struct can_bittiming_const pcan_usb_fd_const = …;
static const struct can_bittiming_const pcan_usb_fd_data_const = …;
const struct peak_usb_adapter pcan_usb_fd = …;
static const struct can_bittiming_const pcan_usb_chip_const = …;
static const struct can_bittiming_const pcan_usb_chip_data_const = …;
const struct peak_usb_adapter pcan_usb_chip = …;
static const struct can_bittiming_const pcan_usb_pro_fd_const = …;
static const struct can_bittiming_const pcan_usb_pro_fd_data_const = …;
const struct peak_usb_adapter pcan_usb_pro_fd = …;
static const struct can_bittiming_const pcan_usb_x6_const = …;
static const struct can_bittiming_const pcan_usb_x6_data_const = …;
const struct peak_usb_adapter pcan_usb_x6 = …;