Commit 7df76bd1 authored by Andre Guedes's avatar Andre Guedes Committed by Jeff Kirsher

igc: Add 'igc_ethtool_' prefix to functions in igc_ethtool.c

This patch adds the prefix 'igc_ethtool_' to all functions defined in
igc_ethtool.c so they align with the name convention already followed by
other parts of the driver (e.g. igc_tsn, igc_ptp). Also, this avoids
some name clashing with functions added to igc_main.c by upcoming
patches in this series. No functionality is changed by this patch, just
function renaming.
Signed-off-by: default avatarAndre Guedes <andre.guedes@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 876ea04d
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
#include "igc_hw.h" #include "igc_hw.h"
/* forward declaration */ void igc_ethtool_set_ops(struct net_device *);
void igc_set_ethtool_ops(struct net_device *);
/* Transmit and receive queues */ /* Transmit and receive queues */
#define IGC_MAX_RX_QUEUES 4 #define IGC_MAX_RX_QUEUES 4
......
...@@ -124,8 +124,8 @@ static const char igc_priv_flags_strings[][ETH_GSTRING_LEN] = { ...@@ -124,8 +124,8 @@ static const char igc_priv_flags_strings[][ETH_GSTRING_LEN] = {
#define IGC_PRIV_FLAGS_STR_LEN ARRAY_SIZE(igc_priv_flags_strings) #define IGC_PRIV_FLAGS_STR_LEN ARRAY_SIZE(igc_priv_flags_strings)
static void igc_get_drvinfo(struct net_device *netdev, static void igc_ethtool_get_drvinfo(struct net_device *netdev,
struct ethtool_drvinfo *drvinfo) struct ethtool_drvinfo *drvinfo)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
...@@ -139,13 +139,13 @@ static void igc_get_drvinfo(struct net_device *netdev, ...@@ -139,13 +139,13 @@ static void igc_get_drvinfo(struct net_device *netdev,
drvinfo->n_priv_flags = IGC_PRIV_FLAGS_STR_LEN; drvinfo->n_priv_flags = IGC_PRIV_FLAGS_STR_LEN;
} }
static int igc_get_regs_len(struct net_device *netdev) static int igc_ethtool_get_regs_len(struct net_device *netdev)
{ {
return IGC_REGS_LEN * sizeof(u32); return IGC_REGS_LEN * sizeof(u32);
} }
static void igc_get_regs(struct net_device *netdev, static void igc_ethtool_get_regs(struct net_device *netdev,
struct ethtool_regs *regs, void *p) struct ethtool_regs *regs, void *p)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
struct igc_hw *hw = &adapter->hw; struct igc_hw *hw = &adapter->hw;
...@@ -323,7 +323,8 @@ static void igc_get_regs(struct net_device *netdev, ...@@ -323,7 +323,8 @@ static void igc_get_regs(struct net_device *netdev,
regs_buff[205 + i] = rd32(IGC_ETQF(i)); regs_buff[205 + i] = rd32(IGC_ETQF(i));
} }
static void igc_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) static void igc_ethtool_get_wol(struct net_device *netdev,
struct ethtool_wolinfo *wol)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
...@@ -354,7 +355,8 @@ static void igc_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) ...@@ -354,7 +355,8 @@ static void igc_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
wol->wolopts |= WAKE_PHY; wol->wolopts |= WAKE_PHY;
} }
static int igc_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) static int igc_ethtool_set_wol(struct net_device *netdev,
struct ethtool_wolinfo *wol)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
...@@ -382,21 +384,21 @@ static int igc_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) ...@@ -382,21 +384,21 @@ static int igc_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
return 0; return 0;
} }
static u32 igc_get_msglevel(struct net_device *netdev) static u32 igc_ethtool_get_msglevel(struct net_device *netdev)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
return adapter->msg_enable; return adapter->msg_enable;
} }
static void igc_set_msglevel(struct net_device *netdev, u32 data) static void igc_ethtool_set_msglevel(struct net_device *netdev, u32 data)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
adapter->msg_enable = data; adapter->msg_enable = data;
} }
static int igc_nway_reset(struct net_device *netdev) static int igc_ethtool_nway_reset(struct net_device *netdev)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
...@@ -405,7 +407,7 @@ static int igc_nway_reset(struct net_device *netdev) ...@@ -405,7 +407,7 @@ static int igc_nway_reset(struct net_device *netdev)
return 0; return 0;
} }
static u32 igc_get_link(struct net_device *netdev) static u32 igc_ethtool_get_link(struct net_device *netdev)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
struct igc_mac_info *mac = &adapter->hw.mac; struct igc_mac_info *mac = &adapter->hw.mac;
...@@ -422,15 +424,15 @@ static u32 igc_get_link(struct net_device *netdev) ...@@ -422,15 +424,15 @@ static u32 igc_get_link(struct net_device *netdev)
return igc_has_link(adapter); return igc_has_link(adapter);
} }
static int igc_get_eeprom_len(struct net_device *netdev) static int igc_ethtool_get_eeprom_len(struct net_device *netdev)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
return adapter->hw.nvm.word_size * 2; return adapter->hw.nvm.word_size * 2;
} }
static int igc_get_eeprom(struct net_device *netdev, static int igc_ethtool_get_eeprom(struct net_device *netdev,
struct ethtool_eeprom *eeprom, u8 *bytes) struct ethtool_eeprom *eeprom, u8 *bytes)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
struct igc_hw *hw = &adapter->hw; struct igc_hw *hw = &adapter->hw;
...@@ -476,8 +478,8 @@ static int igc_get_eeprom(struct net_device *netdev, ...@@ -476,8 +478,8 @@ static int igc_get_eeprom(struct net_device *netdev,
return ret_val; return ret_val;
} }
static int igc_set_eeprom(struct net_device *netdev, static int igc_ethtool_set_eeprom(struct net_device *netdev,
struct ethtool_eeprom *eeprom, u8 *bytes) struct ethtool_eeprom *eeprom, u8 *bytes)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
struct igc_hw *hw = &adapter->hw; struct igc_hw *hw = &adapter->hw;
...@@ -544,8 +546,8 @@ static int igc_set_eeprom(struct net_device *netdev, ...@@ -544,8 +546,8 @@ static int igc_set_eeprom(struct net_device *netdev,
return ret_val; return ret_val;
} }
static void igc_get_ringparam(struct net_device *netdev, static void igc_ethtool_get_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring) struct ethtool_ringparam *ring)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
...@@ -555,8 +557,8 @@ static void igc_get_ringparam(struct net_device *netdev, ...@@ -555,8 +557,8 @@ static void igc_get_ringparam(struct net_device *netdev,
ring->tx_pending = adapter->tx_ring_count; ring->tx_pending = adapter->tx_ring_count;
} }
static int igc_set_ringparam(struct net_device *netdev, static int igc_ethtool_set_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring) struct ethtool_ringparam *ring)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
struct igc_ring *temp_ring; struct igc_ring *temp_ring;
...@@ -670,8 +672,8 @@ static int igc_set_ringparam(struct net_device *netdev, ...@@ -670,8 +672,8 @@ static int igc_set_ringparam(struct net_device *netdev,
return err; return err;
} }
static void igc_get_pauseparam(struct net_device *netdev, static void igc_ethtool_get_pauseparam(struct net_device *netdev,
struct ethtool_pauseparam *pause) struct ethtool_pauseparam *pause)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
struct igc_hw *hw = &adapter->hw; struct igc_hw *hw = &adapter->hw;
...@@ -689,8 +691,8 @@ static void igc_get_pauseparam(struct net_device *netdev, ...@@ -689,8 +691,8 @@ static void igc_get_pauseparam(struct net_device *netdev,
} }
} }
static int igc_set_pauseparam(struct net_device *netdev, static int igc_ethtool_set_pauseparam(struct net_device *netdev,
struct ethtool_pauseparam *pause) struct ethtool_pauseparam *pause)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
struct igc_hw *hw = &adapter->hw; struct igc_hw *hw = &adapter->hw;
...@@ -729,7 +731,8 @@ static int igc_set_pauseparam(struct net_device *netdev, ...@@ -729,7 +731,8 @@ static int igc_set_pauseparam(struct net_device *netdev,
return retval; return retval;
} }
static void igc_get_strings(struct net_device *netdev, u32 stringset, u8 *data) static void igc_ethtool_get_strings(struct net_device *netdev, u32 stringset,
u8 *data)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
u8 *p = data; u8 *p = data;
...@@ -780,7 +783,7 @@ static void igc_get_strings(struct net_device *netdev, u32 stringset, u8 *data) ...@@ -780,7 +783,7 @@ static void igc_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
} }
} }
static int igc_get_sset_count(struct net_device *netdev, int sset) static int igc_ethtool_get_sset_count(struct net_device *netdev, int sset)
{ {
switch (sset) { switch (sset) {
case ETH_SS_STATS: case ETH_SS_STATS:
...@@ -794,7 +797,7 @@ static int igc_get_sset_count(struct net_device *netdev, int sset) ...@@ -794,7 +797,7 @@ static int igc_get_sset_count(struct net_device *netdev, int sset)
} }
} }
static void igc_get_ethtool_stats(struct net_device *netdev, static void igc_ethtool_get_stats(struct net_device *netdev,
struct ethtool_stats *stats, u64 *data) struct ethtool_stats *stats, u64 *data)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
...@@ -850,8 +853,8 @@ static void igc_get_ethtool_stats(struct net_device *netdev, ...@@ -850,8 +853,8 @@ static void igc_get_ethtool_stats(struct net_device *netdev,
spin_unlock(&adapter->stats64_lock); spin_unlock(&adapter->stats64_lock);
} }
static int igc_get_coalesce(struct net_device *netdev, static int igc_ethtool_get_coalesce(struct net_device *netdev,
struct ethtool_coalesce *ec) struct ethtool_coalesce *ec)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
...@@ -870,8 +873,8 @@ static int igc_get_coalesce(struct net_device *netdev, ...@@ -870,8 +873,8 @@ static int igc_get_coalesce(struct net_device *netdev,
return 0; return 0;
} }
static int igc_set_coalesce(struct net_device *netdev, static int igc_ethtool_set_coalesce(struct net_device *netdev,
struct ethtool_coalesce *ec) struct ethtool_coalesce *ec)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
int i; int i;
...@@ -928,7 +931,7 @@ static int igc_set_coalesce(struct net_device *netdev, ...@@ -928,7 +931,7 @@ static int igc_set_coalesce(struct net_device *netdev,
} }
#define ETHER_TYPE_FULL_MASK ((__force __be16)~0) #define ETHER_TYPE_FULL_MASK ((__force __be16)~0)
static int igc_get_ethtool_nfc_entry(struct igc_adapter *adapter, static int igc_ethtool_get_nfc_entry(struct igc_adapter *adapter,
struct ethtool_rxnfc *cmd) struct ethtool_rxnfc *cmd)
{ {
struct ethtool_rx_flow_spec *fsp = &cmd->fs; struct ethtool_rx_flow_spec *fsp = &cmd->fs;
...@@ -977,7 +980,7 @@ static int igc_get_ethtool_nfc_entry(struct igc_adapter *adapter, ...@@ -977,7 +980,7 @@ static int igc_get_ethtool_nfc_entry(struct igc_adapter *adapter,
return 0; return 0;
} }
static int igc_get_ethtool_nfc_all(struct igc_adapter *adapter, static int igc_ethtool_get_nfc_all(struct igc_adapter *adapter,
struct ethtool_rxnfc *cmd, struct ethtool_rxnfc *cmd,
u32 *rule_locs) u32 *rule_locs)
{ {
...@@ -999,8 +1002,8 @@ static int igc_get_ethtool_nfc_all(struct igc_adapter *adapter, ...@@ -999,8 +1002,8 @@ static int igc_get_ethtool_nfc_all(struct igc_adapter *adapter,
return 0; return 0;
} }
static int igc_get_rss_hash_opts(struct igc_adapter *adapter, static int igc_ethtool_get_rss_hash_opts(struct igc_adapter *adapter,
struct ethtool_rxnfc *cmd) struct ethtool_rxnfc *cmd)
{ {
cmd->data = 0; cmd->data = 0;
...@@ -1049,8 +1052,8 @@ static int igc_get_rss_hash_opts(struct igc_adapter *adapter, ...@@ -1049,8 +1052,8 @@ static int igc_get_rss_hash_opts(struct igc_adapter *adapter,
return 0; return 0;
} }
static int igc_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, static int igc_ethtool_get_rxnfc(struct net_device *dev,
u32 *rule_locs) struct ethtool_rxnfc *cmd, u32 *rule_locs)
{ {
struct igc_adapter *adapter = netdev_priv(dev); struct igc_adapter *adapter = netdev_priv(dev);
...@@ -1062,11 +1065,11 @@ static int igc_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, ...@@ -1062,11 +1065,11 @@ static int igc_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
cmd->rule_cnt = adapter->nfc_filter_count; cmd->rule_cnt = adapter->nfc_filter_count;
return 0; return 0;
case ETHTOOL_GRXCLSRULE: case ETHTOOL_GRXCLSRULE:
return igc_get_ethtool_nfc_entry(adapter, cmd); return igc_ethtool_get_nfc_entry(adapter, cmd);
case ETHTOOL_GRXCLSRLALL: case ETHTOOL_GRXCLSRLALL:
return igc_get_ethtool_nfc_all(adapter, cmd, rule_locs); return igc_ethtool_get_nfc_all(adapter, cmd, rule_locs);
case ETHTOOL_GRXFH: case ETHTOOL_GRXFH:
return igc_get_rss_hash_opts(adapter, cmd); return igc_ethtool_get_rss_hash_opts(adapter, cmd);
default: default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
...@@ -1074,8 +1077,8 @@ static int igc_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, ...@@ -1074,8 +1077,8 @@ static int igc_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
#define UDP_RSS_FLAGS (IGC_FLAG_RSS_FIELD_IPV4_UDP | \ #define UDP_RSS_FLAGS (IGC_FLAG_RSS_FIELD_IPV4_UDP | \
IGC_FLAG_RSS_FIELD_IPV6_UDP) IGC_FLAG_RSS_FIELD_IPV6_UDP)
static int igc_set_rss_hash_opt(struct igc_adapter *adapter, static int igc_ethtool_set_rss_hash_opt(struct igc_adapter *adapter,
struct ethtool_rxnfc *nfc) struct ethtool_rxnfc *nfc)
{ {
u32 flags = adapter->flags; u32 flags = adapter->flags;
...@@ -1240,7 +1243,7 @@ int igc_erase_filter(struct igc_adapter *adapter, struct igc_nfc_filter *input) ...@@ -1240,7 +1243,7 @@ int igc_erase_filter(struct igc_adapter *adapter, struct igc_nfc_filter *input)
return 0; return 0;
} }
static int igc_update_ethtool_nfc_entry(struct igc_adapter *adapter, static int igc_ethtool_update_nfc_entry(struct igc_adapter *adapter,
struct igc_nfc_filter *input, struct igc_nfc_filter *input,
u16 sw_idx) u16 sw_idx)
{ {
...@@ -1288,7 +1291,7 @@ static int igc_update_ethtool_nfc_entry(struct igc_adapter *adapter, ...@@ -1288,7 +1291,7 @@ static int igc_update_ethtool_nfc_entry(struct igc_adapter *adapter,
return 0; return 0;
} }
static int igc_add_ethtool_nfc_entry(struct igc_adapter *adapter, static int igc_ethtool_add_nfc_entry(struct igc_adapter *adapter,
struct ethtool_rxnfc *cmd) struct ethtool_rxnfc *cmd)
{ {
struct net_device *netdev = adapter->netdev; struct net_device *netdev = adapter->netdev;
...@@ -1379,7 +1382,7 @@ static int igc_add_ethtool_nfc_entry(struct igc_adapter *adapter, ...@@ -1379,7 +1382,7 @@ static int igc_add_ethtool_nfc_entry(struct igc_adapter *adapter,
if (err) if (err)
goto err_out_w_lock; goto err_out_w_lock;
igc_update_ethtool_nfc_entry(adapter, input, input->sw_idx); igc_ethtool_update_nfc_entry(adapter, input, input->sw_idx);
spin_unlock(&adapter->nfc_lock); spin_unlock(&adapter->nfc_lock);
return 0; return 0;
...@@ -1391,7 +1394,7 @@ static int igc_add_ethtool_nfc_entry(struct igc_adapter *adapter, ...@@ -1391,7 +1394,7 @@ static int igc_add_ethtool_nfc_entry(struct igc_adapter *adapter,
return err; return err;
} }
static int igc_del_ethtool_nfc_entry(struct igc_adapter *adapter, static int igc_ethtool_del_nfc_entry(struct igc_adapter *adapter,
struct ethtool_rxnfc *cmd) struct ethtool_rxnfc *cmd)
{ {
struct ethtool_rx_flow_spec *fsp = struct ethtool_rx_flow_spec *fsp =
...@@ -1399,23 +1402,24 @@ static int igc_del_ethtool_nfc_entry(struct igc_adapter *adapter, ...@@ -1399,23 +1402,24 @@ static int igc_del_ethtool_nfc_entry(struct igc_adapter *adapter,
int err; int err;
spin_lock(&adapter->nfc_lock); spin_lock(&adapter->nfc_lock);
err = igc_update_ethtool_nfc_entry(adapter, NULL, fsp->location); err = igc_ethtool_update_nfc_entry(adapter, NULL, fsp->location);
spin_unlock(&adapter->nfc_lock); spin_unlock(&adapter->nfc_lock);
return err; return err;
} }
static int igc_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) static int igc_ethtool_set_rxnfc(struct net_device *dev,
struct ethtool_rxnfc *cmd)
{ {
struct igc_adapter *adapter = netdev_priv(dev); struct igc_adapter *adapter = netdev_priv(dev);
switch (cmd->cmd) { switch (cmd->cmd) {
case ETHTOOL_SRXFH: case ETHTOOL_SRXFH:
return igc_set_rss_hash_opt(adapter, cmd); return igc_ethtool_set_rss_hash_opt(adapter, cmd);
case ETHTOOL_SRXCLSRLINS: case ETHTOOL_SRXCLSRLINS:
return igc_add_ethtool_nfc_entry(adapter, cmd); return igc_ethtool_add_nfc_entry(adapter, cmd);
case ETHTOOL_SRXCLSRLDEL: case ETHTOOL_SRXCLSRLDEL:
return igc_del_ethtool_nfc_entry(adapter, cmd); return igc_ethtool_del_nfc_entry(adapter, cmd);
default: default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
...@@ -1443,13 +1447,13 @@ void igc_write_rss_indir_tbl(struct igc_adapter *adapter) ...@@ -1443,13 +1447,13 @@ void igc_write_rss_indir_tbl(struct igc_adapter *adapter)
} }
} }
static u32 igc_get_rxfh_indir_size(struct net_device *netdev) static u32 igc_ethtool_get_rxfh_indir_size(struct net_device *netdev)
{ {
return IGC_RETA_SIZE; return IGC_RETA_SIZE;
} }
static int igc_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, static int igc_ethtool_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
u8 *hfunc) u8 *hfunc)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
int i; int i;
...@@ -1464,8 +1468,8 @@ static int igc_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, ...@@ -1464,8 +1468,8 @@ static int igc_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
return 0; return 0;
} }
static int igc_set_rxfh(struct net_device *netdev, const u32 *indir, static int igc_ethtool_set_rxfh(struct net_device *netdev, const u32 *indir,
const u8 *key, const u8 hfunc) const u8 *key, const u8 hfunc)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
u32 num_queues; u32 num_queues;
...@@ -1493,8 +1497,8 @@ static int igc_set_rxfh(struct net_device *netdev, const u32 *indir, ...@@ -1493,8 +1497,8 @@ static int igc_set_rxfh(struct net_device *netdev, const u32 *indir,
return 0; return 0;
} }
static void igc_get_channels(struct net_device *netdev, static void igc_ethtool_get_channels(struct net_device *netdev,
struct ethtool_channels *ch) struct ethtool_channels *ch)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
...@@ -1510,8 +1514,8 @@ static void igc_get_channels(struct net_device *netdev, ...@@ -1510,8 +1514,8 @@ static void igc_get_channels(struct net_device *netdev,
ch->combined_count = adapter->rss_queues; ch->combined_count = adapter->rss_queues;
} }
static int igc_set_channels(struct net_device *netdev, static int igc_ethtool_set_channels(struct net_device *netdev,
struct ethtool_channels *ch) struct ethtool_channels *ch)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
unsigned int count = ch->combined_count; unsigned int count = ch->combined_count;
...@@ -1543,8 +1547,8 @@ static int igc_set_channels(struct net_device *netdev, ...@@ -1543,8 +1547,8 @@ static int igc_set_channels(struct net_device *netdev,
return 0; return 0;
} }
static int igc_get_ts_info(struct net_device *dev, static int igc_ethtool_get_ts_info(struct net_device *dev,
struct ethtool_ts_info *info) struct ethtool_ts_info *info)
{ {
struct igc_adapter *adapter = netdev_priv(dev); struct igc_adapter *adapter = netdev_priv(dev);
...@@ -1576,7 +1580,7 @@ static int igc_get_ts_info(struct net_device *dev, ...@@ -1576,7 +1580,7 @@ static int igc_get_ts_info(struct net_device *dev,
} }
} }
static u32 igc_get_priv_flags(struct net_device *netdev) static u32 igc_ethtool_get_priv_flags(struct net_device *netdev)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
u32 priv_flags = 0; u32 priv_flags = 0;
...@@ -1587,7 +1591,7 @@ static u32 igc_get_priv_flags(struct net_device *netdev) ...@@ -1587,7 +1591,7 @@ static u32 igc_get_priv_flags(struct net_device *netdev)
return priv_flags; return priv_flags;
} }
static int igc_set_priv_flags(struct net_device *netdev, u32 priv_flags) static int igc_ethtool_set_priv_flags(struct net_device *netdev, u32 priv_flags)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
unsigned int flags = adapter->flags; unsigned int flags = adapter->flags;
...@@ -1622,8 +1626,8 @@ static void igc_ethtool_complete(struct net_device *netdev) ...@@ -1622,8 +1626,8 @@ static void igc_ethtool_complete(struct net_device *netdev)
pm_runtime_put(&adapter->pdev->dev); pm_runtime_put(&adapter->pdev->dev);
} }
static int igc_get_link_ksettings(struct net_device *netdev, static int igc_ethtool_get_link_ksettings(struct net_device *netdev,
struct ethtool_link_ksettings *cmd) struct ethtool_link_ksettings *cmd)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
struct igc_hw *hw = &adapter->hw; struct igc_hw *hw = &adapter->hw;
...@@ -1729,8 +1733,9 @@ static int igc_get_link_ksettings(struct net_device *netdev, ...@@ -1729,8 +1733,9 @@ static int igc_get_link_ksettings(struct net_device *netdev,
return 0; return 0;
} }
static int igc_set_link_ksettings(struct net_device *netdev, static int
const struct ethtool_link_ksettings *cmd) igc_ethtool_set_link_ksettings(struct net_device *netdev,
const struct ethtool_link_ksettings *cmd)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
struct net_device *dev = adapter->netdev; struct net_device *dev = adapter->netdev;
...@@ -1796,8 +1801,8 @@ static int igc_set_link_ksettings(struct net_device *netdev, ...@@ -1796,8 +1801,8 @@ static int igc_set_link_ksettings(struct net_device *netdev,
return 0; return 0;
} }
static void igc_diag_test(struct net_device *netdev, static void igc_ethtool_diag_test(struct net_device *netdev,
struct ethtool_test *eth_test, u64 *data) struct ethtool_test *eth_test, u64 *data)
{ {
struct igc_adapter *adapter = netdev_priv(netdev); struct igc_adapter *adapter = netdev_priv(netdev);
bool if_running = netif_running(netdev); bool if_running = netif_running(netdev);
...@@ -1856,45 +1861,45 @@ static void igc_diag_test(struct net_device *netdev, ...@@ -1856,45 +1861,45 @@ static void igc_diag_test(struct net_device *netdev,
static const struct ethtool_ops igc_ethtool_ops = { static const struct ethtool_ops igc_ethtool_ops = {
.supported_coalesce_params = ETHTOOL_COALESCE_USECS, .supported_coalesce_params = ETHTOOL_COALESCE_USECS,
.get_drvinfo = igc_get_drvinfo, .get_drvinfo = igc_ethtool_get_drvinfo,
.get_regs_len = igc_get_regs_len, .get_regs_len = igc_ethtool_get_regs_len,
.get_regs = igc_get_regs, .get_regs = igc_ethtool_get_regs,
.get_wol = igc_get_wol, .get_wol = igc_ethtool_get_wol,
.set_wol = igc_set_wol, .set_wol = igc_ethtool_set_wol,
.get_msglevel = igc_get_msglevel, .get_msglevel = igc_ethtool_get_msglevel,
.set_msglevel = igc_set_msglevel, .set_msglevel = igc_ethtool_set_msglevel,
.nway_reset = igc_nway_reset, .nway_reset = igc_ethtool_nway_reset,
.get_link = igc_get_link, .get_link = igc_ethtool_get_link,
.get_eeprom_len = igc_get_eeprom_len, .get_eeprom_len = igc_ethtool_get_eeprom_len,
.get_eeprom = igc_get_eeprom, .get_eeprom = igc_ethtool_get_eeprom,
.set_eeprom = igc_set_eeprom, .set_eeprom = igc_ethtool_set_eeprom,
.get_ringparam = igc_get_ringparam, .get_ringparam = igc_ethtool_get_ringparam,
.set_ringparam = igc_set_ringparam, .set_ringparam = igc_ethtool_set_ringparam,
.get_pauseparam = igc_get_pauseparam, .get_pauseparam = igc_ethtool_get_pauseparam,
.set_pauseparam = igc_set_pauseparam, .set_pauseparam = igc_ethtool_set_pauseparam,
.get_strings = igc_get_strings, .get_strings = igc_ethtool_get_strings,
.get_sset_count = igc_get_sset_count, .get_sset_count = igc_ethtool_get_sset_count,
.get_ethtool_stats = igc_get_ethtool_stats, .get_ethtool_stats = igc_ethtool_get_stats,
.get_coalesce = igc_get_coalesce, .get_coalesce = igc_ethtool_get_coalesce,
.set_coalesce = igc_set_coalesce, .set_coalesce = igc_ethtool_set_coalesce,
.get_rxnfc = igc_get_rxnfc, .get_rxnfc = igc_ethtool_get_rxnfc,
.set_rxnfc = igc_set_rxnfc, .set_rxnfc = igc_ethtool_set_rxnfc,
.get_rxfh_indir_size = igc_get_rxfh_indir_size, .get_rxfh_indir_size = igc_ethtool_get_rxfh_indir_size,
.get_rxfh = igc_get_rxfh, .get_rxfh = igc_ethtool_get_rxfh,
.set_rxfh = igc_set_rxfh, .set_rxfh = igc_ethtool_set_rxfh,
.get_ts_info = igc_get_ts_info, .get_ts_info = igc_ethtool_get_ts_info,
.get_channels = igc_get_channels, .get_channels = igc_ethtool_get_channels,
.set_channels = igc_set_channels, .set_channels = igc_ethtool_set_channels,
.get_priv_flags = igc_get_priv_flags, .get_priv_flags = igc_ethtool_get_priv_flags,
.set_priv_flags = igc_set_priv_flags, .set_priv_flags = igc_ethtool_set_priv_flags,
.begin = igc_ethtool_begin, .begin = igc_ethtool_begin,
.complete = igc_ethtool_complete, .complete = igc_ethtool_complete,
.get_link_ksettings = igc_get_link_ksettings, .get_link_ksettings = igc_ethtool_get_link_ksettings,
.set_link_ksettings = igc_set_link_ksettings, .set_link_ksettings = igc_ethtool_set_link_ksettings,
.self_test = igc_diag_test, .self_test = igc_ethtool_diag_test,
}; };
void igc_set_ethtool_ops(struct net_device *netdev) void igc_ethtool_set_ops(struct net_device *netdev)
{ {
netdev->ethtool_ops = &igc_ethtool_ops; netdev->ethtool_ops = &igc_ethtool_ops;
} }
...@@ -4932,7 +4932,7 @@ static int igc_probe(struct pci_dev *pdev, ...@@ -4932,7 +4932,7 @@ static int igc_probe(struct pci_dev *pdev,
hw->hw_addr = adapter->io_addr; hw->hw_addr = adapter->io_addr;
netdev->netdev_ops = &igc_netdev_ops; netdev->netdev_ops = &igc_netdev_ops;
igc_set_ethtool_ops(netdev); igc_ethtool_set_ops(netdev);
netdev->watchdog_timeo = 5 * HZ; netdev->watchdog_timeo = 5 * HZ;
netdev->mem_start = pci_resource_start(pdev, 0); netdev->mem_start = pci_resource_start(pdev, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment