#include <linux/etherdevice.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include "hns_enet.h"
#define HNS_PHY_PAGE_MDIX …
#define HNS_PHY_PAGE_LED …
#define HNS_PHY_PAGE_COPPER …
#define HNS_PHY_PAGE_REG …
#define HNS_PHY_CSC_REG …
#define HNS_PHY_CSS_REG …
#define HNS_LED_FC_REG …
#define HNS_LED_FORCE_ON …
#define HNS_LED_FORCE_OFF …
#define HNS_CHIP_VERSION …
#define HNS_NET_STATS_CNT …
#define PHY_MDIX_CTRL_S …
#define PHY_MDIX_CTRL_M …
#define PHY_MDIX_STATUS_B …
#define PHY_SPEED_DUP_RESOLVE_B …
static u32 hns_nic_get_link(struct net_device *net_dev)
{ … }
static void hns_get_mdix_mode(struct net_device *net_dev,
struct ethtool_link_ksettings *cmd)
{ … }
static int hns_nic_get_link_ksettings(struct net_device *net_dev,
struct ethtool_link_ksettings *cmd)
{ … }
static int hns_nic_set_link_ksettings(struct net_device *net_dev,
const struct ethtool_link_ksettings *cmd)
{ … }
static const char hns_nic_test_strs[][ETH_GSTRING_LEN] = …;
static int hns_nic_config_phy_loopback(struct phy_device *phy_dev, u8 en)
{ … }
static int __lb_setup(struct net_device *ndev,
enum hnae_loop loop)
{ … }
static int __lb_up(struct net_device *ndev,
enum hnae_loop loop_mode)
{ … }
static void __lb_other_process(struct hns_nic_ring_data *ring_data,
struct sk_buff *skb)
{ … }
static int __lb_clean_rings(struct hns_nic_priv *priv,
int ringid0, int ringid1, int budget)
{ … }
static int __lb_run_test(struct net_device *ndev,
enum hnae_loop loop_mode)
{ … }
static int __lb_down(struct net_device *ndev, enum hnae_loop loop)
{ … }
static void hns_nic_self_test(struct net_device *ndev,
struct ethtool_test *eth_test, u64 *data)
{ … }
static void hns_nic_get_drvinfo(struct net_device *net_dev,
struct ethtool_drvinfo *drvinfo)
{ … }
static void hns_get_ringparam(struct net_device *net_dev,
struct ethtool_ringparam *param,
struct kernel_ethtool_ringparam *kernel_param,
struct netlink_ext_ack *extack)
{ … }
static void hns_get_pauseparam(struct net_device *net_dev,
struct ethtool_pauseparam *param)
{ … }
static int hns_set_pauseparam(struct net_device *net_dev,
struct ethtool_pauseparam *param)
{ … }
static int hns_get_coalesce(struct net_device *net_dev,
struct ethtool_coalesce *ec,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int hns_set_coalesce(struct net_device *net_dev,
struct ethtool_coalesce *ec,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static void
hns_get_channels(struct net_device *net_dev, struct ethtool_channels *ch)
{ … }
static void hns_get_ethtool_stats(struct net_device *netdev,
struct ethtool_stats *stats, u64 *data)
{ … }
static void hns_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
{ … }
static int hns_get_sset_count(struct net_device *netdev, int stringset)
{ … }
static int hns_phy_led_set(struct net_device *netdev, int value)
{ … }
static int
hns_set_phys_id(struct net_device *netdev, enum ethtool_phys_id_state state)
{ … }
static void hns_get_regs(struct net_device *net_dev, struct ethtool_regs *cmd,
void *data)
{ … }
static int hns_get_regs_len(struct net_device *net_dev)
{ … }
static int hns_nic_nway_reset(struct net_device *netdev)
{ … }
static u32
hns_get_rss_key_size(struct net_device *netdev)
{ … }
static u32
hns_get_rss_indir_size(struct net_device *netdev)
{ … }
static int
hns_get_rss(struct net_device *netdev, struct ethtool_rxfh_param *rxfh)
{ … }
static int
hns_set_rss(struct net_device *netdev, struct ethtool_rxfh_param *rxfh,
struct netlink_ext_ack *extack)
{ … }
static int hns_get_rxnfc(struct net_device *netdev,
struct ethtool_rxnfc *cmd,
u32 *rule_locs)
{ … }
static const struct ethtool_ops hns_ethtool_ops = …;
void hns_ethtool_set_ops(struct net_device *ndev)
{ … }