#include <linux/pci.h>
#include <linux/ethtool.h>
#include <linux/stddef.h>
#include <linux/etherdevice.h>
#include <linux/log2.h>
#include <linux/net_tstamp.h>
#include <linux/linkmode.h>
#include "otx2_common.h"
#include "otx2_ptp.h"
#define DRV_NAME …
#define DRV_VF_NAME …
struct otx2_stat { … };
#define OTX2_DEV_STAT(stat) …
enum link_mode { … };
static const struct otx2_stat otx2_dev_stats[] = …;
#define OTX2_DRV_STAT(stat) …
static const struct otx2_stat otx2_drv_stats[] = …;
static const struct otx2_stat otx2_queue_stats[] = …;
static const unsigned int otx2_n_dev_stats = …;
static const unsigned int otx2_n_drv_stats = …;
static const unsigned int otx2_n_queue_stats = …;
static struct cgx_fw_data *otx2_get_fwdata(struct otx2_nic *pfvf);
static void otx2_get_drvinfo(struct net_device *netdev,
struct ethtool_drvinfo *info)
{ … }
static void otx2_get_qset_strings(struct otx2_nic *pfvf, u8 **data, int qset)
{ … }
static void otx2_get_strings(struct net_device *netdev, u32 sset, u8 *data)
{ … }
static void otx2_get_qset_stats(struct otx2_nic *pfvf,
struct ethtool_stats *stats, u64 **data)
{ … }
static int otx2_get_phy_fec_stats(struct otx2_nic *pfvf)
{ … }
static void otx2_get_ethtool_stats(struct net_device *netdev,
struct ethtool_stats *stats, u64 *data)
{ … }
static int otx2_get_sset_count(struct net_device *netdev, int sset)
{ … }
static void otx2_get_channels(struct net_device *dev,
struct ethtool_channels *channel)
{ … }
static int otx2_set_channels(struct net_device *dev,
struct ethtool_channels *channel)
{ … }
static void otx2_get_pauseparam(struct net_device *netdev,
struct ethtool_pauseparam *pause)
{ … }
static int otx2_set_pauseparam(struct net_device *netdev,
struct ethtool_pauseparam *pause)
{ … }
static void otx2_get_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
{ … }
static int otx2_set_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
{ … }
static int otx2_get_coalesce(struct net_device *netdev,
struct ethtool_coalesce *cmd,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int otx2_set_coalesce(struct net_device *netdev,
struct ethtool_coalesce *ec,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int otx2_get_rss_hash_opts(struct otx2_nic *pfvf,
struct ethtool_rxnfc *nfc)
{ … }
static int otx2_set_rss_hash_opts(struct otx2_nic *pfvf,
struct ethtool_rxnfc *nfc)
{ … }
static int otx2_get_rxnfc(struct net_device *dev,
struct ethtool_rxnfc *nfc, u32 *rules)
{ … }
static int otx2_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *nfc)
{ … }
static u32 otx2_get_rxfh_key_size(struct net_device *netdev)
{ … }
static u32 otx2_get_rxfh_indir_size(struct net_device *dev)
{ … }
static int otx2_rss_ctx_delete(struct otx2_nic *pfvf, int ctx_id)
{ … }
static int otx2_rss_ctx_create(struct otx2_nic *pfvf,
u32 *rss_context)
{ … }
static int otx2_set_rxfh(struct net_device *dev,
struct ethtool_rxfh_param *rxfh,
struct netlink_ext_ack *extack)
{ … }
static int otx2_get_rxfh(struct net_device *dev,
struct ethtool_rxfh_param *rxfh)
{ … }
static u32 otx2_get_msglevel(struct net_device *netdev)
{ … }
static void otx2_set_msglevel(struct net_device *netdev, u32 val)
{ … }
static u32 otx2_get_link(struct net_device *netdev)
{ … }
static int otx2_get_ts_info(struct net_device *netdev,
struct kernel_ethtool_ts_info *info)
{ … }
static struct cgx_fw_data *otx2_get_fwdata(struct otx2_nic *pfvf)
{ … }
static int otx2_get_fecparam(struct net_device *netdev,
struct ethtool_fecparam *fecparam)
{ … }
static int otx2_set_fecparam(struct net_device *netdev,
struct ethtool_fecparam *fecparam)
{ … }
static void otx2_get_fec_info(u64 index, int req_mode,
struct ethtool_link_ksettings *link_ksettings)
{ … }
static void otx2_get_link_mode_info(u64 link_mode_bmap,
bool req_mode,
struct ethtool_link_ksettings
*link_ksettings)
{ … }
static int otx2_get_link_ksettings(struct net_device *netdev,
struct ethtool_link_ksettings *cmd)
{ … }
static void otx2_get_advertised_mode(const struct ethtool_link_ksettings *cmd,
u64 *mode)
{ … }
static int otx2_set_link_ksettings(struct net_device *netdev,
const struct ethtool_link_ksettings *cmd)
{ … }
static void otx2_get_fec_stats(struct net_device *netdev,
struct ethtool_fec_stats *fec_stats)
{ … }
static const struct ethtool_ops otx2_ethtool_ops = …;
void otx2_set_ethtool_ops(struct net_device *netdev)
{ … }
static void otx2vf_get_drvinfo(struct net_device *netdev,
struct ethtool_drvinfo *info)
{ … }
static void otx2vf_get_strings(struct net_device *netdev, u32 sset, u8 *data)
{ … }
static void otx2vf_get_ethtool_stats(struct net_device *netdev,
struct ethtool_stats *stats, u64 *data)
{ … }
static int otx2vf_get_sset_count(struct net_device *netdev, int sset)
{ … }
static int otx2vf_get_link_ksettings(struct net_device *netdev,
struct ethtool_link_ksettings *cmd)
{ … }
static const struct ethtool_ops otx2vf_ethtool_ops = …;
void otx2vf_set_ethtool_ops(struct net_device *netdev)
{ … }
EXPORT_SYMBOL(…);