From: Neil Horman <nhorman@redhat.com> Date: Thu, 28 May 2009 14:42:59 -0400 Subject: [net] sky2: fix sky2 stats Message-id: 20090528184259.GJ21402@file.rdu.redhat.com O-Subject: [RHEL 5.4 PATCH] sky2: Fix sky2 stats (bz 503080) Bugzilla: 503080 RH-Acked-by: David Miller <davem@redhat.com> RH-Acked-by: Andy Gospodarek <gospo@redhat.com> RH-Acked-by: John W. Linville <linville@redhat.com> Hey- As andy noted the other day, sky2 stats are non-functional since 5.3 shipped. This patch fixes those stats. Tested and verified by me. Fixes bz 503080 Neil diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 9a35837..c84630f 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -3293,14 +3293,9 @@ static void sky2_set_msglevel(struct net_device *netdev, u32 value) sky2->msg_enable = value; } -static int sky2_get_sset_count(struct net_device *dev, int sset) +static int sky2_get_sset_count(struct net_device *dev) { - switch (sset) { - case ETH_SS_STATS: - return ARRAY_SIZE(sky2_stats); - default: - return -EOPNOTSUPP; - } + return ARRAY_SIZE(sky2_stats); } static void sky2_get_ethtool_stats(struct net_device *dev, @@ -3866,6 +3861,7 @@ static struct ethtool_ops sky2_ethtool_ops = { .get_pauseparam = sky2_get_pauseparam, .set_pauseparam = sky2_set_pauseparam, .phys_id = sky2_phys_id, + .get_stats_count = sky2_get_sset_count, .get_ethtool_stats = sky2_get_ethtool_stats, };