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/ibm_emac | |
| 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/ibm_emac')
| -rw-r--r-- | drivers/net/ibm_emac/ibm_emac_core.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c index 7d4fa7644e..73664f226f 100644 --- a/drivers/net/ibm_emac/ibm_emac_core.c +++ b/drivers/net/ibm_emac/ibm_emac_core.c | |||
| @@ -1842,9 +1842,14 @@ static int emac_ethtool_nway_reset(struct net_device *ndev) | |||
| 1842 | return res; | 1842 | return res; |
| 1843 | } | 1843 | } |
| 1844 | 1844 | ||
| 1845 | static int emac_ethtool_get_stats_count(struct net_device *ndev) | 1845 | static int emac_get_sset_count(struct net_device *ndev, int sset) |
| 1846 | { | 1846 | { |
| 1847 | return EMAC_ETHTOOL_STATS_COUNT; | 1847 | switch (sset) { |
| 1848 | case ETH_SS_STATS: | ||
| 1849 | return EMAC_ETHTOOL_STATS_COUNT; | ||
| 1850 | default: | ||
| 1851 | return -EOPNOTSUPP; | ||
| 1852 | } | ||
| 1848 | } | 1853 | } |
| 1849 | 1854 | ||
| 1850 | static void emac_ethtool_get_strings(struct net_device *ndev, u32 stringset, | 1855 | static void emac_ethtool_get_strings(struct net_device *ndev, u32 stringset, |
| @@ -1875,7 +1880,6 @@ static void emac_ethtool_get_drvinfo(struct net_device *ndev, | |||
| 1875 | strcpy(info->version, DRV_VERSION); | 1880 | strcpy(info->version, DRV_VERSION); |
| 1876 | info->fw_version[0] = '\0'; | 1881 | info->fw_version[0] = '\0'; |
| 1877 | sprintf(info->bus_info, "PPC 4xx EMAC %d", dev->def->index); | 1882 | sprintf(info->bus_info, "PPC 4xx EMAC %d", dev->def->index); |
| 1878 | info->n_stats = emac_ethtool_get_stats_count(ndev); | ||
| 1879 | info->regdump_len = emac_ethtool_get_regs_len(ndev); | 1883 | info->regdump_len = emac_ethtool_get_regs_len(ndev); |
| 1880 | } | 1884 | } |
| 1881 | 1885 | ||
| @@ -1895,7 +1899,7 @@ static const struct ethtool_ops emac_ethtool_ops = { | |||
| 1895 | .get_rx_csum = emac_ethtool_get_rx_csum, | 1899 | .get_rx_csum = emac_ethtool_get_rx_csum, |
| 1896 | 1900 | ||
| 1897 | .get_strings = emac_ethtool_get_strings, | 1901 | .get_strings = emac_ethtool_get_strings, |
| 1898 | .get_stats_count = emac_ethtool_get_stats_count, | 1902 | .get_sset_count = emac_get_sset_count, |
| 1899 | .get_ethtool_stats = emac_ethtool_get_ethtool_stats, | 1903 | .get_ethtool_stats = emac_ethtool_get_ethtool_stats, |
| 1900 | 1904 | ||
| 1901 | .get_link = ethtool_op_get_link, | 1905 | .get_link = ethtool_op_get_link, |
