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/infiniband | |
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/infiniband')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_nic.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index e593af3354b8..de18fdfdadf2 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c | |||
@@ -1080,11 +1080,14 @@ static int nes_netdev_set_rx_csum(struct net_device *netdev, u32 enable) | |||
1080 | 1080 | ||
1081 | 1081 | ||
1082 | /** | 1082 | /** |
1083 | * nes_netdev_get_stats_count | 1083 | * nes_netdev_get_sset_count |
1084 | */ | 1084 | */ |
1085 | static int nes_netdev_get_stats_count(struct net_device *netdev) | 1085 | static int nes_netdev_get_sset_count(struct net_device *netdev, int stringset) |
1086 | { | 1086 | { |
1087 | return NES_ETHTOOL_STAT_COUNT; | 1087 | if (stringset == ETH_SS_STATS) |
1088 | return NES_ETHTOOL_STAT_COUNT; | ||
1089 | else | ||
1090 | return -EINVAL; | ||
1088 | } | 1091 | } |
1089 | 1092 | ||
1090 | 1093 | ||
@@ -1264,7 +1267,6 @@ static void nes_netdev_get_drvinfo(struct net_device *netdev, | |||
1264 | sprintf(drvinfo->fw_version, "%u.%u", nesadapter->firmware_version>>16, | 1267 | sprintf(drvinfo->fw_version, "%u.%u", nesadapter->firmware_version>>16, |
1265 | nesadapter->firmware_version & 0x000000ff); | 1268 | nesadapter->firmware_version & 0x000000ff); |
1266 | strcpy(drvinfo->version, DRV_VERSION); | 1269 | strcpy(drvinfo->version, DRV_VERSION); |
1267 | drvinfo->n_stats = nes_netdev_get_stats_count(netdev); | ||
1268 | drvinfo->testinfo_len = 0; | 1270 | drvinfo->testinfo_len = 0; |
1269 | drvinfo->eedump_len = 0; | 1271 | drvinfo->eedump_len = 0; |
1270 | drvinfo->regdump_len = 0; | 1272 | drvinfo->regdump_len = 0; |
@@ -1516,7 +1518,7 @@ static const struct ethtool_ops nes_ethtool_ops = { | |||
1516 | .get_rx_csum = nes_netdev_get_rx_csum, | 1518 | .get_rx_csum = nes_netdev_get_rx_csum, |
1517 | .get_sg = ethtool_op_get_sg, | 1519 | .get_sg = ethtool_op_get_sg, |
1518 | .get_strings = nes_netdev_get_strings, | 1520 | .get_strings = nes_netdev_get_strings, |
1519 | .get_stats_count = nes_netdev_get_stats_count, | 1521 | .get_sset_count = nes_netdev_get_sset_count, |
1520 | .get_ethtool_stats = nes_netdev_get_ethtool_stats, | 1522 | .get_ethtool_stats = nes_netdev_get_ethtool_stats, |
1521 | .get_drvinfo = nes_netdev_get_drvinfo, | 1523 | .get_drvinfo = nes_netdev_get_drvinfo, |
1522 | .get_coalesce = nes_netdev_get_coalesce, | 1524 | .get_coalesce = nes_netdev_get_coalesce, |