#include <linux/types.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/io.h>
#include <linux/netdevice.h>
#include <linux/ethtool.h>
#include "qlcnic.h"
struct qlcnic_stats { … };
#define QLC_SIZEOF(m) …
#define QLC_OFF(m) …
static const u32 qlcnic_fw_dump_level[] = …;
static const struct qlcnic_stats qlcnic_gstrings_stats[] = …;
static const char qlcnic_device_gstrings_stats[][ETH_GSTRING_LEN] = …;
static const char qlcnic_83xx_tx_stats_strings[][ETH_GSTRING_LEN] = …;
static const char qlcnic_83xx_mac_stats_strings[][ETH_GSTRING_LEN] = …;
#define QLCNIC_STATS_LEN …
static const char qlcnic_tx_queue_stats_strings[][ETH_GSTRING_LEN] = …;
#define QLCNIC_TX_STATS_LEN …
static const char qlcnic_83xx_rx_stats_strings[][ETH_GSTRING_LEN] = …;
static const char qlcnic_gstrings_test[][ETH_GSTRING_LEN] = …;
#define QLCNIC_TEST_LEN …
static inline int qlcnic_82xx_statistics(struct qlcnic_adapter *adapter)
{ … }
static inline int qlcnic_83xx_statistics(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_dev_statistics_len(struct qlcnic_adapter *adapter)
{ … }
#define QLCNIC_TX_INTR_NOT_CONFIGURED …
#define QLCNIC_MAX_EEPROM_LEN …
static const u32 diag_registers[] = …;
static const u32 ext_diag_registers[] = …;
#define QLCNIC_MGMT_API_VERSION …
#define QLCNIC_ETHTOOL_REGS_VER …
static inline int qlcnic_get_ring_regs_len(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_get_regs_len(struct net_device *dev)
{ … }
static int qlcnic_get_eeprom_len(struct net_device *dev)
{ … }
static void
qlcnic_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *drvinfo)
{ … }
static int qlcnic_82xx_get_link_ksettings(struct qlcnic_adapter *adapter,
struct ethtool_link_ksettings *ecmd)
{ … }
static int qlcnic_get_link_ksettings(struct net_device *dev,
struct ethtool_link_ksettings *ecmd)
{ … }
static int qlcnic_set_port_config(struct qlcnic_adapter *adapter,
const struct ethtool_link_ksettings *ecmd)
{ … }
static int qlcnic_set_link_ksettings(struct net_device *dev,
const struct ethtool_link_ksettings *ecmd)
{ … }
static int qlcnic_82xx_get_registers(struct qlcnic_adapter *adapter,
u32 *regs_buff)
{ … }
static void
qlcnic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p)
{ … }
static u32 qlcnic_test_link(struct net_device *dev)
{ … }
static int
qlcnic_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
u8 *bytes)
{ … }
static void
qlcnic_get_ringparam(struct net_device *dev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
{ … }
static u32
qlcnic_validate_ringparam(u32 val, u32 min, u32 max, char *r_name)
{ … }
static int
qlcnic_set_ringparam(struct net_device *dev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
{ … }
static int qlcnic_validate_ring_count(struct qlcnic_adapter *adapter,
u8 rx_ring, u8 tx_ring)
{ … }
static void qlcnic_get_channels(struct net_device *dev,
struct ethtool_channels *channel)
{ … }
static int qlcnic_set_channels(struct net_device *dev,
struct ethtool_channels *channel)
{ … }
static void
qlcnic_get_pauseparam(struct net_device *netdev,
struct ethtool_pauseparam *pause)
{ … }
static int
qlcnic_set_pauseparam(struct net_device *netdev,
struct ethtool_pauseparam *pause)
{ … }
static int qlcnic_reg_test(struct net_device *dev)
{ … }
static int qlcnic_eeprom_test(struct net_device *dev)
{ … }
static int qlcnic_get_sset_count(struct net_device *dev, int sset)
{ … }
static int qlcnic_irq_test(struct net_device *netdev)
{ … }
#define QLCNIC_ILB_PKT_SIZE …
#define QLCNIC_NUM_ILB_PKT …
#define QLCNIC_ILB_MAX_RCV_LOOP …
#define QLCNIC_LB_PKT_POLL_DELAY_MSEC …
#define QLCNIC_LB_PKT_POLL_COUNT …
static void qlcnic_create_loopback_buff(unsigned char *data, u8 mac[])
{ … }
int qlcnic_check_loopback_buff(unsigned char *data, u8 mac[])
{ … }
int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode)
{ … }
static int qlcnic_loopback_test(struct net_device *netdev, u8 mode)
{ … }
static void
qlcnic_diag_test(struct net_device *dev, struct ethtool_test *eth_test,
u64 *data)
{ … }
static void
qlcnic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
{ … }
static u64 *qlcnic_fill_stats(u64 *data, void *stats, int type)
{ … }
void qlcnic_update_stats(struct qlcnic_adapter *adapter)
{ … }
static u64 *qlcnic_fill_tx_queue_stats(u64 *data, void *stats)
{ … }
static void qlcnic_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *stats, u64 *data)
{ … }
static int qlcnic_set_led(struct net_device *dev,
enum ethtool_phys_id_state state)
{ … }
static void
qlcnic_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{ … }
static int
qlcnic_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{ … }
static int qlcnic_set_intr_coalesce(struct net_device *netdev,
struct ethtool_coalesce *ethcoal,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int qlcnic_get_intr_coalesce(struct net_device *netdev,
struct ethtool_coalesce *ethcoal,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static u32 qlcnic_get_msglevel(struct net_device *netdev)
{ … }
static void qlcnic_set_msglevel(struct net_device *netdev, u32 msglvl)
{ … }
int qlcnic_enable_fw_dump_state(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_disable_fw_dump_state(struct qlcnic_adapter *adapter)
{ … }
bool qlcnic_check_fw_dump_state(struct qlcnic_adapter *adapter)
{ … }
static int
qlcnic_get_dump_flag(struct net_device *netdev, struct ethtool_dump *dump)
{ … }
static int
qlcnic_get_dump_data(struct net_device *netdev, struct ethtool_dump *dump,
void *buffer)
{ … }
static int qlcnic_set_dump_mask(struct qlcnic_adapter *adapter, u32 mask)
{ … }
static int
qlcnic_set_dump(struct net_device *netdev, struct ethtool_dump *val)
{ … }
const struct ethtool_ops qlcnic_ethtool_ops = …;
const struct ethtool_ops qlcnic_sriov_vf_ethtool_ops = …;
const struct ethtool_ops qlcnic_ethtool_failed_ops = …;