From patchwork Mon Jul 30 15:15:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Molton X-Patchwork-Id: 1255051 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 3F0473FDCA for ; Mon, 30 Jul 2012 15:23:51 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Svrjg-0001az-6h; Mon, 30 Jul 2012 15:18:20 +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 1SvriC-0001YA-HC for linux-arm-kernel@lists.infradead.org; Mon, 30 Jul 2012 15:16:49 +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 689534607C5; Mon, 30 Jul 2012 16:16:45 +0100 (BST) From: Ian Molton To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/6] mv643xx.c: Remove magic numbers. Date: Mon, 30 Jul 2012 16:15:55 +0100 Message-Id: <1343661359-10150-3-git-send-email-ian.molton@codethink.co.uk> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343661359-10150-1-git-send-email-ian.molton@codethink.co.uk> References: <1343661359-10150-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, Ian Molton , arnd@arndb.de 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; }