#include <linux/ethtool.h>
#include "sparx5_main_regs.h"
#include "sparx5_main.h"
#include "sparx5_port.h"
#define SPX5_PORT_POLICER_DROPS …
static void sparx5_update_counter(u64 *cnt, u32 val)
{ … }
enum sparx5_stats_entry { … };
static const char *const sparx5_stats_layout[] = …;
static void sparx5_get_queue_sys_stats(struct sparx5 *sparx5, int portno)
{ … }
static void sparx5_get_ana_ac_stats_stats(struct sparx5 *sparx5, int portno)
{ … }
static void sparx5_get_dev_phy_stats(u64 *portstats, void __iomem *inst, u32
tinst)
{ … }
static void sparx5_get_dev_mac_stats(u64 *portstats, void __iomem *inst, u32
tinst)
{ … }
static void sparx5_get_dev_mac_ctrl_stats(u64 *portstats, void __iomem *inst,
u32 tinst)
{ … }
static void sparx5_get_dev_rmon_stats(u64 *portstats, void __iomem *inst, u32
tinst)
{ … }
static void sparx5_get_dev_misc_stats(u64 *portstats, void __iomem *inst, u32
tinst)
{ … }
static void sparx5_get_device_stats(struct sparx5 *sparx5, int portno)
{ … }
static void sparx5_get_asm_phy_stats(u64 *portstats, void __iomem *inst, int
portno)
{ … }
static void sparx5_get_asm_mac_stats(u64 *portstats, void __iomem *inst, int
portno)
{ … }
static void sparx5_get_asm_mac_ctrl_stats(u64 *portstats, void __iomem *inst,
int portno)
{ … }
static void sparx5_get_asm_rmon_stats(u64 *portstats, void __iomem *inst, int
portno)
{ … }
static void sparx5_get_asm_misc_stats(u64 *portstats, void __iomem *inst, int
portno)
{ … }
static void sparx5_get_asm_stats(struct sparx5 *sparx5, int portno)
{ … }
static const struct ethtool_rmon_hist_range sparx5_rmon_ranges[] = …;
static void sparx5_get_eth_phy_stats(struct net_device *ndev,
struct ethtool_eth_phy_stats *phy_stats)
{ … }
static void sparx5_get_eth_mac_stats(struct net_device *ndev,
struct ethtool_eth_mac_stats *mac_stats)
{ … }
static void sparx5_get_eth_mac_ctrl_stats(struct net_device *ndev,
struct ethtool_eth_ctrl_stats *mac_ctrl_stats)
{ … }
static void sparx5_get_eth_rmon_stats(struct net_device *ndev,
struct ethtool_rmon_stats *rmon_stats,
const struct ethtool_rmon_hist_range **ranges)
{ … }
static int sparx5_get_sset_count(struct net_device *ndev, int sset)
{ … }
static void sparx5_get_sset_strings(struct net_device *ndev, u32 sset, u8 *data)
{ … }
static void sparx5_get_sset_data(struct net_device *ndev,
struct ethtool_stats *stats, u64 *data)
{ … }
void sparx5_get_stats64(struct net_device *ndev,
struct rtnl_link_stats64 *stats)
{ … }
static void sparx5_update_port_stats(struct sparx5 *sparx5, int portno)
{ … }
static void sparx5_update_stats(struct sparx5 *sparx5)
{ … }
static void sparx5_check_stats_work(struct work_struct *work)
{ … }
static int sparx5_get_link_settings(struct net_device *ndev,
struct ethtool_link_ksettings *cmd)
{ … }
static int sparx5_set_link_settings(struct net_device *ndev,
const struct ethtool_link_ksettings *cmd)
{ … }
static void sparx5_config_stats(struct sparx5 *sparx5)
{ … }
static void sparx5_config_port_stats(struct sparx5 *sparx5, int portno)
{ … }
static int sparx5_get_ts_info(struct net_device *dev,
struct kernel_ethtool_ts_info *info)
{ … }
const struct ethtool_ops sparx5_ethtool_ops = …;
int sparx_stats_init(struct sparx5 *sparx5)
{ … }