13 #include <linux/module.h>
14 #include <linux/string.h>
16 #include <asm/byteorder.h>
18 static inline unsigned short
19 from64to16 (
unsigned long x)
22 x = (x & 0xffffffff) + (x >> 32);
24 x = (x & 0xffff) + (x >> 16);
26 x = (x & 0xffff) + (x >> 16);
28 x = (x & 0xffff) + (x >> 16);
42 (
__force u64)sum + ((len + proto) << 8));
58 result = (result & 0xffffffff) + (result >> 32);
60 result = (result & 0xffffffff) + (result >> 32);
65 extern unsigned long do_csum (
const unsigned char *,
long);
86 result = (result & 0xffffffff) + (result >> 32);