[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>
This commit is contained in:
committed by
David S. Miller
parent
753f492093
commit
b9f2c0440d
@@ -2374,11 +2374,6 @@ static const char e100_gstrings_test[][ETH_GSTRING_LEN] = {
|
||||
};
|
||||
#define E100_TEST_LEN sizeof(e100_gstrings_test) / ETH_GSTRING_LEN
|
||||
|
||||
static int e100_diag_test_count(struct net_device *netdev)
|
||||
{
|
||||
return E100_TEST_LEN;
|
||||
}
|
||||
|
||||
static void e100_diag_test(struct net_device *netdev,
|
||||
struct ethtool_test *test, u64 *data)
|
||||
{
|
||||
@@ -2441,9 +2436,16 @@ static const char e100_gstrings_stats[][ETH_GSTRING_LEN] = {
|
||||
#define E100_NET_STATS_LEN 21
|
||||
#define E100_STATS_LEN sizeof(e100_gstrings_stats) / ETH_GSTRING_LEN
|
||||
|
||||
static int e100_get_stats_count(struct net_device *netdev)
|
||||
static int e100_get_sset_count(struct net_device *netdev, int sset)
|
||||
{
|
||||
return E100_STATS_LEN;
|
||||
switch (sset) {
|
||||
case ETH_SS_TEST:
|
||||
return E100_TEST_LEN;
|
||||
case ETH_SS_STATS:
|
||||
return E100_STATS_LEN;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
}
|
||||
|
||||
static void e100_get_ethtool_stats(struct net_device *netdev,
|
||||
@@ -2494,12 +2496,11 @@ static const struct ethtool_ops e100_ethtool_ops = {
|
||||
.set_eeprom = e100_set_eeprom,
|
||||
.get_ringparam = e100_get_ringparam,
|
||||
.set_ringparam = e100_set_ringparam,
|
||||
.self_test_count = e100_diag_test_count,
|
||||
.self_test = e100_diag_test,
|
||||
.get_strings = e100_get_strings,
|
||||
.phys_id = e100_phys_id,
|
||||
.get_stats_count = e100_get_stats_count,
|
||||
.get_ethtool_stats = e100_get_ethtool_stats,
|
||||
.get_sset_count = e100_get_sset_count,
|
||||
};
|
||||
|
||||
static int e100_do_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
|
||||
|
Reference in New Issue
Block a user