diff --git a/Makefile b/Makefile index 6d63524..24a85ac 100755 --- a/Makefile +++ b/Makefile @@ -1296,7 +1296,6 @@ endif EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04 ifeq ($(CONFIG_PLATFORM_I386_PC), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT SUBARCH := $(shell uname -m | sed -e s/i.86/i386/) ARCH ?= $(SUBARCH) diff --git a/hal/phydm/phydm_types.h b/hal/phydm/phydm_types.h index a13f506..b079307 100644 --- a/hal/phydm/phydm_types.h +++ b/hal/phydm/phydm_types.h @@ -225,9 +225,9 @@ enum rt_spinlock_type { #endif - #if defined(CONFIG_LITTLE_ENDIAN) + #if defined(__LITTLE_ENDIAN) #define ODM_ENDIAN_TYPE ODM_ENDIAN_LITTLE - #elif defined(CONFIG_BIG_ENDIAN) + #else #define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG #endif diff --git a/include/ieee80211_ext.h b/include/ieee80211_ext.h index 94a8e58..2ca2d80 100644 --- a/include/ieee80211_ext.h +++ b/include/ieee80211_ext.h @@ -58,7 +58,7 @@ struct rsn_ie_hdr { } __attribute__((packed)); struct wme_ac_parameter { -#if defined(CONFIG_LITTLE_ENDIAN) +#if defined(__LITTLE_ENDIAN) /* byte 1 */ u8 aifsn:4, acm:1, @@ -68,7 +68,7 @@ struct wme_ac_parameter { /* byte 2 */ u8 eCWmin:4, eCWmax:4; -#elif defined(CONFIG_BIG_ENDIAN) +#else /* byte 1 */ u8 reserved:1, aci:2, @@ -78,8 +78,6 @@ struct wme_ac_parameter { /* byte 2 */ u8 eCWmax:4, eCWmin:4; -#else -#error "Please fix " #endif /* bytes 3 & 4 */ diff --git a/include/rtw_byteorder.h b/include/rtw_byteorder.h index 8e6bb7a..d15eed8 100644 --- a/include/rtw_byteorder.h +++ b/include/rtw_byteorder.h @@ -16,18 +16,10 @@ #define _RTL871X_BYTEORDER_H_ -#if defined(CONFIG_LITTLE_ENDIAN) && defined (CONFIG_BIG_ENDIAN) - #error "Shall be CONFIG_LITTLE_ENDIAN or CONFIG_BIG_ENDIAN, but not both!\n" -#endif - -#if defined(CONFIG_LITTLE_ENDIAN) - #ifndef CONFIG_PLATFORM_MSTAR389 - #include - #endif -#elif defined (CONFIG_BIG_ENDIAN) - #include +#if defined(__LITTLE_ENDIAN) +#include #else - # error "Must be LITTLE/BIG Endian Host" + #include #endif #endif /* _RTL871X_BYTEORDER_H_ */ diff --git a/include/rtw_io.h b/include/rtw_io.h index cafb12d..0326adb 100644 --- a/include/rtw_io.h +++ b/include/rtw_io.h @@ -192,7 +192,7 @@ struct intf_hdl { struct reg_protocol_rd { -#ifdef CONFIG_LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN /* DW1 */ u32 NumOfTrans:4; @@ -250,7 +250,7 @@ struct reg_protocol_rd { struct reg_protocol_wt { -#ifdef CONFIG_LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN /* DW1 */ u32 NumOfTrans:4; diff --git a/include/rtw_mlme_ext.h b/include/rtw_mlme_ext.h index 49fcaa9..40ee362 100644 --- a/include/rtw_mlme_ext.h +++ b/include/rtw_mlme_ext.h @@ -1205,21 +1205,17 @@ struct cmd_hdl wlancmds[] = { struct C2HEvent_Header { -#ifdef CONFIG_LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN unsigned int len:16; unsigned int ID:8; unsigned int seq:8; -#elif defined(CONFIG_BIG_ENDIAN) - - unsigned int seq:8; - unsigned int ID:8; - unsigned int len:16; - #else -# error "Must be LITTLE or BIG Endian" + unsigned int seq:8; + unsigned int ID:8; + unsigned int len:16; #endif diff --git a/include/rtw_security.h b/include/rtw_security.h index 36756e1..30034a1 100644 --- a/include/rtw_security.h +++ b/include/rtw_security.h @@ -74,7 +74,7 @@ union pn48 { u64 val; -#ifdef CONFIG_LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN struct { u8 TSC0; @@ -87,7 +87,7 @@ struct { u8 TSC7; } _byte_; -#elif defined(CONFIG_BIG_ENDIAN) +#else struct { u8 TSC7; diff --git a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c index 1060cf0..5ddb950 100644 --- a/os_dep/linux/ioctl_linux.c +++ b/os_dep/linux/ioctl_linux.c @@ -11660,10 +11660,10 @@ static void printdata(u8 *pbuf, u32 len) } if (i < len) { -#ifdef CONFIG_BIG_ENDIAN +#ifdef __BIG_ENDIAN for (; i < len, i++) printk("%02X", pbuf + i); -#else /* CONFIG_LITTLE_ENDIAN */ +#else /* __LITTLE_ENDIAN */ #if 0 val = 0; _rtw_memcpy(&val, pbuf + i, len - i); @@ -11678,7 +11678,7 @@ static void printdata(u8 *pbuf, u32 len) n = (4 - n) * 2; printk("%8s", str + n); #endif -#endif /* CONFIG_LITTLE_ENDIAN */ +#endif /* __LITTLE_ENDIAN */ } printk("\n"); }