Staging: Octeon Ethernet: Use constants from in.h
authorDavid Daney <ddaney@caviumnetworks.com>
Thu, 7 Jan 2010 19:05:06 +0000 (11:05 -0800)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 27 Feb 2010 11:53:09 +0000 (12:53 +0100)
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>
drivers/staging/octeon/ethernet-defines.h
drivers/staging/octeon/ethernet-tx.c

index 9c4910e45d288c3838c36195e78cbfc5a9509cd1..00a8561726ba036b20d209300e66fbcd2f3e516a 100644 (file)
@@ -98,9 +98,6 @@
 #define MAX_SKB_TO_FREE 10
 #define MAX_OUT_QUEUE_DEPTH 1000
 
-#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)
 
index bc67e416e4214f6e5ec4d391758a06147a76a6b4..62258bd31456fbe669d6d69f266899e1f33ad7aa 100644 (file)
@@ -359,8 +359,8 @@ dont_put_skbuff_in_hw:
        if (USE_HW_TCPUDP_CHECKSUM && (skb->protocol == htons(ETH_P_IP)) &&
            (ip_hdr(skb)->version == 4) && (ip_hdr(skb)->ihl == 5) &&
            ((ip_hdr(skb)->frag_off == 0) || (ip_hdr(skb)->frag_off == 1 << 14))
-           && ((ip_hdr(skb)->protocol == IP_PROTOCOL_TCP)
-               || (ip_hdr(skb)->protocol == IP_PROTOCOL_UDP))) {
+           && ((ip_hdr(skb)->protocol == IPPROTO_TCP)
+               || (ip_hdr(skb)->protocol == IPPROTO_UDP))) {
                /* Use hardware checksum calc */
                pko_command.s.ipoffp1 = sizeof(struct ethhdr) + 1;
        }
@@ -550,8 +550,8 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
                work->word2.s.dec_ipcomp = 0;   /* FIXME */
 #endif
                work->word2.s.tcp_or_udp =
-                   (ip_hdr(skb)->protocol == IP_PROTOCOL_TCP)
-                   || (ip_hdr(skb)->protocol == IP_PROTOCOL_UDP);
+                   (ip_hdr(skb)->protocol == IPPROTO_TCP)
+                   || (ip_hdr(skb)->protocol == IPPROTO_UDP);
 #if 0
                /* FIXME */
                work->word2.s.dec_ipsec = 0;