aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/ethtool.c
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/e1000e/ethtool.c
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/e1000e/ethtool.c')
-rw-r--r--drivers/net/e1000e/ethtool.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index 0e80406bfbd7..3423f33769b7 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -577,8 +577,6 @@ static void e1000_get_drvinfo(struct net_device *netdev,
577 577
578 strncpy(drvinfo->fw_version, firmware_version, 32); 578 strncpy(drvinfo->fw_version, firmware_version, 32);
579 strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); 579 strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32);
580 drvinfo->n_stats = E1000_STATS_LEN;
581 drvinfo->testinfo_len = E1000_TEST_LEN;
582 drvinfo->regdump_len = e1000_get_regs_len(netdev); 580 drvinfo->regdump_len = e1000_get_regs_len(netdev);
583 drvinfo->eedump_len = e1000_get_eeprom_len(netdev); 581 drvinfo->eedump_len = e1000_get_eeprom_len(netdev);
584} 582}
@@ -1493,9 +1491,16 @@ static int e1000_link_test(struct e1000_adapter *adapter, u64 *data)
1493 return *data; 1491 return *data;
1494} 1492}
1495 1493
1496static int e1000_diag_test_count(struct net_device *netdev) 1494static int e1000e_get_sset_count(struct net_device *netdev, int sset)
1497{ 1495{
1498 return E1000_TEST_LEN; 1496 switch (sset) {
1497 case ETH_SS_TEST:
1498 return E1000_TEST_LEN;
1499 case ETH_SS_STATS:
1500 return E1000_STATS_LEN;
1501 default:
1502 return -EOPNOTSUPP;
1503 }
1499} 1504}
1500 1505
1501static void e1000_diag_test(struct net_device *netdev, 1506static void e1000_diag_test(struct net_device *netdev,
@@ -1692,11 +1697,6 @@ static int e1000_nway_reset(struct net_device *netdev)
1692 return 0; 1697 return 0;
1693} 1698}
1694 1699
1695static int e1000_get_stats_count(struct net_device *netdev)
1696{
1697 return E1000_STATS_LEN;
1698}
1699
1700static void e1000_get_ethtool_stats(struct net_device *netdev, 1700static void e1000_get_ethtool_stats(struct net_device *netdev,
1701 struct ethtool_stats *stats, 1701 struct ethtool_stats *stats,
1702 u64 *data) 1702 u64 *data)
@@ -1760,12 +1760,11 @@ static const struct ethtool_ops e1000_ethtool_ops = {
1760 .set_sg = ethtool_op_set_sg, 1760 .set_sg = ethtool_op_set_sg,
1761 .get_tso = ethtool_op_get_tso, 1761 .get_tso = ethtool_op_get_tso,
1762 .set_tso = e1000_set_tso, 1762 .set_tso = e1000_set_tso,
1763 .self_test_count = e1000_diag_test_count,
1764 .self_test = e1000_diag_test, 1763 .self_test = e1000_diag_test,
1765 .get_strings = e1000_get_strings, 1764 .get_strings = e1000_get_strings,
1766 .phys_id = e1000_phys_id, 1765 .phys_id = e1000_phys_id,
1767 .get_stats_count = e1000_get_stats_count,
1768 .get_ethtool_stats = e1000_get_ethtool_stats, 1766 .get_ethtool_stats = e1000_get_ethtool_stats,
1767 .get_sset_count = e1000e_get_sset_count,
1769}; 1768};
1770 1769
1771void e1000e_set_ethtool_ops(struct net_device *netdev) 1770void e1000e_set_ethtool_ops(struct net_device *netdev)