aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e100.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-03 21:07:32 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:45 -0400
commitb9f2c0440d806e01968c3ed4def930a43be248ad (patch)
treeb8e4668b0a4eab842fc33402e92b15f6c63cbc18 /drivers/net/e100.c
parent753f492093da7a40141bfe083073400f518f4c68 (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/e100.c')
-rw-r--r--drivers/net/e100.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 720994b1e13a..7bd960402687 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2374,11 +2374,6 @@ static const char e100_gstrings_test[][ETH_GSTRING_LEN] = {
2374}; 2374};
2375#define E100_TEST_LEN sizeof(e100_gstrings_test) / ETH_GSTRING_LEN 2375#define E100_TEST_LEN sizeof(e100_gstrings_test) / ETH_GSTRING_LEN
2376 2376
2377static int e100_diag_test_count(struct net_device *netdev)
2378{
2379 return E100_TEST_LEN;
2380}
2381
2382static void e100_diag_test(struct net_device *netdev, 2377static void e100_diag_test(struct net_device *netdev,
2383 struct ethtool_test *test, u64 *data) 2378 struct ethtool_test *test, u64 *data)
2384{ 2379{
@@ -2441,9 +2436,16 @@ static const char e100_gstrings_stats[][ETH_GSTRING_LEN] = {
2441#define E100_NET_STATS_LEN 21 2436#define E100_NET_STATS_LEN 21
2442#define E100_STATS_LEN sizeof(e100_gstrings_stats) / ETH_GSTRING_LEN 2437#define E100_STATS_LEN sizeof(e100_gstrings_stats) / ETH_GSTRING_LEN
2443 2438
2444static int e100_get_stats_count(struct net_device *netdev) 2439static int e100_get_sset_count(struct net_device *netdev, int sset)
2445{ 2440{
2446 return E100_STATS_LEN; 2441 switch (sset) {
2442 case ETH_SS_TEST:
2443 return E100_TEST_LEN;
2444 case ETH_SS_STATS:
2445 return E100_STATS_LEN;
2446 default:
2447 return -EOPNOTSUPP;
2448 }
2447} 2449}
2448 2450
2449static void e100_get_ethtool_stats(struct net_device *netdev, 2451static void e100_get_ethtool_stats(struct net_device *netdev,
@@ -2494,12 +2496,11 @@ static const struct ethtool_ops e100_ethtool_ops = {
2494 .set_eeprom = e100_set_eeprom, 2496 .set_eeprom = e100_set_eeprom,
2495 .get_ringparam = e100_get_ringparam, 2497 .get_ringparam = e100_get_ringparam,
2496 .set_ringparam = e100_set_ringparam, 2498 .set_ringparam = e100_set_ringparam,
2497 .self_test_count = e100_diag_test_count,
2498 .self_test = e100_diag_test, 2499 .self_test = e100_diag_test,
2499 .get_strings = e100_get_strings, 2500 .get_strings = e100_get_strings,
2500 .phys_id = e100_phys_id, 2501 .phys_id = e100_phys_id,
2501 .get_stats_count = e100_get_stats_count,
2502 .get_ethtool_stats = e100_get_ethtool_stats, 2502 .get_ethtool_stats = e100_get_ethtool_stats,
2503 .get_sset_count = e100_get_sset_count,
2503}; 2504};
2504 2505
2505static int e100_do_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) 2506static int e100_do_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)