diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-04 03:07:32 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-11 01:51:45 +0200 |
commit | b9f2c0440d806e01968c3ed4def930a43be248ad (patch) | |
tree | b8e4668b0a4eab842fc33402e92b15f6c63cbc18 /drivers/net/8139cp.c | |
parent | [B44]: port to native ssb support (diff) | |
download | linux-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/8139cp.c')
-rw-r--r-- | drivers/net/8139cp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index 7edd50cf7776..d437823c2c5e 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c @@ -1383,9 +1383,14 @@ static int cp_get_regs_len(struct net_device *dev) return CP_REGS_SIZE; } -static int cp_get_stats_count (struct net_device *dev) +static int cp_get_sset_count (struct net_device *dev, int sset) { - return CP_NUM_STATS; + switch (sset) { + case ETH_SS_STATS: + return CP_NUM_STATS; + default: + return -EOPNOTSUPP; + } } static int cp_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) @@ -1563,7 +1568,7 @@ static void cp_get_ethtool_stats (struct net_device *dev, static const struct ethtool_ops cp_ethtool_ops = { .get_drvinfo = cp_get_drvinfo, .get_regs_len = cp_get_regs_len, - .get_stats_count = cp_get_stats_count, + .get_sset_count = cp_get_sset_count, .get_settings = cp_get_settings, .set_settings = cp_set_settings, .nway_reset = cp_nway_reset, |