#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/ethtool.h>
#include "peak_canfd_user.h"
#define PCANFD_ECHO_SKB_MAX …
static const struct can_bittiming_const peak_canfd_nominal_const = …;
static const struct can_bittiming_const peak_canfd_data_const = …;
static struct peak_canfd_priv *pucan_init_cmd(struct peak_canfd_priv *priv)
{ … }
static void *pucan_add_cmd(struct peak_canfd_priv *priv, int cmd_op)
{ … }
static int pucan_write_cmd(struct peak_canfd_priv *priv)
{ … }
static int pucan_set_reset_mode(struct peak_canfd_priv *priv)
{ … }
static int pucan_set_normal_mode(struct peak_canfd_priv *priv)
{ … }
static int pucan_set_listen_only_mode(struct peak_canfd_priv *priv)
{ … }
static int pucan_set_timing_slow(struct peak_canfd_priv *priv,
const struct can_bittiming *pbt)
{ … }
static int pucan_set_timing_fast(struct peak_canfd_priv *priv,
const struct can_bittiming *pbt)
{ … }
static int pucan_set_std_filter(struct peak_canfd_priv *priv, u8 row, u32 mask)
{ … }
static int pucan_tx_abort(struct peak_canfd_priv *priv, u16 flags)
{ … }
static int pucan_clr_err_counters(struct peak_canfd_priv *priv)
{ … }
static int pucan_set_options(struct peak_canfd_priv *priv, u16 opt_mask)
{ … }
static int pucan_clr_options(struct peak_canfd_priv *priv, u16 opt_mask)
{ … }
static int pucan_setup_rx_barrier(struct peak_canfd_priv *priv)
{ … }
static int pucan_netif_rx(struct sk_buff *skb, __le32 ts_low, __le32 ts_high)
{ … }
static int pucan_handle_can_rx(struct peak_canfd_priv *priv,
struct pucan_rx_msg *msg)
{ … }
static int pucan_handle_error(struct peak_canfd_priv *priv,
struct pucan_error_msg *msg)
{ … }
static int pucan_handle_status(struct peak_canfd_priv *priv,
struct pucan_status_msg *msg)
{ … }
static int pucan_handle_cache_critical(struct peak_canfd_priv *priv)
{ … }
int peak_canfd_handle_msg(struct peak_canfd_priv *priv,
struct pucan_rx_msg *msg)
{ … }
int peak_canfd_handle_msgs_list(struct peak_canfd_priv *priv,
struct pucan_rx_msg *msg_list, int msg_count)
{ … }
static int peak_canfd_start(struct peak_canfd_priv *priv)
{ … }
static void peak_canfd_stop(struct peak_canfd_priv *priv)
{ … }
static int peak_canfd_set_mode(struct net_device *ndev, enum can_mode mode)
{ … }
static int peak_canfd_get_berr_counter(const struct net_device *ndev,
struct can_berr_counter *bec)
{ … }
static int peak_canfd_open(struct net_device *ndev)
{ … }
static int peak_canfd_set_bittiming(struct net_device *ndev)
{ … }
static int peak_canfd_set_data_bittiming(struct net_device *ndev)
{ … }
static int peak_canfd_close(struct net_device *ndev)
{ … }
static netdev_tx_t peak_canfd_start_xmit(struct sk_buff *skb,
struct net_device *ndev)
{ … }
static int peak_eth_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
{ … }
static const struct net_device_ops peak_canfd_netdev_ops = …;
static int peak_get_ts_info(struct net_device *dev,
struct kernel_ethtool_ts_info *info)
{ … }
static const struct ethtool_ops peak_canfd_ethtool_ops = …;
struct net_device *alloc_peak_canfd_dev(int sizeof_priv, int index,
int echo_skb_max)
{ … }