diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-10-01 07:58:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-05 03:10:10 -0400 |
commit | 15f0a394c6573f4cb65a13095288ab9b9f8135f9 (patch) | |
tree | 211fe96826513a68a107feb9850817b9c4b2c8d1 /drivers/net/niu.c | |
parent | 1ddee09ff0420090d5b03ef3f9eba0e4db647035 (diff) |
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.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index f9364d0678f2..1d1e657991d2 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) | |||
7855 | } | 7855 | } |
7856 | } | 7856 | } |
7857 | 7857 | ||
7858 | static int niu_get_stats_count(struct net_device *dev) | 7858 | static int niu_get_sset_count(struct net_device *dev, int stringset) |
7859 | { | 7859 | { |
7860 | struct niu *np = netdev_priv(dev); | 7860 | struct niu *np = netdev_priv(dev); |
7861 | 7861 | ||
7862 | if (stringset != ETH_SS_STATS) | ||
7863 | return -EINVAL; | ||
7864 | |||
7862 | return ((np->flags & NIU_FLAGS_XMAC ? | 7865 | return ((np->flags & NIU_FLAGS_XMAC ? |
7863 | NUM_XMAC_STAT_KEYS : | 7866 | NUM_XMAC_STAT_KEYS : |
7864 | NUM_BMAC_STAT_KEYS) + | 7867 | NUM_BMAC_STAT_KEYS) + |
@@ -7978,7 +7981,7 @@ static const struct ethtool_ops niu_ethtool_ops = { | |||
7978 | .get_settings = niu_get_settings, | 7981 | .get_settings = niu_get_settings, |
7979 | .set_settings = niu_set_settings, | 7982 | .set_settings = niu_set_settings, |
7980 | .get_strings = niu_get_strings, | 7983 | .get_strings = niu_get_strings, |
7981 | .get_stats_count = niu_get_stats_count, | 7984 | .get_sset_count = niu_get_sset_count, |
7982 | .get_ethtool_stats = niu_get_ethtool_stats, | 7985 | .get_ethtool_stats = niu_get_ethtool_stats, |
7983 | .phys_id = niu_phys_id, | 7986 | .phys_id = niu_phys_id, |
7984 | .get_rxnfc = niu_get_nfc, | 7987 | .get_rxnfc = niu_get_nfc, |