patch-2.1.99 linux/include/asm-m68k/checksum.h

Next file: linux/include/asm-ppc/checksum.h
Previous file: linux/include/asm-i386/smp.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.98/linux/include/asm-m68k/checksum.h linux/include/asm-m68k/checksum.h
@@ -87,8 +87,8 @@
  * returns a 16-bit checksum, already complemented
  */
 
-static inline unsigned short int
-csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
+static inline unsigned int
+csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,
 		  unsigned short proto, unsigned int sum)
 {
 	__asm__ ("addl  %1,%0\n\t"
@@ -99,7 +99,14 @@
 		 : "=&d" (sum), "=&d" (saddr)
 		 : "0" (daddr), "1" (saddr), "d" (len + proto),
 		   "d"(sum));
-	return csum_fold(sum);
+	return sum;
+}
+
+static inline unsigned short int
+csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
+		  unsigned short proto, unsigned int sum)
+{
+	return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov