linux/drivers/net/ethernet/fungible/funeth/funeth_ethtool.c

// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)

#include <linux/ethtool.h>
#include <linux/linkmode.h>
#include <linux/netdevice.h>
#include <linux/nvme.h>
#include <linux/io.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/pci.h>
#include <linux/rtnetlink.h>
#include "funeth.h"
#include "fun_port.h"
#include "funeth_txrx.h"

/* Min queue depth. The smallest power-of-2 supporting jumbo frames with 4K
 * pages is 8. Require it for all types of queues though some could work with
 * fewer entries.
 */
#define FUNETH_MIN_QDEPTH

static const char mac_tx_stat_names[][ETH_GSTRING_LEN] =;

static const char mac_rx_stat_names[][ETH_GSTRING_LEN] =;

static const char * const txq_stat_names[] =;

static const char * const xdpq_stat_names[] =;

static const char * const rxq_stat_names[] =;

static const char * const tls_stat_names[] =;

static void fun_link_modes_to_ethtool(u64 modes,
				      unsigned long *ethtool_modes_map)
{}

static void set_asym_pause(u64 advertising, struct ethtool_link_ksettings *ks)
{}

static unsigned int fun_port_type(unsigned int xcvr)
{}

static int fun_get_link_ksettings(struct net_device *netdev,
				  struct ethtool_link_ksettings *ks)
{}

static u64 fun_advert_modes(const struct ethtool_link_ksettings *ks)
{}

static u64 fun_speed_to_link_mode(unsigned int speed)
{}

static int fun_change_advert(struct funeth_priv *fp, u64 new_advert)
{}

#define FUN_PORT_CAP_FEC_MASK

static int fun_set_link_ksettings(struct net_device *netdev,
				  const struct ethtool_link_ksettings *ks)
{}

static void fun_get_pauseparam(struct net_device *netdev,
			       struct ethtool_pauseparam *pause)
{}

static int fun_set_pauseparam(struct net_device *netdev,
			      struct ethtool_pauseparam *pause)
{}

static int fun_restart_an(struct net_device *netdev)
{}

static int fun_set_phys_id(struct net_device *netdev,
			   enum ethtool_phys_id_state state)
{}

static void fun_get_drvinfo(struct net_device *netdev,
			    struct ethtool_drvinfo *info)
{}

static u32 fun_get_msglevel(struct net_device *netdev)
{}

static void fun_set_msglevel(struct net_device *netdev, u32 value)
{}

static int fun_get_regs_len(struct net_device *dev)
{}

static void fun_get_regs(struct net_device *dev, struct ethtool_regs *regs,
			 void *buf)
{}

static int fun_get_coalesce(struct net_device *netdev,
			    struct ethtool_coalesce *coal,
			    struct kernel_ethtool_coalesce *kcoal,
			    struct netlink_ext_ack *ext_ack)
{}

static int fun_set_coalesce(struct net_device *netdev,
			    struct ethtool_coalesce *coal,
			    struct kernel_ethtool_coalesce *kcoal,
			    struct netlink_ext_ack *ext_ack)
{}

static void fun_get_channels(struct net_device *netdev,
			     struct ethtool_channels *chan)
{}

static int fun_set_channels(struct net_device *netdev,
			    struct ethtool_channels *chan)
{}

static void fun_get_ringparam(struct net_device *netdev,
			      struct ethtool_ringparam *ring,
			      struct kernel_ethtool_ringparam *kring,
			      struct netlink_ext_ack *extack)
{}

static int fun_set_ringparam(struct net_device *netdev,
			     struct ethtool_ringparam *ring,
			     struct kernel_ethtool_ringparam *kring,
			     struct netlink_ext_ack *extack)
{}

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

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

static u64 *get_mac_stats(const struct funeth_priv *fp, u64 *data)
{}

static void fun_get_ethtool_stats(struct net_device *netdev,
				  struct ethtool_stats *stats, u64 *data)
{}

#define RX_STAT
#define TX_STAT
#define FEC_STAT

static void fun_get_pause_stats(struct net_device *netdev,
				struct ethtool_pause_stats *stats)
{}

static void fun_get_802_3_stats(struct net_device *netdev,
				struct ethtool_eth_mac_stats *stats)
{}

static void fun_get_802_3_ctrl_stats(struct net_device *netdev,
				     struct ethtool_eth_ctrl_stats *stats)
{}

static void fun_get_rmon_stats(struct net_device *netdev,
			       struct ethtool_rmon_stats *stats,
			       const struct ethtool_rmon_hist_range **ranges)
{}

static void fun_get_fec_stats(struct net_device *netdev,
			      struct ethtool_fec_stats *stats)
{}

#undef RX_STAT
#undef TX_STAT
#undef FEC_STAT

static int fun_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
			 u32 *rule_locs)
{}

static int fun_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info)
{}

static u32 fun_get_rxfh_indir_size(struct net_device *netdev)
{}

static u32 fun_get_rxfh_key_size(struct net_device *netdev)
{}

static int fun_get_rxfh(struct net_device *netdev,
			struct ethtool_rxfh_param *rxfh)
{}

static int fun_set_rxfh(struct net_device *netdev,
			struct ethtool_rxfh_param *rxfh,
			struct netlink_ext_ack *extack)
{}

static int fun_get_ts_info(struct net_device *netdev,
			   struct kernel_ethtool_ts_info *info)
{}

static unsigned int to_ethtool_fec(unsigned int fun_fec)
{}

static int fun_get_fecparam(struct net_device *netdev,
			    struct ethtool_fecparam *fec)
{}

static int fun_set_fecparam(struct net_device *netdev,
			    struct ethtool_fecparam *fec)
{}

static int fun_get_port_module_page(struct net_device *netdev,
				    const struct ethtool_module_eeprom *req,
				    struct netlink_ext_ack *extack)
{}

static const struct ethtool_ops fun_ethtool_ops =;

void fun_set_ethtool_ops(struct net_device *netdev)
{}