#include <linux/debugfs.h>
#include <linux/ethtool.h>
#include <linux/seq_file.h>
#include <linux/types.h>
#include "qca_7k.h"
#include "qca_debug.h"
#define QCASPI_MAX_REGS …
#define QCASPI_RX_MAX_FRAMES …
static const u16 qcaspi_spi_regs[] = …;
static const char qcaspi_gstrings_stats[][ETH_GSTRING_LEN] = …;
#ifdef CONFIG_DEBUG_FS
static int
qcaspi_info_show(struct seq_file *s, void *what)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
void
qcaspi_init_device_debugfs(struct qcaspi *qca)
{ … }
void
qcaspi_remove_device_debugfs(struct qcaspi *qca)
{ … }
#else
void
qcaspi_init_device_debugfs(struct qcaspi *qca)
{
}
void
qcaspi_remove_device_debugfs(struct qcaspi *qca)
{
}
#endif
static void
qcaspi_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *p)
{ … }
static int
qcaspi_get_link_ksettings(struct net_device *dev,
struct ethtool_link_ksettings *cmd)
{ … }
static void
qcaspi_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *estats, u64 *data)
{ … }
static void
qcaspi_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
{ … }
static int
qcaspi_get_sset_count(struct net_device *dev, int sset)
{ … }
static int
qcaspi_get_regs_len(struct net_device *dev)
{ … }
static void
qcaspi_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p)
{ … }
static void
qcaspi_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
{ … }
static int
qcaspi_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
{ … }
static const struct ethtool_ops qcaspi_ethtool_ops = …;
void qcaspi_set_ethtool_ops(struct net_device *dev)
{ … }