#include <linux/ethtool_netlink.h>
#include <linux/net_tstamp.h>
#include <linux/module.h>
#include "enetc.h"
static const u32 enetc_si_regs[] = …;
static const u32 enetc_txbdr_regs[] = …;
static const u32 enetc_rxbdr_regs[] = …;
static const u32 enetc_port_regs[] = …;
static const u32 enetc_port_mm_regs[] = …;
static int enetc_get_reglen(struct net_device *ndev)
{ … }
static void enetc_get_regs(struct net_device *ndev, struct ethtool_regs *regs,
void *regbuf)
{ … }
static const struct { … } enetc_si_counters[] = …;
static const struct { … } enetc_port_counters[] = …;
static const char rx_ring_stats[][ETH_GSTRING_LEN] = …;
static const char tx_ring_stats[][ETH_GSTRING_LEN] = …;
static int enetc_get_sset_count(struct net_device *ndev, int sset)
{ … }
static void enetc_get_strings(struct net_device *ndev, u32 stringset, u8 *data)
{ … }
static void enetc_get_ethtool_stats(struct net_device *ndev,
struct ethtool_stats *stats, u64 *data)
{ … }
static void enetc_pause_stats(struct enetc_hw *hw, int mac,
struct ethtool_pause_stats *pause_stats)
{ … }
static void enetc_get_pause_stats(struct net_device *ndev,
struct ethtool_pause_stats *pause_stats)
{ … }
static void enetc_mac_stats(struct enetc_hw *hw, int mac,
struct ethtool_eth_mac_stats *s)
{ … }
static void enetc_ctrl_stats(struct enetc_hw *hw, int mac,
struct ethtool_eth_ctrl_stats *s)
{ … }
static const struct ethtool_rmon_hist_range enetc_rmon_ranges[] = …;
static void enetc_rmon_stats(struct enetc_hw *hw, int mac,
struct ethtool_rmon_stats *s)
{ … }
static void enetc_get_eth_mac_stats(struct net_device *ndev,
struct ethtool_eth_mac_stats *mac_stats)
{ … }
static void enetc_get_eth_ctrl_stats(struct net_device *ndev,
struct ethtool_eth_ctrl_stats *ctrl_stats)
{ … }
static void enetc_get_rmon_stats(struct net_device *ndev,
struct ethtool_rmon_stats *rmon_stats,
const struct ethtool_rmon_hist_range **ranges)
{ … }
#define ENETC_RSSHASH_L3 …
#define ENETC_RSSHASH_L4 …
static int enetc_get_rsshash(struct ethtool_rxnfc *rxnfc)
{ … }
static void ether_addr_copy_swap(u8 *dst, const u8 *src)
{ … }
static int enetc_set_cls_entry(struct enetc_si *si,
struct ethtool_rx_flow_spec *fs, bool en)
{ … }
static int enetc_get_rxnfc(struct net_device *ndev, struct ethtool_rxnfc *rxnfc,
u32 *rule_locs)
{ … }
static int enetc_set_rxnfc(struct net_device *ndev, struct ethtool_rxnfc *rxnfc)
{ … }
static u32 enetc_get_rxfh_key_size(struct net_device *ndev)
{ … }
static u32 enetc_get_rxfh_indir_size(struct net_device *ndev)
{ … }
static int enetc_get_rxfh(struct net_device *ndev,
struct ethtool_rxfh_param *rxfh)
{ … }
void enetc_set_rss_key(struct enetc_hw *hw, const u8 *bytes)
{ … }
EXPORT_SYMBOL_GPL(…);
static int enetc_set_rxfh(struct net_device *ndev,
struct ethtool_rxfh_param *rxfh,
struct netlink_ext_ack *extack)
{ … }
static void enetc_get_ringparam(struct net_device *ndev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
{ … }
static int enetc_get_coalesce(struct net_device *ndev,
struct ethtool_coalesce *ic,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int enetc_set_coalesce(struct net_device *ndev,
struct ethtool_coalesce *ic,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int enetc_get_ts_info(struct net_device *ndev,
struct kernel_ethtool_ts_info *info)
{ … }
static void enetc_get_wol(struct net_device *dev,
struct ethtool_wolinfo *wol)
{ … }
static int enetc_set_wol(struct net_device *dev,
struct ethtool_wolinfo *wol)
{ … }
static void enetc_get_pauseparam(struct net_device *dev,
struct ethtool_pauseparam *pause)
{ … }
static int enetc_set_pauseparam(struct net_device *dev,
struct ethtool_pauseparam *pause)
{ … }
static int enetc_get_link_ksettings(struct net_device *dev,
struct ethtool_link_ksettings *cmd)
{ … }
static int enetc_set_link_ksettings(struct net_device *dev,
const struct ethtool_link_ksettings *cmd)
{ … }
static void enetc_get_mm_stats(struct net_device *ndev,
struct ethtool_mm_stats *s)
{ … }
static int enetc_get_mm(struct net_device *ndev, struct ethtool_mm_state *state)
{ … }
static int enetc_mm_wait_tx_active(struct enetc_hw *hw, int verify_time)
{ … }
static void enetc_set_ptcfpr(struct enetc_hw *hw, u8 preemptible_tcs)
{ … }
void enetc_mm_commit_preemptible_tcs(struct enetc_ndev_priv *priv)
{ … }
static void enetc_restart_emac_rx(struct enetc_si *si)
{ … }
static int enetc_set_mm(struct net_device *ndev, struct ethtool_mm_cfg *cfg,
struct netlink_ext_ack *extack)
{ … }
void enetc_mm_link_state_update(struct enetc_ndev_priv *priv, bool link)
{ … }
EXPORT_SYMBOL_GPL(…);
static const struct ethtool_ops enetc_pf_ethtool_ops = …;
static const struct ethtool_ops enetc_vf_ethtool_ops = …;
void enetc_set_ethtool_ops(struct net_device *ndev)
{ … }
EXPORT_SYMBOL_GPL(…);