Received: from milmhbs1.lsil.com (147.145.21.209) by coscas01.lsi.com
 (172.21.36.60) with Microsoft SMTP Server id 8.1.393.1; Thu, 7 Jan 2010
 12:06:46 -0700
Received: from mail2.lsil.com (mail2.lsil.com [147.145.40.22])	by
 milmhbs1.lsil.com (8.12.11/8.12.11) with ESMTP id o07J6d8p017913	for
 <andy.sharp@lsi.com>; Thu, 7 Jan 2010 11:06:46 -0800
Received: from psmtp.com (na3sys009amx178.postini.com [74.125.149.159])	by
 mail2.lsil.com (8.12.11/8.12.11) with SMTP id o07J272b008071	for
 <andy.sharp@lsi.com>; Thu, 7 Jan 2010 11:02:08 -0800 (PST)
Received: from source ([78.24.191.182]) by na3sys009amx178.postini.com
 ([74.125.148.14]) with SMTP;	Thu, 07 Jan 2010 14:06:37 EST
Received: from localhost.localdomain ([127.0.0.1]:39175 "EHLO
        eddie.linux-mips.org" rhost-flags-OK-OK-OK-FAIL)        by
 eddie.linux-mips.org with ESMTP id S1492584Ab0AGTG1 (ORCPT
        <rfc822;andy.sharp@lsi.com>); Thu, 7 Jan 2010 20:06:27 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Jan 2010 20:06:08
 +0100 (CET)
Received: from mail3.caviumnetworks.com ([12.108.191.235]:17181 "EHLO
        mail3.caviumnetworks.com" rhost-flags-OK-OK-OK-OK)        by
 eddie.linux-mips.org with ESMTP id S1492464Ab0AGTGD (ORCPT
        <rfc822;linux-mips@linux-mips.org>); Thu, 7 Jan 2010 20:06:03 +0100
Received: from caexch01.caveonetworks.com (Not Verified[192.168.16.9]) by
 mail3.caviumnetworks.com with MailMarshal (v6,5,4,7535)        id
 <B4b4630710000>; Thu, 07 Jan 2010 11:05:25 -0800
Received: from caexch01.caveonetworks.com ([192.168.16.9]) by
 caexch01.caveonetworks.com with Microsoft SMTPSVC(6.0.3790.3959);
         Thu, 7 Jan 2010 11:05:11 -0800
Received: from dd1.caveonetworks.com ([12.108.191.236]) by
 caexch01.caveonetworks.com over TLS secured channel with Microsoft
 SMTPSVC(6.0.3790.3959);         Thu, 7 Jan 2010 11:05:10 -0800
Received: from dd1.caveonetworks.com (localhost.localdomain [127.0.0.1])
        by dd1.caveonetworks.com (8.14.2/8.14.2) with ESMTP id o07J58Yw032196;
        Thu, 7 Jan 2010 11:05:08 -0800
Received: (from ddaney@localhost)        by dd1.caveonetworks.com
 (8.14.2/8.14.2/Submit) id o07J58Vl032195;        Thu, 7 Jan 2010 11:05:08
 -0800
From: David Daney <ddaney@caviumnetworks.com>
To: "ralf@linux-mips.org" <ralf@linux-mips.org>, "linux-mips@linux-mips.org"
	<linux-mips@linux-mips.org>, "netdev@vger.kernel.org"
	<netdev@vger.kernel.org>, "gregkh@suse.de" <gregkh@suse.de>
CC: David Daney <ddaney@caviumnetworks.com>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Thu, 7 Jan 2010 12:05:06 -0700
Subject: [PATCH 7/7] Staging: Octeon Ethernet: Use constants from in.h
Thread-Topic: [PATCH 7/7] Staging: Octeon Ethernet: Use constants from in.h
Thread-Index: AcqPzI8D/MIYULYnQQyWkAMh01JJ2A==
Message-ID: <1262891106-32146-7-git-send-email-ddaney@caviumnetworks.com>
References: <4B463005.8060505@caviumnetworks.com>
In-Reply-To: <4B463005.8060505@caviumnetworks.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-AuthSource: coscas01.lsi.com
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-scanned-by: MIMEDefang 2.39
errors-to: linux-mips-bounce@linux-mips.org
x-originalarrivaltime: 07 Jan 2010 19:05:10.0859 (UTC)
 FILETIME=[55C589B0:01CA8FCC]
x-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390
 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
x-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c 
x-pstn-addresses: from <ddaney@caviumnetworks.com> [22/1] 
x-pstn-neptune: 0/0/0.00/0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 drivers/staging/octeon/ethernet-defines.h |    3 ---
 drivers/staging/octeon/ethernet-tx.c      |    8 ++++----
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-defines.h b/drivers/staging/oc=
teon/ethernet-defines.h
index 9c4910e..00a8561 100644
--- a/drivers/staging/octeon/ethernet-defines.h
+++ b/drivers/staging/octeon/ethernet-defines.h
@@ -98,9 +98,6 @@
 #define MAX_SKB_TO_FREE 10
 #define MAX_OUT_QUEUE_DEPTH 1000
=20
-#define IP_PROTOCOL_TCP             6
-#define IP_PROTOCOL_UDP             0x11
-
 #define FAU_NUM_PACKET_BUFFERS_TO_FREE (CVMX_FAU_REG_END - sizeof(uint32_t=
))
 #define TOTAL_NUMBER_OF_PORTS       (CVMX_PIP_NUM_INPUT_PORTS+1)
=20
diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/=
ethernet-tx.c
index bc67e41..62258bd 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -359,8 +359,8 @@ dont_put_skbuff_in_hw:
 	if (USE_HW_TCPUDP_CHECKSUM && (skb->protocol =3D=3D htons(ETH_P_IP)) &&
 	    (ip_hdr(skb)->version =3D=3D 4) && (ip_hdr(skb)->ihl =3D=3D 5) &&
 	    ((ip_hdr(skb)->frag_off =3D=3D 0) || (ip_hdr(skb)->frag_off =3D=3D 1 =
<< 14))
-	    && ((ip_hdr(skb)->protocol =3D=3D IP_PROTOCOL_TCP)
-		|| (ip_hdr(skb)->protocol =3D=3D IP_PROTOCOL_UDP))) {
+	    && ((ip_hdr(skb)->protocol =3D=3D IPPROTO_TCP)
+		|| (ip_hdr(skb)->protocol =3D=3D IPPROTO_UDP))) {
 		/* Use hardware checksum calc */
 		pko_command.s.ipoffp1 =3D sizeof(struct ethhdr) + 1;
 	}
@@ -550,8 +550,8 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_de=
vice *dev)
 		work->word2.s.dec_ipcomp =3D 0;	/* FIXME */
 #endif
 		work->word2.s.tcp_or_udp =3D
-		    (ip_hdr(skb)->protocol =3D=3D IP_PROTOCOL_TCP)
-		    || (ip_hdr(skb)->protocol =3D=3D IP_PROTOCOL_UDP);
+		    (ip_hdr(skb)->protocol =3D=3D IPPROTO_TCP)
+		    || (ip_hdr(skb)->protocol =3D=3D IPPROTO_UDP);
 #if 0
 		/* FIXME */
 		work->word2.s.dec_ipsec =3D 0;
--=20
1.6.0.6


