aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tc35815.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/tc35815.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/tc35815.c')
-rw-r--r--drivers/net/tc35815.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index df8237360f58..a679f4310ce1 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -2162,10 +2162,16 @@ static void tc35815_set_msglevel(struct net_device *dev, u32 datum)
2162 lp->msg_enable = datum; 2162 lp->msg_enable = datum;
2163} 2163}
2164 2164
2165static int tc35815_get_stats_count(struct net_device *dev) 2165static int tc35815_get_sset_count(struct net_device *dev, int sset)
2166{ 2166{
2167 struct tc35815_local *lp = dev->priv; 2167 struct tc35815_local *lp = dev->priv;
2168 return sizeof(lp->lstats) / sizeof(int); 2168
2169 switch (sset) {
2170 case ETH_SS_STATS:
2171 return sizeof(lp->lstats) / sizeof(int);
2172 default:
2173 return -EOPNOTSUPP;
2174 }
2169} 2175}
2170 2176
2171static void tc35815_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) 2177static void tc35815_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data)
@@ -2200,7 +2206,7 @@ static const struct ethtool_ops tc35815_ethtool_ops = {
2200 .get_msglevel = tc35815_get_msglevel, 2206 .get_msglevel = tc35815_get_msglevel,
2201 .set_msglevel = tc35815_set_msglevel, 2207 .set_msglevel = tc35815_set_msglevel,
2202 .get_strings = tc35815_get_strings, 2208 .get_strings = tc35815_get_strings,
2203 .get_stats_count = tc35815_get_stats_count, 2209 .get_sset_count = tc35815_get_sset_count,
2204 .get_ethtool_stats = tc35815_get_ethtool_stats, 2210 .get_ethtool_stats = tc35815_get_ethtool_stats,
2205}; 2211};
2206 2212