git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ARM: s3c6400_defconfig: Update compiled machines
[safe/jmp/linux-2.6]
/
lib
/
checksum.c
diff --git
a/lib/checksum.c
b/lib/checksum.c
index
886b48d
..
0975087
100644
(file)
--- a/
lib/checksum.c
+++ b/
lib/checksum.c
@@
-37,6
+37,7
@@
#include <asm/byteorder.h>
#include <asm/byteorder.h>
+#ifndef do_csum
static inline unsigned short from32to16(unsigned int x)
{
/* add up 16-bit and 16-bit for 16+c bit */
static inline unsigned short from32to16(unsigned int x)
{
/* add up 16-bit and 16-bit for 16+c bit */
@@
-56,9
+57,9
@@
static unsigned int do_csum(const unsigned char *buff, int len)
odd = 1 & (unsigned long) buff;
if (odd) {
#ifdef __LITTLE_ENDIAN
odd = 1 & (unsigned long) buff;
if (odd) {
#ifdef __LITTLE_ENDIAN
- result = *buff;
-#else
result += (*buff << 8);
result += (*buff << 8);
+#else
+ result = *buff;
#endif
len--;
buff++;
#endif
len--;
buff++;
@@
-102,6
+103,7
@@
static unsigned int do_csum(const unsigned char *buff, int len)
out:
return result;
}
out:
return result;
}
+#endif
/*
* This is a version of ip_compute_csum() optimized for IP headers,
/*
* This is a version of ip_compute_csum() optimized for IP headers,