summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 12:48:12 +0100
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 09:53:47 -0400
commit3594e131b23665b728b4c98daaf0b61b1d4aaa7a (patch)
tree93e2274e19b1c14ef44308d29a17d6f0f0a553bd /drivers/net/sfc
parent42cbe2d73c9bc2574f86d63c2b57da93e3b3060d (diff)
downloadkernel-crypto-3594e131b23665b728b4c98daaf0b61b1d4aaa7a.tar.gz
kernel-crypto-3594e131b23665b728b4c98daaf0b61b1d4aaa7a.tar.xz
kernel-crypto-3594e131b23665b728b4c98daaf0b61b1d4aaa7a.zip
sfc: Implement get_sset_count, replacing get_stats_count and self_test_count
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r--drivers/net/sfc/ethtool.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index 72a2eb2e3a1..906d18a6526 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -373,16 +373,18 @@ static int efx_ethtool_fill_self_tests(struct efx_nic *efx,
return n;
}
-static int efx_ethtool_get_stats_count(struct net_device *net_dev)
+static int efx_ethtool_get_sset_count(struct net_device *net_dev,
+ int string_set)
{
- return EFX_ETHTOOL_NUM_STATS;
-}
-
-static int efx_ethtool_self_test_count(struct net_device *net_dev)
-{
- struct efx_nic *efx = netdev_priv(net_dev);
-
- return efx_ethtool_fill_self_tests(efx, NULL, NULL, NULL);
+ switch (string_set) {
+ case ETH_SS_STATS:
+ return EFX_ETHTOOL_NUM_STATS;
+ case ETH_SS_TEST:
+ return efx_ethtool_fill_self_tests(netdev_priv(net_dev),
+ NULL, NULL, NULL);
+ default:
+ return -EINVAL;
+ }
}
static void efx_ethtool_get_strings(struct net_device *net_dev,
@@ -719,10 +721,9 @@ struct ethtool_ops efx_ethtool_ops = {
.set_tso = ethtool_op_set_tso,
.get_flags = ethtool_op_get_flags,
.set_flags = ethtool_op_set_flags,
- .self_test_count = efx_ethtool_self_test_count,
+ .get_sset_count = efx_ethtool_get_sset_count,
.self_test = efx_ethtool_self_test,
.get_strings = efx_ethtool_get_strings,
.phys_id = efx_ethtool_phys_id,
- .get_stats_count = efx_ethtool_get_stats_count,
.get_ethtool_stats = efx_ethtool_get_stats,
};