#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/mii.h>
#include <linux/phylink.h>
#include <linux/net_tstamp.h>
#include "stmmac.h"
#include "dwmac_dma.h"
#include "dwxgmac2.h"
#define REG_SPACE_SIZE …
#define GMAC4_REG_SPACE_SIZE …
#define MAC100_ETHTOOL_NAME …
#define GMAC_ETHTOOL_NAME …
#define XGMAC_ETHTOOL_NAME …
#define GMAC4_DMA_CHAN_BASE_ADDR …
#define ETHTOOL_DMA_OFFSET …
struct stmmac_stats { … };
#define STMMAC_STAT(m) …
static const struct stmmac_stats stmmac_gstrings_stats[] = …;
#define STMMAC_STATS_LEN …
static const char stmmac_qstats_string[][ETH_GSTRING_LEN] = …;
#define STMMAC_QSTATS …
#define STMMAC_MMC_STAT(m) …
static const struct stmmac_stats stmmac_mmc[] = …;
#define STMMAC_MMC_STATS_LEN …
static const char stmmac_qstats_tx_string[][ETH_GSTRING_LEN] = …;
static const char stmmac_qstats_rx_string[][ETH_GSTRING_LEN] = …;
static void stmmac_ethtool_getdrvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{ … }
static int stmmac_ethtool_get_link_ksettings(struct net_device *dev,
struct ethtool_link_ksettings *cmd)
{ … }
static int
stmmac_ethtool_set_link_ksettings(struct net_device *dev,
const struct ethtool_link_ksettings *cmd)
{ … }
static u32 stmmac_ethtool_getmsglevel(struct net_device *dev)
{ … }
static void stmmac_ethtool_setmsglevel(struct net_device *dev, u32 level)
{ … }
static int stmmac_check_if_running(struct net_device *dev)
{ … }
static int stmmac_ethtool_get_regs_len(struct net_device *dev)
{ … }
static void stmmac_ethtool_gregs(struct net_device *dev,
struct ethtool_regs *regs, void *space)
{ … }
static int stmmac_nway_reset(struct net_device *dev)
{ … }
static void stmmac_get_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
{ … }
static int stmmac_set_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
{ … }
static void
stmmac_get_pauseparam(struct net_device *netdev,
struct ethtool_pauseparam *pause)
{ … }
static int
stmmac_set_pauseparam(struct net_device *netdev,
struct ethtool_pauseparam *pause)
{ … }
static u64 stmmac_get_rx_normal_irq_n(struct stmmac_priv *priv, int q)
{ … }
static u64 stmmac_get_tx_normal_irq_n(struct stmmac_priv *priv, int q)
{ … }
static void stmmac_get_per_qstats(struct stmmac_priv *priv, u64 *data)
{ … }
static void stmmac_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *dummy, u64 *data)
{ … }
static int stmmac_get_sset_count(struct net_device *netdev, int sset)
{ … }
static void stmmac_get_qstats_string(struct stmmac_priv *priv, u8 *data)
{ … }
static void stmmac_get_strings(struct net_device *dev, u32 stringset, u8 *data)
{ … }
static void stmmac_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{ … }
static int stmmac_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{ … }
static int stmmac_ethtool_op_get_eee(struct net_device *dev,
struct ethtool_keee *edata)
{ … }
static int stmmac_ethtool_op_set_eee(struct net_device *dev,
struct ethtool_keee *edata)
{ … }
static u32 stmmac_usec2riwt(u32 usec, struct stmmac_priv *priv)
{ … }
static u32 stmmac_riwt2usec(u32 riwt, struct stmmac_priv *priv)
{ … }
static int __stmmac_get_coalesce(struct net_device *dev,
struct ethtool_coalesce *ec,
int queue)
{ … }
static int stmmac_get_coalesce(struct net_device *dev,
struct ethtool_coalesce *ec,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int stmmac_get_per_queue_coalesce(struct net_device *dev, u32 queue,
struct ethtool_coalesce *ec)
{ … }
static int __stmmac_set_coalesce(struct net_device *dev,
struct ethtool_coalesce *ec,
int queue)
{ … }
static int stmmac_set_coalesce(struct net_device *dev,
struct ethtool_coalesce *ec,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int stmmac_set_per_queue_coalesce(struct net_device *dev, u32 queue,
struct ethtool_coalesce *ec)
{ … }
static int stmmac_get_rxnfc(struct net_device *dev,
struct ethtool_rxnfc *rxnfc, u32 *rule_locs)
{ … }
static u32 stmmac_get_rxfh_key_size(struct net_device *dev)
{ … }
static u32 stmmac_get_rxfh_indir_size(struct net_device *dev)
{ … }
static int stmmac_get_rxfh(struct net_device *dev,
struct ethtool_rxfh_param *rxfh)
{ … }
static int stmmac_set_rxfh(struct net_device *dev,
struct ethtool_rxfh_param *rxfh,
struct netlink_ext_ack *extack)
{ … }
static void stmmac_get_channels(struct net_device *dev,
struct ethtool_channels *chan)
{ … }
static int stmmac_set_channels(struct net_device *dev,
struct ethtool_channels *chan)
{ … }
static int stmmac_get_ts_info(struct net_device *dev,
struct kernel_ethtool_ts_info *info)
{ … }
static int stmmac_get_tunable(struct net_device *dev,
const struct ethtool_tunable *tuna, void *data)
{ … }
static int stmmac_set_tunable(struct net_device *dev,
const struct ethtool_tunable *tuna,
const void *data)
{ … }
static const struct ethtool_ops stmmac_ethtool_ops = …;
void stmmac_set_ethtool_ops(struct net_device *netdev)
{ … }