summaryrefslogtreecommitdiffstats
path: root/drivers/net/niu.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-10-01 11:58:24 +0000
committerDavid S. Miller <davem@davemloft.net>2009-10-05 00:10:10 -0700
commit15f0a394c6573f4cb65a13095288ab9b9f8135f9 (patch)
tree211fe96826513a68a107feb9850817b9c4b2c8d1 /drivers/net/niu.c
parent1ddee09ff0420090d5b03ef3f9eba0e4db647035 (diff)
downloadkernel-crypto-15f0a394c6573f4cb65a13095288ab9b9f8135f9.tar.gz
kernel-crypto-15f0a394c6573f4cb65a13095288ab9b9f8135f9.tar.xz
kernel-crypto-15f0a394c6573f4cb65a13095288ab9b9f8135f9.zip
net: Convert ethtool {get_stats, self_test}_count() ops to get_sset_count()
These string query operations were supposed to be replaced by the generic get_sset_count() starting in 2007. Convert the remaining implementations. Also remove calls to these operations to initialise drvinfo->n_stats. The ethtool core code already does that. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/niu.c')
-rw-r--r--drivers/net/niu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index f9364d0678f..1d1e657991d 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -7855,10 +7855,13 @@ static void niu_get_strings(struct net_device *dev, u32 stringset, u8 *data)
}
}
-static int niu_get_stats_count(struct net_device *dev)
+static int niu_get_sset_count(struct net_device *dev, int stringset)
{
struct niu *np = netdev_priv(dev);
+ if (stringset != ETH_SS_STATS)
+ return -EINVAL;
+
return ((np->flags & NIU_FLAGS_XMAC ?
NUM_XMAC_STAT_KEYS :
NUM_BMAC_STAT_KEYS) +
@@ -7978,7 +7981,7 @@ static const struct ethtool_ops niu_ethtool_ops = {
.get_settings = niu_get_settings,
.set_settings = niu_set_settings,
.get_strings = niu_get_strings,
- .get_stats_count = niu_get_stats_count,
+ .get_sset_count = niu_get_sset_count,
.get_ethtool_stats = niu_get_ethtool_stats,
.phys_id = niu_phys_id,
.get_rxnfc = niu_get_nfc,