mirror of https://github.com/proski/madwifi
Reapply r3402 (ARM compile fix), it was reverted by mistake
This should fix compilation on little-endian ARM and possibly other platforms with little or no optimization. This closes #1783. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3700 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
parent
4b2cf1393a
commit
8c141cdc58
|
@ -188,10 +188,6 @@ extern void *__ahdecl ath_hal_memcpy(void *, const void *, size_t);
|
|||
*/
|
||||
#if (AH_BYTE_ORDER == AH_BIG_ENDIAN)
|
||||
#define is_reg_le(__reg) ((0x4000 <= (__reg) && (__reg) < 0x5000))
|
||||
#else
|
||||
#define is_reg_le(__reg) 1
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
|
||||
#define _OS_REG_WRITE(_ah, _reg, _val) do { \
|
||||
is_reg_le(_reg) ? \
|
||||
|
@ -213,6 +209,21 @@ extern void *__ahdecl ath_hal_memcpy(void *, const void *, size_t);
|
|||
readl((_ah)->ah_sh + (_reg)) : \
|
||||
cpu_to_le32(readl((_ah)->ah_sh + (_reg))))
|
||||
#endif /* KERNEL_VERSION(2,6,12) */
|
||||
#else /* AH_BYTE_ORDER != AH_BIG_ENDIAN */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
|
||||
#define _OS_REG_WRITE(_ah, _reg, _val) do { \
|
||||
iowrite32((_val), (_ah)->ah_sh + (_reg)); \
|
||||
} while (0)
|
||||
#define _OS_REG_READ(_ah, _reg) \
|
||||
ioread32((_ah)->ah_sh + (_reg))
|
||||
#else
|
||||
#define _OS_REG_WRITE(_ah, _reg, _val) do { \
|
||||
writel((_val), (_ah)->ah_sh + (_reg)); \
|
||||
} while (0)
|
||||
#define _OS_REG_READ(_ah, _reg) \
|
||||
readl((_ah)->ah_sh + (_reg))
|
||||
#endif /* KERNEL_VERSION(2,6,12) */
|
||||
#endif /* AH_BYTE_ORDER != AH_BIG_ENDIAN */
|
||||
|
||||
#define HAL_DEBUG_OFF 0
|
||||
/* Show register accesses */
|
||||
|
|
Loading…
Reference in New Issue