2 * Copyright 2004-2009 Analog Devices Inc.
3 * akbar.hussain@lineo.com
5 * Licensed under the GPL-2 or later.
8 #ifndef _BFIN_CHECKSUM_H
9 #define _BFIN_CHECKSUM_H
12 * computes the checksum of the TCP/UDP pseudo-header
13 * returns a 16-bit checksum, already complemented
17 __csum_tcpudp_nofold(__be32 saddr
, __be32 daddr
, unsigned short len
,
18 unsigned short proto
, __wsum sum
)
22 __asm__ ("%0 = %0 + %2;\n\t"
34 : "=d" (sum
), "=&d" (carry
)
35 : "d" (daddr
), "d" (saddr
), "d" ((len
+ proto
) << 8), "0"(sum
)
40 #define csum_tcpudp_nofold __csum_tcpudp_nofold
42 #include <asm-generic/checksum.h>