aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-03 21:07:32 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:45 -0400
commitb9f2c0440d806e01968c3ed4def930a43be248ad (patch)
treeb8e4668b0a4eab842fc33402e92b15f6c63cbc18 /drivers/net/e1000
parent753f492093da7a40141bfe083073400f518f4c68 (diff)
[netdrvr] Stop using legacy hooks ->self_test_count, ->get_stats_count
These have been superceded by the new ->get_sset_count() hook. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index e6c4a3bb9e4c..6c9a643426f5 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -618,8 +618,6 @@ e1000_get_drvinfo(struct net_device *netdev,
618 618
619 strncpy(drvinfo->fw_version, firmware_version, 32); 619 strncpy(drvinfo->fw_version, firmware_version, 32);
620 strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); 620 strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32);
621 drvinfo->n_stats = E1000_STATS_LEN;
622 drvinfo->testinfo_len = E1000_TEST_LEN;
623 drvinfo->regdump_len = e1000_get_regs_len(netdev); 621 drvinfo->regdump_len = e1000_get_regs_len(netdev);
624 drvinfo->eedump_len = e1000_get_eeprom_len(netdev); 622 drvinfo->eedump_len = e1000_get_eeprom_len(netdev);
625} 623}
@@ -1611,9 +1609,16 @@ e1000_link_test(struct e1000_adapter *adapter, uint64_t *data)
1611} 1609}
1612 1610
1613static int 1611static int
1614e1000_diag_test_count(struct net_device *netdev) 1612e1000_get_sset_count(struct net_device *netdev, int sset)
1615{ 1613{
1616 return E1000_TEST_LEN; 1614 switch (sset) {
1615 case ETH_SS_TEST:
1616 return E1000_TEST_LEN;
1617 case ETH_SS_STATS:
1618 return E1000_STATS_LEN;
1619 default:
1620 return -EOPNOTSUPP;
1621 }
1617} 1622}
1618 1623
1619extern void e1000_power_up_phy(struct e1000_adapter *); 1624extern void e1000_power_up_phy(struct e1000_adapter *);
@@ -1898,12 +1903,6 @@ e1000_nway_reset(struct net_device *netdev)
1898 return 0; 1903 return 0;
1899} 1904}
1900 1905
1901static int
1902e1000_get_stats_count(struct net_device *netdev)
1903{
1904 return E1000_STATS_LEN;
1905}
1906
1907static void 1906static void
1908e1000_get_ethtool_stats(struct net_device *netdev, 1907e1000_get_ethtool_stats(struct net_device *netdev,
1909 struct ethtool_stats *stats, uint64_t *data) 1908 struct ethtool_stats *stats, uint64_t *data)
@@ -1967,12 +1966,11 @@ static const struct ethtool_ops e1000_ethtool_ops = {
1967 .set_tx_csum = e1000_set_tx_csum, 1966 .set_tx_csum = e1000_set_tx_csum,
1968 .set_sg = ethtool_op_set_sg, 1967 .set_sg = ethtool_op_set_sg,
1969 .set_tso = e1000_set_tso, 1968 .set_tso = e1000_set_tso,
1970 .self_test_count = e1000_diag_test_count,
1971 .self_test = e1000_diag_test, 1969 .self_test = e1000_diag_test,
1972 .get_strings = e1000_get_strings, 1970 .get_strings = e1000_get_strings,
1973 .phys_id = e1000_phys_id, 1971 .phys_id = e1000_phys_id,
1974 .get_stats_count = e1000_get_stats_count,
1975 .get_ethtool_stats = e1000_get_ethtool_stats, 1972 .get_ethtool_stats = e1000_get_ethtool_stats,
1973 .get_sset_count = e1000_get_sset_count,
1976}; 1974};
1977 1975
1978void e1000_set_ethtool_ops(struct net_device *netdev) 1976void e1000_set_ethtool_ops(struct net_device *netdev)