bcm63xx_enet: fix compilation failure after get_stats_count removal
authorFlorian Fainelli <ffainelli@freebox.fr>
Tue, 15 Dec 2009 06:45:06 +0000 (06:45 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 22:05:43 +0000 (14:05 -0800)
commit a3f92eea04101d9a8e14d50f8048cc5b7bca07a8 upstream.

This patch converts bcm63xx_enet to uset get_sset_count
like the other drivers do.

Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/bcm63xx_enet.c

index ba29dc319b34860b651696b929b8af908b0b8428..d110c1b978a5e0cd3e66b03df5cf85137676cba8 100644 (file)
@@ -1248,9 +1248,15 @@ static void bcm_enet_get_drvinfo(struct net_device *netdev,
        drvinfo->n_stats = BCM_ENET_STATS_LEN;
 }
 
-static int bcm_enet_get_stats_count(struct net_device *netdev)
+static int bcm_enet_get_sset_count(struct net_device *netdev,
+                                       int string_set)
 {
-       return BCM_ENET_STATS_LEN;
+       switch (string_set) {
+       case ETH_SS_STATS:
+               return BCM_ENET_STATS_LEN;
+       default:
+               return -EINVAL;
+       }
 }
 
 static void bcm_enet_get_strings(struct net_device *netdev,
@@ -1476,7 +1482,7 @@ static int bcm_enet_set_pauseparam(struct net_device *dev,
 
 static struct ethtool_ops bcm_enet_ethtool_ops = {
        .get_strings            = bcm_enet_get_strings,
-       .get_stats_count        = bcm_enet_get_stats_count,
+       .get_sset_count         = bcm_enet_get_sset_count,
        .get_ethtool_stats      = bcm_enet_get_ethtool_stats,
        .get_settings           = bcm_enet_get_settings,
        .set_settings           = bcm_enet_set_settings,