linux/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c

// SPDX-License-Identifier: GPL-2.0+

#include <linux/netdevice.h>

#include "lan966x_main.h"

/* Number of traffic classes */
#define LAN966X_NUM_TC
#define LAN966X_STATS_CHECK_DELAY

static const struct lan966x_stat_layout lan966x_stats_layout[] =;

/* The following numbers are indexes into lan966x_stats_layout[] */
#define SYS_COUNT_RX_OCT
#define SYS_COUNT_RX_UC
#define SYS_COUNT_RX_MC
#define SYS_COUNT_RX_BC
#define SYS_COUNT_RX_SHORT
#define SYS_COUNT_RX_FRAG
#define SYS_COUNT_RX_JABBER
#define SYS_COUNT_RX_CRC
#define SYS_COUNT_RX_SYMBOL_ERR
#define SYS_COUNT_RX_SZ_64
#define SYS_COUNT_RX_SZ_65_127
#define SYS_COUNT_RX_SZ_128_255
#define SYS_COUNT_RX_SZ_256_511
#define SYS_COUNT_RX_SZ_512_1023
#define SYS_COUNT_RX_SZ_1024_1526
#define SYS_COUNT_RX_SZ_JUMBO
#define SYS_COUNT_RX_PAUSE
#define SYS_COUNT_RX_CONTROL
#define SYS_COUNT_RX_LONG
#define SYS_COUNT_RX_CAT_DROP
#define SYS_COUNT_RX_RED_PRIO_0
#define SYS_COUNT_RX_RED_PRIO_1
#define SYS_COUNT_RX_RED_PRIO_2
#define SYS_COUNT_RX_RED_PRIO_3
#define SYS_COUNT_RX_RED_PRIO_4
#define SYS_COUNT_RX_RED_PRIO_5
#define SYS_COUNT_RX_RED_PRIO_6
#define SYS_COUNT_RX_RED_PRIO_7
#define SYS_COUNT_RX_YELLOW_PRIO_0
#define SYS_COUNT_RX_YELLOW_PRIO_1
#define SYS_COUNT_RX_YELLOW_PRIO_2
#define SYS_COUNT_RX_YELLOW_PRIO_3
#define SYS_COUNT_RX_YELLOW_PRIO_4
#define SYS_COUNT_RX_YELLOW_PRIO_5
#define SYS_COUNT_RX_YELLOW_PRIO_6
#define SYS_COUNT_RX_YELLOW_PRIO_7
#define SYS_COUNT_RX_GREEN_PRIO_0
#define SYS_COUNT_RX_GREEN_PRIO_1
#define SYS_COUNT_RX_GREEN_PRIO_2
#define SYS_COUNT_RX_GREEN_PRIO_3
#define SYS_COUNT_RX_GREEN_PRIO_4
#define SYS_COUNT_RX_GREEN_PRIO_5
#define SYS_COUNT_RX_GREEN_PRIO_6
#define SYS_COUNT_RX_GREEN_PRIO_7
#define SYS_COUNT_RX_ASSEMBLY_ERR
#define SYS_COUNT_RX_SMD_ERR
#define SYS_COUNT_RX_ASSEMBLY_OK
#define SYS_COUNT_RX_MERGE_FRAG
#define SYS_COUNT_RX_PMAC_OCT
#define SYS_COUNT_RX_PMAC_UC
#define SYS_COUNT_RX_PMAC_MC
#define SYS_COUNT_RX_PMAC_BC
#define SYS_COUNT_RX_PMAC_SHORT
#define SYS_COUNT_RX_PMAC_FRAG
#define SYS_COUNT_RX_PMAC_JABBER
#define SYS_COUNT_RX_PMAC_CRC
#define SYS_COUNT_RX_PMAC_SYMBOL_ERR
#define SYS_COUNT_RX_PMAC_SZ_64
#define SYS_COUNT_RX_PMAC_SZ_65_127
#define SYS_COUNT_RX_PMAC_SZ_128_255
#define SYS_COUNT_RX_PMAC_SZ_256_511
#define SYS_COUNT_RX_PMAC_SZ_512_1023
#define SYS_COUNT_RX_PMAC_SZ_1024_1526
#define SYS_COUNT_RX_PMAC_SZ_JUMBO
#define SYS_COUNT_RX_PMAC_PAUSE
#define SYS_COUNT_RX_PMAC_CONTROL
#define SYS_COUNT_RX_PMAC_LONG

#define SYS_COUNT_TX_OCT
#define SYS_COUNT_TX_UC
#define SYS_COUNT_TX_MC
#define SYS_COUNT_TX_BC
#define SYS_COUNT_TX_COL
#define SYS_COUNT_TX_DROP
#define SYS_COUNT_TX_PAUSE
#define SYS_COUNT_TX_SZ_64
#define SYS_COUNT_TX_SZ_65_127
#define SYS_COUNT_TX_SZ_128_255
#define SYS_COUNT_TX_SZ_256_511
#define SYS_COUNT_TX_SZ_512_1023
#define SYS_COUNT_TX_SZ_1024_1526
#define SYS_COUNT_TX_SZ_JUMBO
#define SYS_COUNT_TX_YELLOW_PRIO_0
#define SYS_COUNT_TX_YELLOW_PRIO_1
#define SYS_COUNT_TX_YELLOW_PRIO_2
#define SYS_COUNT_TX_YELLOW_PRIO_3
#define SYS_COUNT_TX_YELLOW_PRIO_4
#define SYS_COUNT_TX_YELLOW_PRIO_5
#define SYS_COUNT_TX_YELLOW_PRIO_6
#define SYS_COUNT_TX_YELLOW_PRIO_7
#define SYS_COUNT_TX_GREEN_PRIO_0
#define SYS_COUNT_TX_GREEN_PRIO_1
#define SYS_COUNT_TX_GREEN_PRIO_2
#define SYS_COUNT_TX_GREEN_PRIO_3
#define SYS_COUNT_TX_GREEN_PRIO_4
#define SYS_COUNT_TX_GREEN_PRIO_5
#define SYS_COUNT_TX_GREEN_PRIO_6
#define SYS_COUNT_TX_GREEN_PRIO_7
#define SYS_COUNT_TX_AGED
#define SYS_COUNT_TX_LLCT
#define SYS_COUNT_TX_CT
#define SYS_COUNT_TX_MM_HOLD
#define SYS_COUNT_TX_MERGE_FRAG
#define SYS_COUNT_TX_PMAC_OCT
#define SYS_COUNT_TX_PMAC_UC
#define SYS_COUNT_TX_PMAC_MC
#define SYS_COUNT_TX_PMAC_BC
#define SYS_COUNT_TX_PMAC_PAUSE
#define SYS_COUNT_TX_PMAC_SZ_64
#define SYS_COUNT_TX_PMAC_SZ_65_127
#define SYS_COUNT_TX_PMAC_SZ_128_255
#define SYS_COUNT_TX_PMAC_SZ_256_511
#define SYS_COUNT_TX_PMAC_SZ_512_1023
#define SYS_COUNT_TX_PMAC_SZ_1024_1526
#define SYS_COUNT_TX_PMAC_SZ_JUMBO

#define SYS_COUNT_DR_LOCAL
#define SYS_COUNT_DR_TAIL
#define SYS_COUNT_DR_YELLOW_PRIO_0
#define SYS_COUNT_DR_YELLOW_PRIO_1
#define SYS_COUNT_DR_YELLOW_PRIO_2
#define SYS_COUNT_DR_YELLOW_PRIO_3
#define SYS_COUNT_DR_YELLOW_PRIO_4
#define SYS_COUNT_DR_YELLOW_PRIO_5
#define SYS_COUNT_DR_YELLOW_PRIO_6
#define SYS_COUNT_DR_YELLOW_PRIO_7
#define SYS_COUNT_DR_GREEN_PRIO_0
#define SYS_COUNT_DR_GREEN_PRIO_1
#define SYS_COUNT_DR_GREEN_PRIO_2
#define SYS_COUNT_DR_GREEN_PRIO_3
#define SYS_COUNT_DR_GREEN_PRIO_4
#define SYS_COUNT_DR_GREEN_PRIO_5
#define SYS_COUNT_DR_GREEN_PRIO_6
#define SYS_COUNT_DR_GREEN_PRIO_7

/* Add a possibly wrapping 32 bit value to a 64 bit counter */
static void lan966x_add_cnt(u64 *cnt, u32 val)
{}

static void lan966x_stats_update(struct lan966x *lan966x)
{}

static int lan966x_get_sset_count(struct net_device *dev, int sset)
{}

static void lan966x_get_strings(struct net_device *netdev, u32 sset, u8 *data)
{}

static void lan966x_get_ethtool_stats(struct net_device *dev,
				      struct ethtool_stats *stats, u64 *data)
{}

static void lan966x_get_eth_mac_stats(struct net_device *dev,
				      struct ethtool_eth_mac_stats *mac_stats)
{}

static const struct ethtool_rmon_hist_range lan966x_rmon_ranges[] =;

static void lan966x_get_eth_rmon_stats(struct net_device *dev,
				       struct ethtool_rmon_stats *rmon_stats,
				       const struct ethtool_rmon_hist_range **ranges)
{}

static int lan966x_get_link_ksettings(struct net_device *ndev,
				      struct ethtool_link_ksettings *cmd)
{}

static int lan966x_set_link_ksettings(struct net_device *ndev,
				      const struct ethtool_link_ksettings *cmd)
{}

static void lan966x_get_pauseparam(struct net_device *dev,
				   struct ethtool_pauseparam *pause)
{}

static int lan966x_set_pauseparam(struct net_device *dev,
				  struct ethtool_pauseparam *pause)
{}

static int lan966x_get_ts_info(struct net_device *dev,
			       struct kernel_ethtool_ts_info *info)
{}

const struct ethtool_ops lan966x_ethtool_ops =;

static void lan966x_check_stats_work(struct work_struct *work)
{}

void lan966x_stats_get(struct net_device *dev,
		       struct rtnl_link_stats64 *stats)
{}

int lan966x_stats_init(struct lan966x *lan966x)
{}