Commit 98ff86e3 authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: fixed build issue for big endian platforms

Driver now builds for big endian mips platform, possibly also for other
big endian platforms. A change was made to the R_REG and W_REG macro's.
These macro's perform an xor (^) operation for endianess swap purposes.
Gcc complained because an xor operation is not allowed on a pointer type.
Fixed this by casting the pointer to an unsigned long.
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9204df65
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#ifndef _BRCM_DMA_H_ #ifndef _BRCM_DMA_H_
#define _BRCM_DMA_H_ #define _BRCM_DMA_H_
#include <linux/delay.h>
#include "types.h" /* forward structure declarations */ #include "types.h" /* forward structure declarations */
/* DMA structure: /* DMA structure:
......
...@@ -305,11 +305,11 @@ do { \ ...@@ -305,11 +305,11 @@ do { \
switch (sizeof(*(r))) { \ switch (sizeof(*(r))) { \
case sizeof(u8): \ case sizeof(u8): \
__osl_v = \ __osl_v = \
readb((u8 *)((r)^3)); \ readb((u8 *)((unsigned long)(r)^3)); \
break; \ break; \
case sizeof(u16): \ case sizeof(u16): \
__osl_v = \ __osl_v = \
readw((u16 *)((r)^2)); \ readw((u16 *)((unsigned long)(r)^2)); \
break; \ break; \
case sizeof(u32): \ case sizeof(u32): \
__osl_v = readl((u32 *)(r)); \ __osl_v = readl((u32 *)(r)); \
...@@ -322,10 +322,10 @@ do { \ ...@@ -322,10 +322,10 @@ do { \
switch (sizeof(*(r))) { \ switch (sizeof(*(r))) { \
case sizeof(u8): \ case sizeof(u8): \
writeb((u8)(v), \ writeb((u8)(v), \
(u8 *)((r)^3)); break; \ (u8 *)((unsigned long)(r)^3)); break; \
case sizeof(u16): \ case sizeof(u16): \
writew((u16)(v), \ writew((u16)(v), \
(u16 *)((r)^2)); break; \ (u16 *)((unsigned long)(r)^2)); break; \
case sizeof(u32): \ case sizeof(u32): \
writel((u32)(v), \ writel((u32)(v), \
(u32 *)(r)); break; \ (u32 *)(r)); break; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment