Fix IP alignment problem
authorOlav Morken <olavmrk@gmail.com>
Fri, 23 Jan 2009 11:56:26 +0000 (12:56 +0100)
committerBen Warren <biggerbadderben@gmail.com>
Thu, 29 Jan 2009 07:59:28 +0000 (23:59 -0800)
This patch removes volatile from:
volatile IP_t *ip = (IP_t *)xip;

Due to a bug, avr32-gcc will assume that ip is aligned on a word boundary when
using volatile, which causes an exception since xip isn't aligned on a word
boundary.

Signed-off-by: Gunnar Rangoy <gunnar@rangoy.com>
Signed-off-by: Paul Driveklepp <pauldriveklepp@gmail.com>
Signed-off-by: Olav Morken <olavmrk@gmail.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
net/net.c

index e6547f9eddc860838e245483277c8d12b59ef87a..459baf4ea69da201933d0f26612381236b93d75d 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -1684,7 +1684,7 @@ NetSetEther(volatile uchar * xet, uchar * addr, uint prot)
 void
 NetSetIP(volatile uchar * xip, IPaddr_t dest, int dport, int sport, int len)
 {
-       volatile IP_t *ip = (IP_t *)xip;
+       IP_t *ip = (IP_t *)xip;
 
        /*
         *      If the data is an odd number of bytes, zero the