patch-pre2.0.6 linux/drivers/net/slhc.c

Next file: linux/drivers/scsi/Config.in
Previous file: linux/drivers/net/sdla.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.5/linux/drivers/net/slhc.c linux/drivers/net/slhc.c
@@ -79,10 +79,7 @@
 #include <linux/mm.h>
 #include <net/checksum.h>
 #include <net/slhc_vj.h>
-
-#ifdef __alpha__
-# include <asm/unaligned.h>
-#endif
+#include <asm/unaligned.h>
 
 int last_retran;
 
@@ -619,11 +616,8 @@
 	  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
+	put_unaligned(ip_fast_csum(icp, ip->ihl),
+		      &((struct iphdr *)icp)->check);
 
 	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