From patchwork Tue Dec 15 16:45:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 41203 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 98D2FB6EFE for ; Wed, 16 Dec 2009 03:52:46 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760574AbZLOQwm (ORCPT ); Tue, 15 Dec 2009 11:52:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760562AbZLOQwl (ORCPT ); Tue, 15 Dec 2009 11:52:41 -0500 Received: from zmc.proxad.net ([212.27.53.206]:58803 "EHLO zmc.proxad.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754503AbZLOQwl (ORCPT ); Tue, 15 Dec 2009 11:52:41 -0500 X-Greylist: delayed 530 seconds by postgrey-1.27 at vger.kernel.org; Tue, 15 Dec 2009 11:52:40 EST Received: from localhost (localhost [127.0.0.1]) by zmc.proxad.net (Postfix) with ESMTP id 47EC03418546; Tue, 15 Dec 2009 17:43:49 +0100 (CET) X-Virus-Scanned: amavisd-new at X-Spam-Flag: NO X-Spam-Score: -3.972 X-Spam-Level: X-Spam-Status: No, score=-3.972 tagged_above=-10 required=2.8 tests=[ALL_TRUSTED=-1.8, AWL=0.427, BAYES_00=-2.599] autolearn=ham Received: from zmc.proxad.net ([127.0.0.1]) by localhost (zmc.proxad.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VkuH2fflmo9r; Tue, 15 Dec 2009 17:43:48 +0100 (CET) Received: from flexo.localnet (bobafett.staff.proxad.net [213.228.1.121]) by zmc.proxad.net (Postfix) with ESMTPSA id B5B5134184A4; Tue, 15 Dec 2009 17:43:48 +0100 (CET) From: Florian Fainelli To: netdev@vger.kernel.org Subject: [PATCH] bcm63xx_enet: fix compilation failure after get_stats_count removal Date: Tue, 15 Dec 2009 17:45:06 +0100 User-Agent: KMail/1.12.2 (Linux/2.6.31-16-server; KDE/4.3.2; x86_64; ; ) Organization: Freebox Cc: stable@kernel.org, David Miller , Maxime Bizon MIME-Version: 1.0 Message-Id: <200912151745.06131.ffainelli@freebox.fr> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi David, This build failure is present in both 2.6.32 and net-next-2.6. Thanks! --- From: Florian Fainelli Subject: [PATCH] bcm63xx_enet: fix compilation failure after get_stats_count removal This patch converts bcm63xx_enet to uset get_sset_count like the other drivers do. Signed-off-by: Florian Fainelli Cc: stable@kernel.org --- diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c index 1f6c548..0bd47d3 100644 --- a/drivers/net/bcm63xx_enet.c +++ b/drivers/net/bcm63xx_enet.c @@ -1245,9 +1245,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, @@ -1473,7 +1479,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,