patch-1.3.32 linux/drivers/net/slhc.c

Next file: linux/drivers/net/znet.c
Previous file: linux/drivers/net/ewrk3.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.31/linux/drivers/net/slhc.c linux/drivers/net/slhc.c
@@ -83,6 +83,10 @@
 #include <net/checksum.h>
 #include "slhc.h"
 
+#ifdef __alpha__
+# include <asm/unaligned.h>
+#endif
+
 int last_retran;
 
 static unsigned char *encode(unsigned char *cp, unsigned short n);
@@ -621,7 +625,11 @@
 	  cp += (ip->ihl - 5) * 4;
 	}
 
+#ifdef __alpha__
+	stw_u(ip_fast_csum(icp, ip->ihl), &((struct iphdr *)icp)->check);
+#else
 	((struct iphdr *)icp)->check = ip_fast_csum(icp, ((struct iphdr*)icp)->ihl);
+#endif
 
 	memcpy(cp, thp, 20);
 	cp += 20;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this