From 798e0eb3fb16f4e27252341b614f75dbcef30822 Mon Sep 17 00:00:00 2001 From: proski Date: Thu, 5 Jun 2008 07:22:51 +0000 Subject: [PATCH] Registers between 0x7000 and 0x8000 are always little-endian According to FreeBSD changelog, this area is present in 5416 and newer and must be byteswapped on big-endian systems. Testing confirms it. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3701 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath_hal/ah_os.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ath_hal/ah_os.h b/ath_hal/ah_os.h index dc4171d..58fef2e 100644 --- a/ath_hal/ah_os.h +++ b/ath_hal/ah_os.h @@ -187,7 +187,8 @@ extern void *__ahdecl ath_hal_memcpy(void *, const void *, size_t); * by the PCI clock domain registers. */ #if (AH_BYTE_ORDER == AH_BIG_ENDIAN) -#define is_reg_le(__reg) ((0x4000 <= (__reg) && (__reg) < 0x5000)) +#define is_reg_le(__reg) ((0x4000 <= (__reg) && (__reg) < 0x5000) || \ + (0x7000 <= (__reg) && (__reg) < 0x8000)) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12) #define _OS_REG_WRITE(_ah, _reg, _val) do { \ is_reg_le(_reg) ? \ -- 2.35.1