From b2de21036e23c1d141e3eea3001fe4fd89412f82 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 26 Jan 2015 16:45:43 -0600 Subject: [PATCH] rtl8188eu: Remove CONFIG_LITTLE_ENDIAN Replace with kernel-devined __LITTLE_ENDIAN. This also applies to CONFIG_BIG_ENDIAN. Signed-off-by: Larry Finger --- Makefile | 1 - hal/odm_HWConfig.h | 6 +++--- hal/odm_types.h | 4 ++-- include/ieee80211_ext.h | 4 ++-- include/rtw_byteorder.h | 8 ++++---- include/rtw_io.h | 4 ++-- include/rtw_mlme_ext.h | 4 ++-- include/rtw_security.h | 4 ++-- os_dep/ioctl_linux.c | 6 +++--- 9 files changed, 20 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 5378572..9089ee0 100755 --- a/Makefile +++ b/Makefile @@ -196,7 +196,6 @@ EXTRA_CFLAGS += -DCONFIG_RF_GAIN_OFFSET endif 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/ | sed -e s/ppc/powerpc/ | sed -e s/armv.l/arm/) ARCH ?= $(SUBARCH) diff --git a/hal/odm_HWConfig.h b/hal/odm_HWConfig.h index f74940e..6e29935 100755 --- a/hal/odm_HWConfig.h +++ b/hal/odm_HWConfig.h @@ -70,7 +70,7 @@ typedef struct _Phy_Rx_AGC_Info { - #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE) + #ifdef __LITTLE_ENDIAN u8 gain:7,trsw:1; #else u8 trsw:1,gain:7; @@ -97,7 +97,7 @@ typedef struct _Phy_Status_Rpt_8192cd s8 sig_evm; u8 rsvd_3; -#if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE) +#ifdef __LITTLE_ENDIAN u8 antsel_rx_keep_2:1; //ex_intf_flg:1; u8 sgi_en:1; u8 rxsc:2; @@ -136,7 +136,7 @@ typedef struct _Phy_Status_Rpt_8195 u8 rsvd_3[2]; s8 sig_evm; u8 rsvd_4; -#if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE) +#ifdef __LITTLE_ENDIAN u8 antidx_anta:3; u8 antidx_antb:3; u8 rsvd_5:2; diff --git a/hal/odm_types.h b/hal/odm_types.h index f808886..4b0001b 100755 --- a/hal/odm_types.h +++ b/hal/odm_types.h @@ -55,9 +55,9 @@ typedef enum _RT_SPINLOCK_TYPE{ #define DEV_BUS_TYPE RT_USB_INTERFACE -#if defined(CONFIG_LITTLE_ENDIAN) +#if defined(__LITTLE_ENDIAN) #define ODM_ENDIAN_TYPE ODM_ENDIAN_LITTLE -#elif defined (CONFIG_BIG_ENDIAN) +#elif defined (__BIG_ENDIAN) #define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG #endif diff --git a/include/ieee80211_ext.h b/include/ieee80211_ext.h index 1cd4842..5db3455 100755 --- a/include/ieee80211_ext.h +++ b/include/ieee80211_ext.h @@ -62,7 +62,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, @@ -72,7 +72,7 @@ struct wme_ac_parameter { /* byte 2 */ u8 eCWmin:4, eCWmax:4; -#elif defined(CONFIG_BIG_ENDIAN) +#elif defined(__BIG_ENDIAN) /* byte 1 */ u8 reserved:1, aci:2, diff --git a/include/rtw_byteorder.h b/include/rtw_byteorder.h index 74a9b5f..4b6320d 100755 --- a/include/rtw_byteorder.h +++ b/include/rtw_byteorder.h @@ -22,15 +22,15 @@ #include -#if defined (CONFIG_LITTLE_ENDIAN) && defined (CONFIG_BIG_ENDIAN) -#error "Shall be CONFIG_LITTLE_ENDIAN or CONFIG_BIG_ENDIAN, but not both!\n" +#if defined (__LITTLE_ENDIAN) && defined (__BIG_ENDIAN) +#error "Shall be __LITTLE_ENDIAN or __BIG_ENDIAN, but not both!\n" #endif -#if defined (CONFIG_LITTLE_ENDIAN) +#if defined (__LITTLE_ENDIAN) #ifndef CONFIG_PLATFORM_MSTAR # include #endif -#elif defined (CONFIG_BIG_ENDIAN) +#elif defined (__BIG_ENDIAN) # include #else # error "Must be LITTLE/BIG Endian Host" diff --git a/include/rtw_io.h b/include/rtw_io.h index bcf80ce..80ef612 100755 --- a/include/rtw_io.h +++ b/include/rtw_io.h @@ -167,7 +167,7 @@ struct intf_hdl { struct reg_protocol_rd { -#ifdef CONFIG_LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN //DW1 u32 NumOfTrans:4; @@ -225,7 +225,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 3a10ee5..dadc6ba 100755 --- a/include/rtw_mlme_ext.h +++ b/include/rtw_mlme_ext.h @@ -911,13 +911,13 @@ static 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) +#elif defined(__BIG_ENDIAN) unsigned int seq:8; unsigned int ID:8; diff --git a/include/rtw_security.h b/include/rtw_security.h index 1eef205..6d8dc86 100755 --- a/include/rtw_security.h +++ b/include/rtw_security.h @@ -68,7 +68,7 @@ union pn48 { u64 val; -#ifdef CONFIG_LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN struct { u8 TSC0; @@ -81,7 +81,7 @@ struct { u8 TSC7; } _byte_; -#elif defined(CONFIG_BIG_ENDIAN) +#elif defined(__BIG_ENDIAN) struct { u8 TSC7; diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index 94ee732..60d83ef 100755 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -10683,10 +10683,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 u8 str[9]; u8 n; val = 0; @@ -10695,7 +10695,7 @@ static void printdata(u8 *pbuf, u32 len) sprintf(str, "%08X", val); n = (4 - n) * 2; printk("%8s", str+n); -#endif // CONFIG_LITTLE_ENDIAN +#endif // __LITTLE_ENDIAN } printk("\n"); }