diff --git a/Makefile b/Makefile index 1a02c94..5214651 100644 --- a/Makefile +++ b/Makefile @@ -177,14 +177,10 @@ EXTRA_CFLAGS += -DCONFIG_RF_GAIN_OFFSET endif endif -ifeq ($(CONFIG_PLATFORM_I386_PC), y) SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc/powerpc/) + +ifeq ($(CONFIG_PLATFORM_I386_PC), y) ARCH ?= $(SUBARCH) -ifeq ($(ARCH), "powerpc") -EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN -else -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -endif CROSS_COMPILE ?= KVER := $(shell uname -r) KSRC := /lib/modules/$(KVER)/build @@ -193,7 +189,7 @@ INSTALL_PREFIX := endif ifeq ($(CONFIG_PLATFORM_ACTIONS_ATM702X), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ACTIONS_ATM702X +EXTRA_CFLAGS += -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ACTIONS_ATM702X #ARCH := arm ARCH := $(R_ARCH) #CROSS_COMPILE := arm-none-linux-gnueabi- @@ -205,14 +201,14 @@ MODULE_NAME :=wlan endif ifeq ($(CONFIG_PLATFORM_TI_AM3517), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_SHUTTLE +EXTRA_CFLAGS += -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_SHUTTLE CROSS_COMPILE := arm-eabi- KSRC := $(shell pwd)/../../../Android/kernel ARCH := arm endif ifeq ($(CONFIG_PLATFORM_MSTAR_TITANIA12), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MSTAR_TITANIA12 +EXTRA_CFLAGS += -DCONFIG_PLATFORM_MSTAR_TITANIA12 ARCH:=mips CROSS_COMPILE:= /usr/src/Mstar_kernel/mips-4.3/bin/mips-linux-gnu- KVER:= 2.6.28.9 @@ -220,8 +216,6 @@ KSRC:= /usr/src/Mstar_kernel/2.6.28.9/ endif ifeq ($(CONFIG_PLATFORM_ANDROID_X86), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -SUBARCH := $(shell uname -m | sed -e s/i.86/i386/) ARCH := $(SUBARCH) CROSS_COMPILE := /media/DATA-2/android-x86/ics-x86_20120130/prebuilt/linux-x86/toolchain/i686-unknown-linux-gnu-4.2.1/bin/i686-unknown-linux-gnu- KSRC := /media/DATA-2/android-x86/ics-x86_20120130/out/target/product/generic_x86/obj/kernel @@ -229,7 +223,6 @@ MODULE_NAME :=wlan endif ifeq ($(CONFIG_PLATFORM_ARM_PXA2XX), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN ARCH := arm CROSS_COMPILE := arm-none-linux-gnueabi- KVER := 2.6.34.1 @@ -237,7 +230,6 @@ KSRC ?= /usr/src/linux-2.6.34.1 endif ifeq ($(CONFIG_PLATFORM_ARM_S3C2K4), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN ARCH := arm CROSS_COMPILE := arm-linux- KVER := 2.6.24.7_$(ARCH) @@ -245,7 +237,6 @@ KSRC := /usr/src/kernels/linux-$(KVER) endif ifeq ($(CONFIG_PLATFORM_ARM_S3C6K4), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN ARCH := arm CROSS_COMPILE := arm-none-linux-gnueabi- KVER := 2.6.34.1 @@ -253,7 +244,7 @@ KSRC ?= /usr/src/linux-2.6.34.1 endif ifeq ($(CONFIG_PLATFORM_RTD2880B), y) -EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN -DCONFIG_PLATFORM_RTD2880B +EXTRA_CFLAGS += -DCONFIG_PLATFORM_RTD2880B ARCH:= CROSS_COMPILE:= KVER:= @@ -261,7 +252,6 @@ KSRC:= endif ifeq ($(CONFIG_PLATFORM_MIPS_RMI), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN ARCH:=mips CROSS_COMPILE:=mipsisa32r2-uclibc- KVER:= @@ -269,7 +259,6 @@ KSRC:= /root/work/kernel_realtek endif ifeq ($(CONFIG_PLATFORM_MIPS_PLM), y) -EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN ARCH:=mips CROSS_COMPILE:=mipsisa32r2-uclibc- KVER:= @@ -277,7 +266,7 @@ KSRC:= /root/work/kernel_realtek endif ifeq ($(CONFIG_PLATFORM_MSTAR389), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MSTAR389 +EXTRA_CFLAGS += -DCONFIG_PLATFORM_MSTAR389 ARCH:=mips CROSS_COMPILE:= mips-linux-gnu- KVER:= 2.6.28.10 @@ -285,14 +274,13 @@ KSRC:= /home/mstar/mstar_linux/2.6.28.9/ endif ifeq ($(CONFIG_PLATFORM_MIPS_AR9132), y) -EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN ARCH := mips CROSS_COMPILE := mips-openwrt-linux- KSRC := /home/alex/test_openwrt/tmp/linux-2.6.30.9 endif ifeq ($(CONFIG_PLATFORM_DMP_PHILIPS), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM +EXTRA_CFLAGS += -DRTK_DMP_PLATFORM ARCH := mips #CROSS_COMPILE:=/usr/local/msdk-4.3.6-mips-EL-2.6.12.6-0.9.30.3/bin/mipsel-linux- CROSS_COMPILE:=/usr/local/toolchain_mipsel/bin/mipsel-linux- @@ -300,7 +288,7 @@ KSRC ?=/usr/local/Jupiter/linux-2.6.12 endif ifeq ($(CONFIG_PLATFORM_RTK_DMP), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM +EXTRA_CFLAGS += -DRTK_DMP_PLATFORM ARCH:=mips CROSS_COMPILE:=mipsel-linux- KVER:= @@ -308,7 +296,7 @@ KSRC ?= /usr/src/DMP_Kernel/jupiter/linux-2.6.12 endif ifeq ($(CONFIG_PLATFORM_MT53XX), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MT53XX +EXTRA_CFLAGS += -DCONFIG_PLATFORM_MT53XX ARCH:= arm CROSS_COMPILE:= arm11_mtk_le- KVER:= 2.6.27 @@ -316,7 +304,7 @@ KSRC?= /proj/mtk00802/BD_Compare/BDP/Dev/BDP_V301/BDP_Linux/linux-2.6.27 endif ifeq ($(CONFIG_PLATFORM_ARM_MX51_241H), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_WISTRON_PLATFORM +EXTRA_CFLAGS += -DCONFIG_WISTRON_PLATFORM ARCH := arm CROSS_COMPILE := /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi- KVER := 2.6.31 @@ -324,7 +312,7 @@ KSRC ?= /lib/modules/2.6.31-770-g0e46b52/source endif ifeq ($(CONFIG_PLATFORM_ACTIONS_ATJ227X), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ACTIONS_ATJ227X +EXTRA_CFLAGS += -DCONFIG_PLATFORM_ACTIONS_ATJ227X ARCH := mips CROSS_COMPILE := /home/cnsd4/project/actions/tools-2.6.27/bin/mipsel-linux-gnu- KVER := 2.6.27 @@ -332,7 +320,7 @@ KSRC := /home/cnsd4/project/actions/linux-2.6.27.28 endif ifeq ($(CONFIG_PLATFORM_TI_DM365), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_TI_DM365 +EXTRA_CFLAGS += -DCONFIG_PLATFORM_TI_DM365 ARCH := arm CROSS_COMPILE := /home/cnsd4/Appro/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le- KVER := 2.6.18 @@ -340,7 +328,6 @@ KSRC := /home/cnsd4/Appro/mv_pro_5.0/montavista/pro/devkit/lsp/ti-davinci/linux- endif ifeq ($(CONFIG_PLATFORM_TEGRA3_CARDHU), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN ARCH := arm CROSS_COMPILE := /home/android_sdk/nvidia/tegra-16r3-partner-android-4.1_20120723/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- KSRC := /home/android_sdk/nvidia/tegra-16r3-partner-android-4.1_20120723/out/target/product/cardhu/obj/KERNEL @@ -348,7 +335,6 @@ MODULE_NAME := wlan endif ifeq ($(CONFIG_PLATFORM_TEGRA4_DALMORE), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN ARCH := arm CROSS_COMPILE := /home/android_sdk/nvidia/tegra-17r9-partner-android-4.2-dalmore_20130131/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi- KSRC := /home/android_sdk/nvidia/tegra-17r9-partner-android-4.2-dalmore_20130131/out/target/product/dalmore/obj/KERNEL @@ -356,7 +342,6 @@ MODULE_NAME := wlan endif ifeq ($(CONFIG_PLATFORM_ARM_TCC8900), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN ARCH := arm CROSS_COMPILE := /home/android_sdk/Telechips/SDK_2304_20110613/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- KSRC := /home/android_sdk/Telechips/SDK_2304_20110613/kernel @@ -364,7 +349,6 @@ MODULE_NAME := wlan endif ifeq ($(CONFIG_PLATFORM_ARM_TCC8920), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN ARCH := arm CROSS_COMPILE := /home/android_sdk/Telechips/v12.06_r1-tcc-android-4.0.4/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- KSRC := /home/android_sdk/Telechips/v12.06_r1-tcc-android-4.0.4/kernel @@ -372,7 +356,7 @@ MODULE_NAME := wlan endif ifeq ($(CONFIG_PLATFORM_ARM_RK2818), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ROCKCHIPS -DCONFIG_MINIMAL_MEMORY_USAGE +EXTRA_CFLAGS += -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ROCKCHIPS -DCONFIG_MINIMAL_MEMORY_USAGE ARCH := arm CROSS_COMPILE := /usr/src/release_fae_version/toolchain/arm-eabi-4.4.0/bin/arm-eabi- KSRC := /usr/src/release_fae_version/kernel25_A7_281x @@ -380,7 +364,6 @@ MODULE_NAME := wlan endif ifeq ($(CONFIG_PLATFORM_ARM_URBETTER), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN #-DCONFIG_MINIMAL_MEMORY_USAGE ARCH := arm CROSS_COMPILE := /media/DATA-1/urbetter/arm-2009q3/bin/arm-none-linux-gnueabi- KSRC := /media/DATA-1/urbetter/ics-urbetter/kernel @@ -388,7 +371,6 @@ MODULE_NAME := wlan endif ifeq ($(CONFIG_PLATFORM_ARM_TI_PANDA), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN #-DCONFIG_MINIMAL_MEMORY_USAGE ARCH := arm #CROSS_COMPILE := /media/DATA-1/aosp/ics-aosp_20111227/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- #KSRC := /media/DATA-1/aosp/android-omap-panda-3.0_20120104 @@ -398,14 +380,12 @@ MODULE_NAME := wlan endif ifeq ($(CONFIG_PLATFORM_MIPS_JZ4760), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_MINIMAL_MEMORY_USAGE ARCH ?= mips CROSS_COMPILE ?= /mnt/sdb5/Ingenic/Umido/mips-4.3/bin/mips-linux-gnu- KSRC ?= /mnt/sdb5/Ingenic/Umido/kernel endif ifeq ($(CONFIG_PLATFORM_SZEBOOK), y) -EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN ARCH:=arm CROSS_COMPILE:=/opt/crosstool2/bin/armeb-unknown-linux-gnueabi- KVER:= 2.6.31.6 @@ -414,7 +394,7 @@ endif #Add setting for MN10300 ifeq ($(CONFIG_PLATFORM_MN10300), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MN10300 +EXTRA_CFLAGS += -DCONFIG_PLATFORM_MN10300 ARCH := mn10300 CROSS_COMPILE := mn10300-linux- KVER := 2.6.32.2 @@ -424,7 +404,7 @@ endif ifeq ($(CONFIG_PLATFORM_ARM_SUNxI), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ARM_SUNxI +EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUNxI ARCH := arm CROSS_COMPILE := arm-none-linux-gnueabi- KVER := 3.0.8 diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 30db0cb..cac1028 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -2699,9 +2699,6 @@ _func_exit_; } -#define ENDIAN_FREE 1 - -int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe); int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe) { #if defined (PLATFORM_LINUX) || defined (PLATFORM_FREEBSD) //for amsdu TP improvement,Creator: Thomas @@ -2739,15 +2736,8 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe) while (a_len > ETH_HLEN) { /* Offset 12 denote 2 mac address */ -#ifdef ENDIAN_FREE //nSubframe_Length = ntohs(*((u16*)(pdata + 12))); nSubframe_Length = RTW_GET_BE16(pdata + 12); -#else // ENDIAN_FREE - nSubframe_Length = *((u16*)(pdata + 12)); - //==m==>change the length order - nSubframe_Length = (nSubframe_Length>>8) + (nSubframe_Length<<8); - //ntohs(nSubframe_Length); -#endif // ENDIAN_FREE if ( a_len < (ETHERNET_HEADER_SIZE + nSubframe_Length) ) { DBG_871X("nRemain_Length is %d and nSubframe_Length is : %d\n",a_len,nSubframe_Length); @@ -2829,12 +2819,8 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe) #ifndef PLATFORM_FREEBSD sub_skb = subframes[i]; /* convert hdr + possible LLC headers into Ethernet header */ -#ifdef ENDIAN_FREE //eth_type = ntohs(*(u16*)&sub_skb->data[6]); eth_type = RTW_GET_BE16(&sub_skb->data[6]); -#else // ENDIAN_FREE - eth_type = (sub_skb->data[6] << 8) | sub_skb->data[7]; -#endif // ENDIAN_FREE if (sub_skb->len >= 8 && ((_rtw_memcmp(sub_skb->data, rtw_rfc1042_header, SNAP_SIZE) && eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || @@ -2910,11 +2896,7 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe) ptr=mtod(sub_m, u8 *); offset=ETH_HLEN; /* convert hdr + possible LLC headers into Ethernet header */ -#ifdef ENDIAN_FREE eth_type = ntohs(*(u16*)&ptr[offset+6]); -#else // ENDIAN_FREE - eth_type = ( ptr[offset+6] << 8) | ptr[offset+7]; -#endif // ENDIAN_FREE if (sub_m->m_pkthdr.len >= ETH_HLEN+8 && ((_rtw_memcmp(ptr+ETH_HLEN, rtw_rfc1042_header, SNAP_SIZE) && eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || diff --git a/include/ieee80211_ext.h b/include/ieee80211_ext.h index 14f1b23..b9f8c1a 100644 --- a/include/ieee80211_ext.h +++ b/include/ieee80211_ext.h @@ -63,7 +63,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, @@ -73,7 +73,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/odm_HWConfig.h b/include/odm_HWConfig.h index 9b53a8a..8cd5cf1 100644 --- a/include/odm_HWConfig.h +++ b/include/odm_HWConfig.h @@ -70,7 +70,7 @@ typedef struct _Phy_Rx_AGC_Info { - #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE) + #ifdef __LITTLE_ENDIAN u1Byte gain:7,trsw:1; #else u1Byte trsw:1,gain:7; @@ -97,7 +97,7 @@ typedef struct _Phy_Status_Rpt_8192cd s1Byte sig_evm; u1Byte rsvd_3; -#if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE) +#ifdef __LITTLE_ENDIAN u1Byte antsel_rx_keep_2:1; //ex_intf_flg:1; u1Byte sgi_en:1; u1Byte rxsc:2; @@ -136,11 +136,11 @@ typedef struct _Phy_Status_Rpt_8195 u1Byte rsvd_3[2]; s1Byte sig_evm; u1Byte rsvd_4; -#if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE) +#ifdef __LITTLE_ENDIAN u1Byte antidx_anta:3; u1Byte antidx_antb:3; u1Byte rsvd_5:2; -#else // _BIG_ENDIAN_ +#else // __BIG_ENDIAN_ u1Byte rsvd_5:2; u1Byte antidx_antb:3; u1Byte antidx_anta:3; diff --git a/include/odm_precomp.h b/include/odm_precomp.h index a5bacc1..7ebea82 100644 --- a/include/odm_precomp.h +++ b/include/odm_precomp.h @@ -40,11 +40,6 @@ #include "../8192cd.h" #include "../8192cd_util.h" - #ifdef _BIG_ENDIAN_ - #define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG - #else - #define ODM_ENDIAN_TYPE ODM_ENDIAN_LITTLE - #endif #ifdef AP_BUILD_WORKAROUND #include "../8192cd_headers.h" @@ -59,11 +54,6 @@ #include "../common_types.h" // OUTSRC and rtl8192cd both needs basic type such as UINT8 and BIT0. #include "../8192cd.h" // OUTSRC needs basic ADSL struct definition. #include "../8192cd_util.h" // OUTSRC needs basic I/O function. - #ifdef _BIG_ENDIAN_ - #define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG - #else - #define ODM_ENDIAN_TYPE ODM_ENDIAN_LITTLE - #endif #ifdef ADSL_AP_BUILD_WORKAROUND // NESTED_INC: Functions defined outside should not be included!! Marked by Annie, 2011-10-14. @@ -79,7 +69,6 @@ #elif (DM_ODM_SUPPORT_TYPE == ODM_MP) #include "Mp_Precomp.h" - #define ODM_ENDIAN_TYPE ODM_ENDIAN_LITTLE #endif diff --git a/include/odm_types.h b/include/odm_types.h index f730431..3fccf07 100644 --- a/include/odm_types.h +++ b/include/odm_types.h @@ -30,10 +30,6 @@ #define DM_ODM_SUPPORT_TYPE ODM_CE -// Deifne HW endian support -#define ODM_ENDIAN_BIG 0 -#define ODM_ENDIAN_LITTLE 1 - #if (DM_ODM_SUPPORT_TYPE != ODM_MP) #define RT_PCI_INTERFACE 1 #define RT_USB_INTERFACE 2 @@ -218,13 +214,6 @@ typedef enum _RT_SPINLOCK_TYPE{ #define DEV_BUS_TYPE RT_SDIO_INTERFACE #endif - - #if defined(CONFIG_LITTLE_ENDIAN) - #define ODM_ENDIAN_TYPE ODM_ENDIAN_LITTLE - #elif defined (CONFIG_BIG_ENDIAN) - #define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG - #endif - typedef struct timer_list RT_TIMER, *PRT_TIMER; typedef void * RT_TIMER_CALL_BACK; #define STA_INFO_T struct sta_info diff --git a/include/rtw_io.h b/include/rtw_io.h index 352cc27..f822641 100644 --- a/include/rtw_io.h +++ b/include/rtw_io.h @@ -224,7 +224,7 @@ struct intf_hdl { struct reg_protocol_rd { -#ifdef CONFIG_LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN //DW1 u32 NumOfTrans:4; @@ -282,7 +282,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 dca6d2b..55b95af 100644 --- a/include/rtw_mlme_ext.h +++ b/include/rtw_mlme_ext.h @@ -896,13 +896,13 @@ 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 839a1e9..dace96c 100644 --- a/include/rtw_security.h +++ b/include/rtw_security.h @@ -66,7 +66,7 @@ union pn48 { u64 val; -#ifdef CONFIG_LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN struct { u8 TSC0; @@ -79,7 +79,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 84b508c..f2ece04 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -12205,15 +12205,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 -#if 0 - val = 0; - _rtw_memcpy(&val, pbuf + i, len - i); - printk("%8X", val); -#else +#else // __LITTLE_ENDIAN u8 str[9]; u8 n; val = 0; @@ -12222,8 +12217,7 @@ static void printdata(u8 *pbuf, u32 len) sprintf(str, "%08X", val); n = (4 - n) * 2; printk("%8s", str+n); -#endif -#endif // CONFIG_LITTLE_ENDIAN +#endif // __LITTLE_ENDIAN } printk("\n"); }