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/ibm_newemac | |
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/ibm_newemac')
-rw-r--r-- | drivers/net/ibm_newemac/core.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 89c82c5e63e4..0fa21a936d13 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -2145,9 +2145,12 @@ static int emac_ethtool_nway_reset(struct net_device *ndev) | |||
2145 | return res; | 2145 | return res; |
2146 | } | 2146 | } |
2147 | 2147 | ||
2148 | static int emac_ethtool_get_stats_count(struct net_device *ndev) | 2148 | static int emac_ethtool_get_sset_count(struct net_device *ndev, int stringset) |
2149 | { | 2149 | { |
2150 | return EMAC_ETHTOOL_STATS_COUNT; | 2150 | if (stringset == ETH_SS_STATS) |
2151 | return EMAC_ETHTOOL_STATS_COUNT; | ||
2152 | else | ||
2153 | return -EINVAL; | ||
2151 | } | 2154 | } |
2152 | 2155 | ||
2153 | static void emac_ethtool_get_strings(struct net_device *ndev, u32 stringset, | 2156 | static void emac_ethtool_get_strings(struct net_device *ndev, u32 stringset, |
@@ -2178,7 +2181,6 @@ static void emac_ethtool_get_drvinfo(struct net_device *ndev, | |||
2178 | info->fw_version[0] = '\0'; | 2181 | info->fw_version[0] = '\0'; |
2179 | sprintf(info->bus_info, "PPC 4xx EMAC-%d %s", | 2182 | sprintf(info->bus_info, "PPC 4xx EMAC-%d %s", |
2180 | dev->cell_index, dev->ofdev->node->full_name); | 2183 | dev->cell_index, dev->ofdev->node->full_name); |
2181 | info->n_stats = emac_ethtool_get_stats_count(ndev); | ||
2182 | info->regdump_len = emac_ethtool_get_regs_len(ndev); | 2184 | info->regdump_len = emac_ethtool_get_regs_len(ndev); |
2183 | } | 2185 | } |
2184 | 2186 | ||
@@ -2198,7 +2200,7 @@ static const struct ethtool_ops emac_ethtool_ops = { | |||
2198 | .get_rx_csum = emac_ethtool_get_rx_csum, | 2200 | .get_rx_csum = emac_ethtool_get_rx_csum, |
2199 | 2201 | ||
2200 | .get_strings = emac_ethtool_get_strings, | 2202 | .get_strings = emac_ethtool_get_strings, |
2201 | .get_stats_count = emac_ethtool_get_stats_count, | 2203 | .get_sset_count = emac_ethtool_get_sset_count, |
2202 | .get_ethtool_stats = emac_ethtool_get_ethtool_stats, | 2204 | .get_ethtool_stats = emac_ethtool_get_ethtool_stats, |
2203 | 2205 | ||
2204 | .get_link = ethtool_op_get_link, | 2206 | .get_link = ethtool_op_get_link, |