diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-03 21:07:32 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:45 -0400 |
commit | b9f2c0440d806e01968c3ed4def930a43be248ad (patch) | |
tree | b8e4668b0a4eab842fc33402e92b15f6c63cbc18 /drivers/net/netxen | |
parent | 753f492093da7a40141bfe083073400f518f4c68 (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/netxen')
-rw-r--r-- | drivers/net/netxen/netxen_nic_ethtool.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c index 08c76b343663..78e42316e70f 100644 --- a/drivers/net/netxen/netxen_nic_ethtool.c +++ b/drivers/net/netxen/netxen_nic_ethtool.c | |||
@@ -115,8 +115,6 @@ netxen_nic_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *drvinfo) | |||
115 | sprintf(drvinfo->fw_version, "%d.%d.%d", fw_major, fw_minor, fw_build); | 115 | sprintf(drvinfo->fw_version, "%d.%d.%d", fw_major, fw_minor, fw_build); |
116 | 116 | ||
117 | strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); | 117 | strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); |
118 | drvinfo->n_stats = NETXEN_NIC_STATS_LEN; | ||
119 | drvinfo->testinfo_len = NETXEN_NIC_TEST_LEN; | ||
120 | drvinfo->regdump_len = NETXEN_NIC_REGS_LEN; | 118 | drvinfo->regdump_len = NETXEN_NIC_REGS_LEN; |
121 | drvinfo->eedump_len = netxen_nic_get_eeprom_len(dev); | 119 | drvinfo->eedump_len = netxen_nic_get_eeprom_len(dev); |
122 | } | 120 | } |
@@ -672,9 +670,16 @@ static int netxen_nic_reg_test(struct net_device *dev) | |||
672 | return 0; | 670 | return 0; |
673 | } | 671 | } |
674 | 672 | ||
675 | static int netxen_nic_diag_test_count(struct net_device *dev) | 673 | static int netxen_get_sset_count(struct net_device *dev, int sset) |
676 | { | 674 | { |
677 | return NETXEN_NIC_TEST_LEN; | 675 | switch (sset) { |
676 | case ETH_SS_TEST: | ||
677 | return NETXEN_NIC_TEST_LEN; | ||
678 | case ETH_SS_STATS: | ||
679 | return NETXEN_NIC_STATS_LEN; | ||
680 | default: | ||
681 | return -EOPNOTSUPP; | ||
682 | } | ||
678 | } | 683 | } |
679 | 684 | ||
680 | static void | 685 | static void |
@@ -709,11 +714,6 @@ netxen_nic_get_strings(struct net_device *dev, u32 stringset, u8 * data) | |||
709 | } | 714 | } |
710 | } | 715 | } |
711 | 716 | ||
712 | static int netxen_nic_get_stats_count(struct net_device *dev) | ||
713 | { | ||
714 | return NETXEN_NIC_STATS_LEN; | ||
715 | } | ||
716 | |||
717 | static void | 717 | static void |
718 | netxen_nic_get_ethtool_stats(struct net_device *dev, | 718 | netxen_nic_get_ethtool_stats(struct net_device *dev, |
719 | struct ethtool_stats *stats, u64 * data) | 719 | struct ethtool_stats *stats, u64 * data) |
@@ -747,9 +747,8 @@ struct ethtool_ops netxen_nic_ethtool_ops = { | |||
747 | .set_tx_csum = ethtool_op_set_tx_csum, | 747 | .set_tx_csum = ethtool_op_set_tx_csum, |
748 | .set_sg = ethtool_op_set_sg, | 748 | .set_sg = ethtool_op_set_sg, |
749 | .set_tso = ethtool_op_set_tso, | 749 | .set_tso = ethtool_op_set_tso, |
750 | .self_test_count = netxen_nic_diag_test_count, | ||
751 | .self_test = netxen_nic_diag_test, | 750 | .self_test = netxen_nic_diag_test, |
752 | .get_strings = netxen_nic_get_strings, | 751 | .get_strings = netxen_nic_get_strings, |
753 | .get_stats_count = netxen_nic_get_stats_count, | ||
754 | .get_ethtool_stats = netxen_nic_get_ethtool_stats, | 752 | .get_ethtool_stats = netxen_nic_get_ethtool_stats, |
753 | .get_sset_count = netxen_get_sset_count, | ||
755 | }; | 754 | }; |