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: 174275 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 E4A572C008C for ; Wed, 1 Aug 2012 01:55:25 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755368Ab2GaPzT (ORCPT ); Tue, 31 Jul 2012 11:55:19 -0400 Received: from ducie-dc1.codethink.co.uk ([37.128.190.40]:59916 "EHLO ducie-dc1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755227Ab2GaPzN (ORCPT ); Tue, 31 Jul 2012 11:55:13 -0400 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 Cc: andrew@lunn.ch, thomas.petazzoni@free-electrons.com, ben.dooks@codethink.co.uk, arnd@arndb.de, netdev@vger.kernel.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> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.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; }