diff options
Diffstat (limited to 'drivers/net/gianfar_ethtool.c')
-rw-r--r-- | drivers/net/gianfar_ethtool.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c index 2470903fbc74..6007147cc1e9 100644 --- a/drivers/net/gianfar_ethtool.c +++ b/drivers/net/gianfar_ethtool.c | |||
@@ -152,15 +152,19 @@ static void gfar_fill_stats(struct net_device *dev, struct ethtool_stats *dummy, | |||
152 | buf[i] = extra[i]; | 152 | buf[i] = extra[i]; |
153 | } | 153 | } |
154 | 154 | ||
155 | /* Returns the number of stats (and their corresponding strings) */ | 155 | static int gfar_sset_count(struct net_device *dev, int sset) |
156 | static int gfar_stats_count(struct net_device *dev) | ||
157 | { | 156 | { |
158 | struct gfar_private *priv = netdev_priv(dev); | 157 | struct gfar_private *priv = netdev_priv(dev); |
159 | 158 | ||
160 | if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_RMON) | 159 | switch (sset) { |
161 | return GFAR_STATS_LEN; | 160 | case ETH_SS_STATS: |
162 | else | 161 | if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_RMON) |
163 | return GFAR_EXTRA_STATS_LEN; | 162 | return GFAR_STATS_LEN; |
163 | else | ||
164 | return GFAR_EXTRA_STATS_LEN; | ||
165 | default: | ||
166 | return -EOPNOTSUPP; | ||
167 | } | ||
164 | } | 168 | } |
165 | 169 | ||
166 | /* Fills in the drvinfo structure with some basic info */ | 170 | /* Fills in the drvinfo structure with some basic info */ |
@@ -171,8 +175,6 @@ static void gfar_gdrvinfo(struct net_device *dev, struct | |||
171 | strncpy(drvinfo->version, gfar_driver_version, GFAR_INFOSTR_LEN); | 175 | strncpy(drvinfo->version, gfar_driver_version, GFAR_INFOSTR_LEN); |
172 | strncpy(drvinfo->fw_version, "N/A", GFAR_INFOSTR_LEN); | 176 | strncpy(drvinfo->fw_version, "N/A", GFAR_INFOSTR_LEN); |
173 | strncpy(drvinfo->bus_info, "N/A", GFAR_INFOSTR_LEN); | 177 | strncpy(drvinfo->bus_info, "N/A", GFAR_INFOSTR_LEN); |
174 | drvinfo->n_stats = GFAR_STATS_LEN; | ||
175 | drvinfo->testinfo_len = 0; | ||
176 | drvinfo->regdump_len = 0; | 178 | drvinfo->regdump_len = 0; |
177 | drvinfo->eedump_len = 0; | 179 | drvinfo->eedump_len = 0; |
178 | } | 180 | } |
@@ -575,7 +577,7 @@ const struct ethtool_ops gfar_ethtool_ops = { | |||
575 | .get_ringparam = gfar_gringparam, | 577 | .get_ringparam = gfar_gringparam, |
576 | .set_ringparam = gfar_sringparam, | 578 | .set_ringparam = gfar_sringparam, |
577 | .get_strings = gfar_gstrings, | 579 | .get_strings = gfar_gstrings, |
578 | .get_stats_count = gfar_stats_count, | 580 | .get_sset_count = gfar_sset_count, |
579 | .get_ethtool_stats = gfar_fill_stats, | 581 | .get_ethtool_stats = gfar_fill_stats, |
580 | .get_rx_csum = gfar_get_rx_csum, | 582 | .get_rx_csum = gfar_get_rx_csum, |
581 | .get_tx_csum = gfar_get_tx_csum, | 583 | .get_tx_csum = gfar_get_tx_csum, |