diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-03 21:07:32 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:45 -0400 |
commit | b9f2c0440d806e01968c3ed4def930a43be248ad (patch) | |
tree | b8e4668b0a4eab842fc33402e92b15f6c63cbc18 /drivers/net/bnx2.c | |
parent | 753f492093da7a40141bfe083073400f518f4c68 (diff) |
[netdrvr] Stop using legacy hooks ->self_test_count, ->get_stats_count
These have been superceded by the new ->get_sset_count() hook.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index ee9aed3aa489..57f7d994c9c1 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -6068,9 +6068,16 @@ static struct { | |||
6068 | }; | 6068 | }; |
6069 | 6069 | ||
6070 | static int | 6070 | static int |
6071 | bnx2_self_test_count(struct net_device *dev) | 6071 | bnx2_get_sset_count(struct net_device *dev, int sset) |
6072 | { | 6072 | { |
6073 | return BNX2_NUM_TESTS; | 6073 | switch (sset) { |
6074 | case ETH_SS_TEST: | ||
6075 | return BNX2_NUM_TESTS; | ||
6076 | case ETH_SS_STATS: | ||
6077 | return BNX2_NUM_STATS; | ||
6078 | default: | ||
6079 | return -EOPNOTSUPP; | ||
6080 | } | ||
6074 | } | 6081 | } |
6075 | 6082 | ||
6076 | static void | 6083 | static void |
@@ -6144,12 +6151,6 @@ bnx2_get_strings(struct net_device *dev, u32 stringset, u8 *buf) | |||
6144 | } | 6151 | } |
6145 | } | 6152 | } |
6146 | 6153 | ||
6147 | static int | ||
6148 | bnx2_get_stats_count(struct net_device *dev) | ||
6149 | { | ||
6150 | return BNX2_NUM_STATS; | ||
6151 | } | ||
6152 | |||
6153 | static void | 6154 | static void |
6154 | bnx2_get_ethtool_stats(struct net_device *dev, | 6155 | bnx2_get_ethtool_stats(struct net_device *dev, |
6155 | struct ethtool_stats *stats, u64 *buf) | 6156 | struct ethtool_stats *stats, u64 *buf) |
@@ -6260,12 +6261,11 @@ static const struct ethtool_ops bnx2_ethtool_ops = { | |||
6260 | .set_tx_csum = bnx2_set_tx_csum, | 6261 | .set_tx_csum = bnx2_set_tx_csum, |
6261 | .set_sg = ethtool_op_set_sg, | 6262 | .set_sg = ethtool_op_set_sg, |
6262 | .set_tso = bnx2_set_tso, | 6263 | .set_tso = bnx2_set_tso, |
6263 | .self_test_count = bnx2_self_test_count, | ||
6264 | .self_test = bnx2_self_test, | 6264 | .self_test = bnx2_self_test, |
6265 | .get_strings = bnx2_get_strings, | 6265 | .get_strings = bnx2_get_strings, |
6266 | .phys_id = bnx2_phys_id, | 6266 | .phys_id = bnx2_phys_id, |
6267 | .get_stats_count = bnx2_get_stats_count, | ||
6268 | .get_ethtool_stats = bnx2_get_ethtool_stats, | 6267 | .get_ethtool_stats = bnx2_get_ethtool_stats, |
6268 | .get_sset_count = bnx2_get_sset_count, | ||
6269 | }; | 6269 | }; |
6270 | 6270 | ||
6271 | /* Called with rtnl_lock */ | 6271 | /* Called with rtnl_lock */ |