rtl8188eu: Convert to use __LITTLE_ENDIAN symbol from kernel

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2018-10-24 17:25:46 -05:00
parent 11c5d28b89
commit 94afbb0df3
8 changed files with 45 additions and 116 deletions

View file

@ -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)
#else
/* byte 1 */
u8 reserved:1,
aci:2,
@ -82,8 +82,6 @@ struct wme_ac_parameter {
/* byte 2 */
u8 eCWmax:4,
eCWmin:4;
#else
#error "Please fix <endian.h>"
#endif
/* bytes 3 & 4 */

View file

@ -21,18 +21,12 @@
#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)
#if defined(__LITTLE_ENDIAN)
#ifndef CONFIG_PLATFORM_MSTAR389
#include <byteorder/little_endian.h>
#endif
#elif defined (CONFIG_BIG_ENDIAN)
#include <byteorder/big_endian.h>
#else
# error "Must be LITTLE/BIG Endian Host"
#include <byteorder/big_endian.h>
#endif
#endif /* _RTL871X_BYTEORDER_H_ */

View file

@ -155,7 +155,7 @@ struct intf_hdl {
struct reg_protocol_rd {
#ifdef CONFIG_LITTLE_ENDIAN
#ifdef __LITTLE_ENDIAN
/* DW1 */
u32 NumOfTrans:4;
@ -179,25 +179,20 @@ struct reg_protocol_rd {
/* DW1 */
u32 Reserved2:24;
u32 Reserved1:4;
u32 NumOfTrans:4;
u32 Reserved2:24;
/* DW2 */
u32 WriteEnable:1;
u32 ByteCount:7;
u32 Reserved4:16;
u32 Reserved3:3;
u32 Byte4Access:1;
u32 Byte2Access:1;
u32 WriteEnable:1;
u32 Byte1Access:1;
u32 BurstMode:1;
u32 FixOrContinuous:1;
u32 Reserved4:16;
u32 ByteCount:7;
/* DW3 */
u32 BusAddress;
@ -206,14 +201,12 @@ struct reg_protocol_rd {
/* u32 Value; */
#endif
};
struct reg_protocol_wt {
#ifdef CONFIG_LITTLE_ENDIAN
#ifdef __LITTLE_ENDIAN
/* DW1 */
u32 NumOfTrans:4;
@ -236,24 +229,21 @@ struct reg_protocol_wt {
#else
/* DW1 */
u32 Reserved2:24;
u32 Reserved1:4;
u32 NumOfTrans:4;
u32 Reserved2:24;
/* DW2 */
u32 WriteEnable:1;
u32 ByteCount:7;
u32 Reserved4:16;
u32 Reserved3:3;
u32 Byte4Access:1;
u32 Byte2Access:1;
u32 Byte1Access:1;
u32 BurstMode:1;
u32 FixOrContinuous:1;
u32 Reserved4:16;
u32 WriteEnable:1;
u32 ByteCount:7;
/* DW3 */
u32 BusAddress;

View file

@ -1183,27 +1183,17 @@ struct cmd_hdl wlancmds[] = {
#endif
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
unsigned int rsvd;
};
void rtw_dummy_event_callback(_adapter *adapter , u8 *pbuf);

View file

@ -77,7 +77,7 @@ union pn48 {
u64 val;
#ifdef CONFIG_LITTLE_ENDIAN
#ifdef __LITTLE_ENDIAN
struct {
u8 TSC0;
@ -90,7 +90,7 @@ struct {
u8 TSC7;
} _byte_;
#elif defined(CONFIG_BIG_ENDIAN)
#else
struct {
u8 TSC7;