aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2010-01-07 14:05:06 -0500
committerRalf Baechle <ralf@linux-mips.org>2010-02-27 06:53:09 -0500
commit081f6749ae33f72b4fafea4c02976e163ef6ef37 (patch)
tree3bc1bbb977c1946cd4082f78c0302fce0eb7e81b /drivers/staging/octeon
parent924cc2680fbe181066ec138d369691d28d913ea2 (diff)
Staging: Octeon Ethernet: Use constants from in.h
Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org To: gregkh@suse.de Patchwork: http://patchwork.linux-mips.org/patch/837/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'drivers/staging/octeon')
-rw-r--r--drivers/staging/octeon/ethernet-defines.h3
-rw-r--r--drivers/staging/octeon/ethernet-tx.c8
2 files changed, 4 insertions, 7 deletions
diff --git a/drivers/staging/octeon/ethernet-defines.h b/drivers/staging/octeon/ethernet-defines.h
index 9c4910e45d2..00a8561726b 100644
--- a/drivers/staging/octeon/ethernet-defines.h
+++ b/drivers/staging/octeon/ethernet-defines.h
@@ -98,9 +98,6 @@
98#define MAX_SKB_TO_FREE 10 98#define MAX_SKB_TO_FREE 10
99#define MAX_OUT_QUEUE_DEPTH 1000 99#define MAX_OUT_QUEUE_DEPTH 1000
100 100
101#define IP_PROTOCOL_TCP 6
102#define IP_PROTOCOL_UDP 0x11
103
104#define FAU_NUM_PACKET_BUFFERS_TO_FREE (CVMX_FAU_REG_END - sizeof(uint32_t)) 101#define FAU_NUM_PACKET_BUFFERS_TO_FREE (CVMX_FAU_REG_END - sizeof(uint32_t))
105#define TOTAL_NUMBER_OF_PORTS (CVMX_PIP_NUM_INPUT_PORTS+1) 102#define TOTAL_NUMBER_OF_PORTS (CVMX_PIP_NUM_INPUT_PORTS+1)
106 103
diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index bc67e416e42..62258bd3145 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -359,8 +359,8 @@ dont_put_skbuff_in_hw:
359 if (USE_HW_TCPUDP_CHECKSUM && (skb->protocol == htons(ETH_P_IP)) && 359 if (USE_HW_TCPUDP_CHECKSUM && (skb->protocol == htons(ETH_P_IP)) &&
360 (ip_hdr(skb)->version == 4) && (ip_hdr(skb)->ihl == 5) && 360 (ip_hdr(skb)->version == 4) && (ip_hdr(skb)->ihl == 5) &&
361 ((ip_hdr(skb)->frag_off == 0) || (ip_hdr(skb)->frag_off == 1 << 14)) 361 ((ip_hdr(skb)->frag_off == 0) || (ip_hdr(skb)->frag_off == 1 << 14))
362 && ((ip_hdr(skb)->protocol == IP_PROTOCOL_TCP) 362 && ((ip_hdr(skb)->protocol == IPPROTO_TCP)
363 || (ip_hdr(skb)->protocol == IP_PROTOCOL_UDP))) { 363 || (ip_hdr(skb)->protocol == IPPROTO_UDP))) {
364 /* Use hardware checksum calc */ 364 /* Use hardware checksum calc */
365 pko_command.s.ipoffp1 = sizeof(struct ethhdr) + 1; 365 pko_command.s.ipoffp1 = sizeof(struct ethhdr) + 1;
366 } 366 }
@@ -550,8 +550,8 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
550 work->word2.s.dec_ipcomp = 0; /* FIXME */ 550 work->word2.s.dec_ipcomp = 0; /* FIXME */
551#endif 551#endif
552 work->word2.s.tcp_or_udp = 552 work->word2.s.tcp_or_udp =
553 (ip_hdr(skb)->protocol == IP_PROTOCOL_TCP) 553 (ip_hdr(skb)->protocol == IPPROTO_TCP)
554 || (ip_hdr(skb)->protocol == IP_PROTOCOL_UDP); 554 || (ip_hdr(skb)->protocol == IPPROTO_UDP);
555#if 0 555#if 0
556 /* FIXME */ 556 /* FIXME */
557 work->word2.s.dec_ipsec = 0; 557 work->word2.s.dec_ipsec = 0;