From patchwork Tue Jul 31 15:45:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Molton X-Patchwork-Id: 1261271 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id E50FE3FC71 for ; Tue, 31 Jul 2012 17:23:45 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SwG7N-0000OK-KQ; Tue, 31 Jul 2012 17:20:26 +0000 Received: from ducie-dc1.codethink.co.uk ([37.128.190.40]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SwEdh-0008VV-8v for linux-arm-kernel@lists.infradead.org; Tue, 31 Jul 2012 15:45:41 +0000 Received: from snark.dyn.ducie.codethink.co.uk (snark.dyn.ducie.codethink.co.uk [192.168.24.147]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTPA id 28633460A08; Tue, 31 Jul 2012 16:45:38 +0100 (BST) From: Ian Molton To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/6] mv643xx.c: Remove magic numbers. Date: Tue, 31 Jul 2012 16:45:25 +0100 Message-Id: <1343749529-17571-3-git-send-email-ian.molton@codethink.co.uk> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343749529-17571-1-git-send-email-ian.molton@codethink.co.uk> References: <1343749529-17571-1-git-send-email-ian.molton@codethink.co.uk> X-Spam-Note: CRM114 invocation failed X-Spam-Note: SpamAssassin invocation failed Cc: thomas.petazzoni@free-electrons.com, andrew@lunn.ch, ben.dooks@codethink.co.uk, arnd@arndb.de, netdev@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org replace magic number with RX_CSUM_WITH_HEADER. Signed-off-by: Ian Molton --- drivers/net/ethernet/marvell/mv643xx_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 4fbba57..92497eb 100644 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c @@ -86,6 +86,7 @@ static char mv643xx_eth_driver_version[] = "1.4"; * port #0, 0x0800 for port #1, and 0x0c00 for port #2. */ #define PORT_CONFIG 0x0000 +#define RX_CSUM_WITH_HEADER 0x02000000 #define UNICAST_PROMISCUOUS_MODE 0x00000001 #define PORT_CONFIG_EXT 0x0004 #define MAC_ADDR_LOW 0x0014 @@ -1607,7 +1608,7 @@ mv643xx_eth_set_features(struct net_device *dev, netdev_features_t features) struct mv643xx_eth_private *mp = netdev_priv(dev); bool rx_csum = features & NETIF_F_RXCSUM; - wrlp(mp, PORT_CONFIG, rx_csum ? 0x02000000 : 0x00000000); + wrlp(mp, PORT_CONFIG, rx_csum ? RX_CSUM_WITH_HEADER : 0x00000000); return 0; }