summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-04 03:07:32 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-11 01:51:45 +0200
commitb9f2c0440d806e01968c3ed4def930a43be248ad (patch)
treeb8e4668b0a4eab842fc33402e92b15f6c63cbc18 /drivers/net/bnx2.c
parent[B44]: port to native ssb support (diff)
downloadlinux-b9f2c0440d806e01968c3ed4def930a43be248ad.tar.xz
linux-b9f2c0440d806e01968c3ed4def930a43be248ad.zip
[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.c20
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 {
};
static int
-bnx2_self_test_count(struct net_device *dev)
+bnx2_get_sset_count(struct net_device *dev, int sset)
{
- return BNX2_NUM_TESTS;
+ switch (sset) {
+ case ETH_SS_TEST:
+ return BNX2_NUM_TESTS;
+ case ETH_SS_STATS:
+ return BNX2_NUM_STATS;
+ default:
+ return -EOPNOTSUPP;
+ }
}
static void
@@ -6144,12 +6151,6 @@ bnx2_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
}
}
-static int
-bnx2_get_stats_count(struct net_device *dev)
-{
- return BNX2_NUM_STATS;
-}
-
static void
bnx2_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *stats, u64 *buf)
@@ -6260,12 +6261,11 @@ static const struct ethtool_ops bnx2_ethtool_ops = {
.set_tx_csum = bnx2_set_tx_csum,
.set_sg = ethtool_op_set_sg,
.set_tso = bnx2_set_tso,
- .self_test_count = bnx2_self_test_count,
.self_test = bnx2_self_test,
.get_strings = bnx2_get_strings,
.phys_id = bnx2_phys_id,
- .get_stats_count = bnx2_get_stats_count,
.get_ethtool_stats = bnx2_get_ethtool_stats,
+ .get_sset_count = bnx2_get_sset_count,
};
/* Called with rtnl_lock */