#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/kmemleak.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/net_tstamp.h>
#include <linux/phy.h>
#include <linux/pm_runtime.h>
#include <linux/skbuff.h>
#include "cpsw.h"
#include "cpts.h"
#include "cpsw_ale.h"
#include "cpsw_priv.h"
#include "davinci_cpdma.h"
struct cpsw_hw_stats { … };
struct cpsw_stats { … };
enum { … };
#define CPSW_STAT(m) …
#define CPDMA_RX_STAT(m) …
#define CPDMA_TX_STAT(m) …
static const struct cpsw_stats cpsw_gstrings_stats[] = …;
static const struct cpsw_stats cpsw_gstrings_ch_stats[] = …;
#define CPSW_STATS_COMMON_LEN …
#define CPSW_STATS_CH_LEN …
u32 cpsw_get_msglevel(struct net_device *ndev)
{ … }
void cpsw_set_msglevel(struct net_device *ndev, u32 value)
{ … }
int cpsw_get_coalesce(struct net_device *ndev, struct ethtool_coalesce *coal,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
int cpsw_set_coalesce(struct net_device *ndev, struct ethtool_coalesce *coal,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
int cpsw_get_sset_count(struct net_device *ndev, int sset)
{ … }
static void cpsw_add_ch_strings(u8 **p, int ch_num, int rx_dir)
{ … }
void cpsw_get_strings(struct net_device *ndev, u32 stringset, u8 *data)
{ … }
void cpsw_get_ethtool_stats(struct net_device *ndev,
struct ethtool_stats *stats, u64 *data)
{ … }
void cpsw_get_pauseparam(struct net_device *ndev,
struct ethtool_pauseparam *pause)
{ … }
void cpsw_get_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
{ … }
int cpsw_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
{ … }
int cpsw_get_regs_len(struct net_device *ndev)
{ … }
void cpsw_get_regs(struct net_device *ndev, struct ethtool_regs *regs, void *p)
{ … }
int cpsw_ethtool_op_begin(struct net_device *ndev)
{ … }
void cpsw_ethtool_op_complete(struct net_device *ndev)
{ … }
void cpsw_get_channels(struct net_device *ndev, struct ethtool_channels *ch)
{ … }
int cpsw_get_link_ksettings(struct net_device *ndev,
struct ethtool_link_ksettings *ecmd)
{ … }
int cpsw_set_link_ksettings(struct net_device *ndev,
const struct ethtool_link_ksettings *ecmd)
{ … }
int cpsw_get_eee(struct net_device *ndev, struct ethtool_keee *edata)
{ … }
int cpsw_set_eee(struct net_device *ndev, struct ethtool_keee *edata)
{ … }
int cpsw_nway_reset(struct net_device *ndev)
{ … }
static void cpsw_suspend_data_pass(struct net_device *ndev)
{ … }
static int cpsw_resume_data_pass(struct net_device *ndev)
{ … }
static int cpsw_check_ch_settings(struct cpsw_common *cpsw,
struct ethtool_channels *ch)
{ … }
static int cpsw_update_channels_res(struct cpsw_priv *priv, int ch_num, int rx,
cpdma_handler_fn rx_handler)
{ … }
static void cpsw_fail(struct cpsw_common *cpsw)
{ … }
int cpsw_set_channels_common(struct net_device *ndev,
struct ethtool_channels *chs,
cpdma_handler_fn rx_handler)
{ … }
void cpsw_get_ringparam(struct net_device *ndev,
struct ethtool_ringparam *ering,
struct kernel_ethtool_ringparam *kernel_ering,
struct netlink_ext_ack *extack)
{ … }
int cpsw_set_ringparam(struct net_device *ndev,
struct ethtool_ringparam *ering,
struct kernel_ethtool_ringparam *kernel_ering,
struct netlink_ext_ack *extack)
{ … }
#if IS_ENABLED(CONFIG_TI_CPTS)
int cpsw_get_ts_info(struct net_device *ndev, struct kernel_ethtool_ts_info *info)
{ … }
#else
int cpsw_get_ts_info(struct net_device *ndev, struct kernel_ethtool_ts_info *info)
{
info->so_timestamping =
SOF_TIMESTAMPING_TX_SOFTWARE;
info->tx_types = 0;
info->rx_filters = 0;
return 0;
}
#endif