From patchwork Mon May 19 16:59:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 350341 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 15B8814008B for ; Tue, 20 May 2014 03:01:29 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964794AbaESRBU (ORCPT ); Mon, 19 May 2014 13:01:20 -0400 Received: from top.free-electrons.com ([176.31.233.9]:53622 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932389AbaESRBR (ORCPT ); Mon, 19 May 2014 13:01:17 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id 2193195F; Mon, 19 May 2014 19:01:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.2 Received: from localhost.localdomain (unknown [190.2.108.30]) by mail.free-electrons.com (Postfix) with ESMTPSA id D28A57EB; Mon, 19 May 2014 19:01:17 +0200 (CEST) From: Ezequiel Garcia To: , David Miller , Eric Dumazet Cc: Willy Tarreau , Thomas Petazzoni , Gregory Clement , Sebastian Hesselbarth , Tawfik Bayouk , Lior Amsalem , Ezequiel Garcia Subject: [PATCH 7/9] net: mv643xx_eth: Factorize feature setting Date: Mon, 19 May 2014 13:59:58 -0300 Message-Id: <1400518800-6111-8-git-send-email-ezequiel.garcia@free-electrons.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1400518800-6111-1-git-send-email-ezequiel.garcia@free-electrons.com> References: <1400518800-6111-1-git-send-email-ezequiel.garcia@free-electrons.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In order to ease the addition of new features, let's factorize the feature list. Signed-off-by: Ezequiel Garcia --- drivers/net/ethernet/marvell/mv643xx_eth.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 5ad19d2..01fde2c 100644 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c @@ -2941,9 +2941,11 @@ static int mv643xx_eth_probe(struct platform_device *pdev) dev->watchdog_timeo = 2 * HZ; dev->base_addr = 0; - dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM; - dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM; - dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM; + dev->features = NETIF_F_SG | NETIF_F_IP_CSUM; + dev->vlan_features = dev->features; + + dev->features |= NETIF_F_RXCSUM; + dev->hw_features = dev->features; dev->priv_flags |= IFF_UNICAST_FLT;