Change "if(" to "if (" and the same changes for "while", "for", "switch" and "do"

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-05-08 23:04:25 -05:00
parent 124abebb96
commit a55f866a62
105 changed files with 6893 additions and 6893 deletions

View file

@ -376,10 +376,10 @@ storePwrIndexDiffRateOffset(
#define SIC_MAX_POLL_CNT 5
#if(SIC_HW_SUPPORT == 1)
#if (SIC_HW_SUPPORT == 1)
#define SIC_CMD_READY 0
#define SIC_CMD_PREWRITE 0x1
#if(RTL8188E_SUPPORT == 1)
#if (RTL8188E_SUPPORT == 1)
#define SIC_CMD_WRITE 0x40
#define SIC_CMD_PREREAD 0x2
#define SIC_CMD_READ 0x80
@ -407,7 +407,7 @@ storePwrIndexDiffRateOffset(
#define SIC_CMD_WRITE 1
#define SIC_CMD_READ 2
#if(RTL8188E_SUPPORT == 1)
#if (RTL8188E_SUPPORT == 1)
#define SIC_CMD_REG 0x1EB // 1byte
#define SIC_ADDR_REG 0x1E8 // 1b9~1ba, 2 bytes
#define SIC_DATA_REG 0x1EC // 1bc~1bf
@ -418,7 +418,7 @@ storePwrIndexDiffRateOffset(
#endif
#endif
#if(SIC_ENABLE == 1)
#if (SIC_ENABLE == 1)
VOID SIC_Init(IN PADAPTER Adapter);
#endif

View file

@ -132,7 +132,7 @@ typedef enum _WIRELESS_MODE {
} WIRELESS_MODE;
#if(TX_POWER_FOR_5G_BAND == 1)
#if (TX_POWER_FOR_5G_BAND == 1)
#define CHANNEL_MAX_NUMBER 14+24+21 // 14 is the max channel number
#define CHANNEL_GROUP_MAX 3+9 // ch1~3, ch4~9, ch10~14 total three groups
#define MAX_PG_GROUP 13

View file

@ -26,7 +26,7 @@
/******************************************************************************
* FW_AP.TXT
******************************************************************************/
#if(DM_ODM_SUPPORT_TYPE & (ODM_AP))
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP))
void
ODM_ReadFirmware_8188E_FW_AP(
IN PDM_ODM_T pDM_Odm,

View file

@ -21,7 +21,7 @@
#ifndef __HAL_PHY_RF_H__
#define __HAL_PHY_RF_H__
#if(DM_ODM_SUPPORT_TYPE & ODM_MP)
#if (DM_ODM_SUPPORT_TYPE & ODM_MP)
#define MAX_TOLERANCE 5
#define IQK_DELAY_TIME 1 //ms

View file

@ -43,9 +43,9 @@
// value: the value to be polled, masked by the msd field.
// note: driver shall implement this cmd by
// do{
// if( (Read(offset) & msk) == (value & msk) )
// if ( (Read(offset) & msk) == (value & msk) )
// break;
// } while(not timeout);
// } while (not timeout);
#define PWR_CMD_DELAY 0x03
// offset: the value to delay

View file

@ -1492,7 +1492,7 @@ enum secondary_ch_offset {
};
u8 secondary_ch_offset_to_hal_ch_offset(u8 ch_offset);
u8 hal_ch_offset_to_secondary_ch_offset(u8 ch_offset);
u8 *rtw_set_ie_ch_switch(u8 *buf, u32 *buf_len, u8 ch_switch_mode, u8 new_ch, u8 ch_switch_cnt);
u8 *rtw_set_ie_ch_switch (u8 *buf, u32 *buf_len, u8 ch_switch_mode, u8 new_ch, u8 ch_switch_cnt);
u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len, u8 secondary_ch_offset);
u8 *rtw_set_ie_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl, u8 flags, u16 reason, u16 precedence);

View file

@ -85,7 +85,7 @@
#define Smooth_TH_3 4
#define Smooth_Step_Size 5
#define Adaptive_SIR 1
#if(RTL8723_FPGA_VERIFICATION == 1)
#if (RTL8723_FPGA_VERIFICATION == 1)
#define PSD_RESCAN 1
#else
#define PSD_RESCAN 4
@ -119,7 +119,7 @@
// 2011/09/20 MH Add for AP/ADSLpseudo DM structuer requirement.
// We need to remove to other position???
//
#if(DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_MP))
#if (DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_MP))
typedef struct rtl8192cd_priv {
u1Byte temp;
@ -127,7 +127,7 @@ typedef struct rtl8192cd_priv {
#endif
#if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
typedef struct _ADAPTER{
u1Byte temp;
#ifdef AP_BUILD_WORKAROUND
@ -250,11 +250,11 @@ typedef struct _RX_High_Power_
}RXHP_T, *pRXHP_T;
#if(DM_ODM_SUPPORT_TYPE & (ODM_CE))
#if (DM_ODM_SUPPORT_TYPE & (ODM_CE))
#define ASSOCIATE_ENTRY_NUM 32 // Max size of AsocEntry[].
#define ODM_ASSOCIATE_ENTRY_NUM ASSOCIATE_ENTRY_NUM
#elif(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#elif (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#define ASSOCIATE_ENTRY_NUM NUM_STAT
#define ODM_ASSOCIATE_ENTRY_NUM ASSOCIATE_ENTRY_NUM+1
@ -353,7 +353,7 @@ typedef struct _EDCA_TURBO_
{
BOOLEAN bCurrentTurboEDCA;
BOOLEAN bIsCurRDLState;
#if(DM_ODM_SUPPORT_TYPE == ODM_CE )
#if (DM_ODM_SUPPORT_TYPE == ODM_CE )
u4Byte prv_traffic_idx; // edca turbo
#endif
@ -370,7 +370,7 @@ typedef struct _ODM_RATE_ADAPTIVE
} ODM_RATE_ADAPTIVE, *PODM_RATE_ADAPTIVE;
#if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#ifdef ADSL_AP_BUILD_WORKAROUND
@ -401,7 +401,7 @@ typedef enum _HT_IOT_PEER
HT_IOT_PEER_REALTEK_WOW = 15,
HT_IOT_PEER_MAX = 16
}HT_IOT_PEER_E, *PHTIOT_PEER_E;
#endif//#if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#endif//#if (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
@ -1070,7 +1070,7 @@ typedef enum _ANT_DIV_TYPE
//
// 2011/09/22 MH Copy from SD4 defined structure. We use to support PHY DM integration.
//
#if(DM_ODM_SUPPORT_TYPE & ODM_MP)
#if (DM_ODM_SUPPORT_TYPE & ODM_MP)
#if (RT_PLATFORM != PLATFORM_LINUX)
typedef
#endif
@ -1088,10 +1088,10 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure
// WHen you use Adapter or priv pointer, you must make sure the pointer is ready.
BOOLEAN odm_ready;
#if(DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_MP))
#if (DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_MP))
rtl8192cd_priv fake_priv;
#endif
#if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
// ADSL_AP_BUILD_WORKAROUND
ADAPTER fake_adapter;
#endif
@ -1332,7 +1332,7 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure
#endif
#endif
#if(DM_ODM_SUPPORT_TYPE & ODM_MP)
#if (DM_ODM_SUPPORT_TYPE & ODM_MP)
#if (RT_PLATFORM != PLATFORM_LINUX)
} DM_ODM_T, *PDM_ODM_T; // DM_Dynamic_Mechanism_Structure
@ -1633,7 +1633,7 @@ ODM_RAStateCheck(
OUT pu1Byte pRATRState
);
#if(DM_ODM_SUPPORT_TYPE & (ODM_MP|ODM_AP|ODM_ADSL))
#if (DM_ODM_SUPPORT_TYPE & (ODM_MP|ODM_AP|ODM_ADSL))
//============================================================
// function prototype
//============================================================
@ -1664,7 +1664,7 @@ ODM_RateAdaptiveStateApInit(
#define AP_InitRateAdaptiveState ODM_RateAdaptiveStateApInit
#if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#ifdef WIFI_WMM
VOID
ODM_IotEdcaSwitch(
@ -1680,7 +1680,7 @@ ODM_ChooseIotMainSTA(
);
#endif
#if(DM_ODM_SUPPORT_TYPE==ODM_AP)
#if (DM_ODM_SUPPORT_TYPE==ODM_AP)
#ifdef HW_ANT_SWITCH
u1Byte
ODM_Diversity_AntennaSelect(
@ -1710,7 +1710,7 @@ VOID ODM_SwAntDivChkPerPktRssi(
IN PODM_PHY_INFO_T pPhyInfo
);
#if((DM_ODM_SUPPORT_TYPE==ODM_MP)||(DM_ODM_SUPPORT_TYPE==ODM_CE))
#if ((DM_ODM_SUPPORT_TYPE==ODM_MP)||(DM_ODM_SUPPORT_TYPE==ODM_CE))
u4Byte ConvertTo_dB(u4Byte Value);
@ -1737,7 +1737,7 @@ u4Byte ODM_Get_Rate_Bitmap(
#endif
#if(DM_ODM_SUPPORT_TYPE & (ODM_MP))
#if (DM_ODM_SUPPORT_TYPE & (ODM_MP))
#define dm_PSDMonitorCallback odm_PSDMonitorCallback
VOID odm_PSDMonitorCallback(PRT_TIMER pTimer);
@ -1962,7 +1962,7 @@ ODM_AntselStatistics_88C(
IN BOOLEAN isCCKrate
);
#if( DM_ODM_SUPPORT_TYPE & (ODM_MP |ODM_CE))
#if ( DM_ODM_SUPPORT_TYPE & (ODM_MP |ODM_CE))
VOID
ODM_SingleDualAntennaDefaultSetting(
@ -1975,7 +1975,7 @@ ODM_SingleDualAntennaDetection(
IN u1Byte mode
);
#endif // #if((DM_ODM_SUPPORT_TYPE==ODM_MP)||(DM_ODM_SUPPORT_TYPE==ODM_CE))
#endif // #if ((DM_ODM_SUPPORT_TYPE==ODM_MP)||(DM_ODM_SUPPORT_TYPE==ODM_CE))
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
void odm_dtc(PDM_ODM_T pDM_Odm);

View file

@ -112,31 +112,31 @@
#if DBG
#define ODM_RT_TRACE(pDM_Odm, comp, level, fmt) \
if(((comp) & pDM_Odm->DebugComponents) && (level <= pDM_Odm->DebugLevel)) \
if (((comp) & pDM_Odm->DebugComponents) && (level <= pDM_Odm->DebugLevel)) \
{ \
if(pDM_Odm->SupportICType == ODM_RTL8192C) \
if (pDM_Odm->SupportICType == ODM_RTL8192C) \
DbgPrint("[ODM-92C] "); \
else if(pDM_Odm->SupportICType == ODM_RTL8192D) \
else if (pDM_Odm->SupportICType == ODM_RTL8192D) \
DbgPrint("[ODM-92D] "); \
else if(pDM_Odm->SupportICType == ODM_RTL8723A) \
else if (pDM_Odm->SupportICType == ODM_RTL8723A) \
DbgPrint("[ODM-8723A] "); \
else if(pDM_Odm->SupportICType == ODM_RTL8188E) \
else if (pDM_Odm->SupportICType == ODM_RTL8188E) \
DbgPrint("[ODM-8188E] "); \
else if(pDM_Odm->SupportICType == ODM_RTL8812) \
else if (pDM_Odm->SupportICType == ODM_RTL8812) \
DbgPrint("[ODM-8812] "); \
else if(pDM_Odm->SupportICType == ODM_RTL8821) \
else if (pDM_Odm->SupportICType == ODM_RTL8821) \
DbgPrint("[ODM-8821] "); \
RT_PRINTK fmt; \
}
#define ODM_RT_TRACE_F(pDM_Odm, comp, level, fmt) \
if(((comp) & pDM_Odm->DebugComponents) && (level <= pDM_Odm->DebugLevel)) \
if (((comp) & pDM_Odm->DebugComponents) && (level <= pDM_Odm->DebugLevel)) \
{ \
RT_PRINTK fmt; \
}
#define ODM_RT_ASSERT(pDM_Odm, expr, fmt) \
if(!(expr)) { \
if (!(expr)) { \
DbgPrint( "Assertion failed! %s at ......\n", #expr); \
DbgPrint( " ......%s,%s,line=%d\n",__FILE__,__FUNCTION__,__LINE__); \
RT_PRINTK fmt; \
@ -147,14 +147,14 @@
#define ODM_dbg_trace(str) { DbgPrint("%s:%s\n", __FUNCTION__, str); }
#define ODM_PRINT_ADDR(pDM_Odm, comp, level, title_str, ptr) \
if(((comp) & pDM_Odm->DebugComponents) && (level <= pDM_Odm->DebugLevel)) \
if (((comp) & pDM_Odm->DebugComponents) && (level <= pDM_Odm->DebugLevel)) \
{ \
int __i; \
pu1Byte __ptr = (pu1Byte)ptr; \
DbgPrint("[ODM] "); \
DbgPrint(title_str); \
DbgPrint(" "); \
for( __i=0; __i<6; __i++ ) \
for ( __i=0; __i<6; __i++ ) \
DbgPrint("%02X%s", __ptr[__i], (__i==5)?"":"-"); \
DbgPrint("\n"); \
}
@ -201,13 +201,13 @@ ODM_InitDebugSetting(
// RT_PRINT_XXX macros: implemented for debugging purpose.
// Added by Annie, 2005-11-21.
#define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) \
if(((_Comp) & ODM_GlobalDebugComponents) && (_Level <= ODM_GlobalDebugLevel)) \
if (((_Comp) & ODM_GlobalDebugComponents) && (_Level <= ODM_GlobalDebugLevel)) \
{ \
int __i; \
pu1Byte ptr = (pu1Byte)_HexData; \
DbgPrint("Rtl819x: "); \
DbgPrint(_TitleString); \
for( __i=0; __i<(int)_HexDataLen; __i++ ) \
for ( __i=0; __i<(int)_HexDataLen; __i++ ) \
{ \
DbgPrint("%02X%s", ptr[__i], (((__i + 1) % 4) == 0)?" ":" "); \
if (((__i + 1) % 16) == 0) DbgPrint("\n"); \
@ -216,29 +216,29 @@ ODM_InitDebugSetting(
}
#define RT_PRINT_ADDR(_Comp, _Level, _TitleString, _Ptr) \
if(((_Comp) & ODM_GlobalDebugComponents) && (_Level <= ODM_GlobalDebugLevel)) \
if (((_Comp) & ODM_GlobalDebugComponents) && (_Level <= ODM_GlobalDebugLevel)) \
{ \
int __i; \
pu1Byte ptr = (pu1Byte)_Ptr; \
DbgPrint("Rtl819x: "); \
DbgPrint(_TitleString); \
DbgPrint(" "); \
for( __i=0; __i<6; __i++ ) \
for ( __i=0; __i<6; __i++ ) \
DbgPrint("%02X%s", ptr[__i], (__i==5)?"":"-"); \
DbgPrint("\n"); \
}
#define RT_PRINT_ADDRS(_Comp, _Level, _TitleString, _Ptr, _AddNum) \
if(((_Comp) & ODM_GlobalDebugComponents) && (_Level <= ODM_GlobalDebugLevel)) \
if (((_Comp) & ODM_GlobalDebugComponents) && (_Level <= ODM_GlobalDebugLevel)) \
{ \
int __i, __j; \
pu1Byte ptr = (pu1Byte)_Ptr; \
DbgPrint("Rtl819x: "); \
DbgPrint(_TitleString); \
DbgPrint("\n"); \
for( __i=0; __i<(int)_AddNum; __i++ ) \
for ( __i=0; __i<(int)_AddNum; __i++ ) \
{ \
for( __j=0; __j<6; __j++ ) \
for ( __j=0; __j<6; __j++ ) \
DbgPrint("%02X%s", ptr[__i*6+__j], (__j==5)?"":"-"); \
DbgPrint("\n"); \
} \
@ -249,16 +249,16 @@ ODM_InitDebugSetting(
#define PRINTABLE(_ch) (_ch>=' ' &&_ch<='~' ) // I want to see ASCII 33 to 126 only. Otherwise, I print '?'. Annie, 2005-11-22.
#define RT_PRINT_STR(_Comp, _Level, _TitleString, _Ptr, _Len) \
if(((_Comp) & ODM_GlobalDebugComponents) && (_Level <= ODM_GlobalDebugLevel)) \
if (((_Comp) & ODM_GlobalDebugComponents) && (_Level <= ODM_GlobalDebugLevel)) \
{ \
int __i; \
u1Byte buffer[MAX_STR_LEN]; \
int length = (_Len<MAX_STR_LEN)? _Len : (MAX_STR_LEN-1) ; \
PlatformZeroMemory( buffer, MAX_STR_LEN ); \
PlatformMoveMemory( buffer, (pu1Byte)_Ptr, length ); \
for( __i=0; __i<MAX_STR_LEN; __i++ ) \
for ( __i=0; __i<MAX_STR_LEN; __i++ ) \
{ \
if( !PRINTABLE(buffer[__i]) ) buffer[__i] = '?'; \
if ( !PRINTABLE(buffer[__i]) ) buffer[__i] = '?'; \
} \
buffer[length] = '\0'; \
DbgPrint("Rtl819x: "); \
@ -673,19 +673,19 @@ typedef enum tag_DBGP_Flag_Type_Definition
#if DBG
#define ODM_RT_TRACE(pDM_Odm,comp, level, fmt) \
if(((comp) & GlobalDebugComponents) && (level <= GlobalDebugLevel)) \
if (((comp) & GlobalDebugComponents) && (level <= GlobalDebugLevel)) \
{ \
RT_PRINTK fmt; \
}
#define RT_TRACE_F(comp, level, fmt) \
if(((comp) & GlobalDebugComponents) && (level <= GlobalDebugLevel)) \
if (((comp) & GlobalDebugComponents) && (level <= GlobalDebugLevel)) \
{ \
RT_PRINTK fmt; \
}
#define RT_ASSERT(expr,fmt) \
if(!(expr)) { \
if (!(expr)) { \
printk( "Assertion failed! %s at ......\n", #expr); \
printk( " ......%s,%s,line=%d\n",__FILE__,__FUNCTION__,__LINE__); \
}
@ -725,13 +725,13 @@ typedef enum tag_DBGP_Flag_Type_Definition
// RT_PRINT_XXX macros: implemented for debugging purpose.
// Added by Annie, 2005-11-21.
#define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) \
if(((_Comp) & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) \
if (((_Comp) & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) \
{ \
int __i; \
pu1Byte ptr = (pu1Byte)_HexData; \
DbgPrint("Rtl819x: "); \
DbgPrint(_TitleString); \
for( __i=0; __i<(int)_HexDataLen; __i++ ) \
for ( __i=0; __i<(int)_HexDataLen; __i++ ) \
{ \
DbgPrint("%02X%s", ptr[__i], (((__i + 1) % 4) == 0)?" ":" "); \
if (((__i + 1) % 16) == 0) DbgPrint("\n"); \
@ -740,29 +740,29 @@ typedef enum tag_DBGP_Flag_Type_Definition
}
#define RT_PRINT_ADDR(_Comp, _Level, _TitleString, _Ptr) \
if(((_Comp) & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) \
if (((_Comp) & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) \
{ \
int __i; \
pu1Byte ptr = (pu1Byte)_Ptr; \
DbgPrint("Rtl819x: "); \
DbgPrint(_TitleString); \
DbgPrint(" "); \
for( __i=0; __i<6; __i++ ) \
for ( __i=0; __i<6; __i++ ) \
DbgPrint("%02X%s", ptr[__i], (__i==5)?"":"-"); \
DbgPrint("\n"); \
}
#define RT_PRINT_ADDRS(_Comp, _Level, _TitleString, _Ptr, _AddNum) \
if(((_Comp) & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) \
if (((_Comp) & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) \
{ \
int __i, __j; \
pu1Byte ptr = (pu1Byte)_Ptr; \
DbgPrint("Rtl819x: "); \
DbgPrint(_TitleString); \
DbgPrint("\n"); \
for( __i=0; __i<(int)_AddNum; __i++ ) \
for ( __i=0; __i<(int)_AddNum; __i++ ) \
{ \
for( __j=0; __j<6; __j++ ) \
for ( __j=0; __j<6; __j++ ) \
DbgPrint("%02X%s", ptr[__i*6+__j], (__j==5)?"":"-"); \
DbgPrint("\n"); \
} \
@ -773,16 +773,16 @@ typedef enum tag_DBGP_Flag_Type_Definition
#define PRINTABLE(_ch) (_ch>=' ' &&_ch<='~' ) // I want to see ASCII 33 to 126 only. Otherwise, I print '?'. Annie, 2005-11-22.
#define RT_PRINT_STR(_Comp, _Level, _TitleString, _Ptr, _Len) \
if(((_Comp) & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) \
if (((_Comp) & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) \
{ \
int __i; \
u1Byte buffer[MAX_STR_LEN]; \
int length = (_Len<MAX_STR_LEN)? _Len : (MAX_STR_LEN-1) ; \
PlatformZeroMemory( buffer, MAX_STR_LEN ); \
PlatformMoveMemory( buffer, (pu1Byte)_Ptr, length ); \
for( __i=0; __i<MAX_STR_LEN; __i++ ) \
for ( __i=0; __i<MAX_STR_LEN; __i++ ) \
{ \
if( !PRINTABLE(buffer[__i]) ) buffer[__i] = '?'; \
if ( !PRINTABLE(buffer[__i]) ) buffer[__i] = '?'; \
} \
buffer[length] = '\0'; \
DbgPrint("Rtl819x: "); \
@ -825,7 +825,7 @@ typedef enum tag_DBGP_Flag_Type_Definition
pu1Byte ptr = (pu1Byte)_Ptr; \
DbgPrint printstr; \
DbgPrint(" "); \
for( __i=0; __i<6; __i++ ) \
for ( __i=0; __i<6; __i++ ) \
DbgPrint("%02X%s", ptr[__i], (__i==5)?"":"-"); \
DbgPrint("\n"); \
}\
@ -838,7 +838,7 @@ typedef enum tag_DBGP_Flag_Type_Definition
int __i; \
pu1Byte ptr = (pu1Byte)_HexData; \
DbgPrint(_TitleString); \
for( __i=0; __i<(int)_HexDataLen; __i++ ) \
for ( __i=0; __i<(int)_HexDataLen; __i++ ) \
{ \
DbgPrint("%02X%s", ptr[__i], (((__i + 1) % 4) == 0)?" ":" ");\
if (((__i + 1) % 16) == 0) DbgPrint("\n");\

View file

@ -55,7 +55,7 @@ typedef enum _HAL_STATUS{
typedef enum _RT_SPINLOCK_TYPE{
RT_TEMP =1,
}RT_SPINLOCK_TYPE;
#elif( (DM_ODM_SUPPORT_TYPE == ODM_AP) ||(DM_ODM_SUPPORT_TYPE == ODM_ADSL))
#elif ( (DM_ODM_SUPPORT_TYPE == ODM_AP) ||(DM_ODM_SUPPORT_TYPE == ODM_ADSL))
#define VISTA_USB_RX_REVISE 0

View file

@ -387,7 +387,7 @@ static inline unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len)
{
skb->len -= len;
if(skb->len < skb->data_len)
if (skb->len < skb->data_len)
printf("%s(),%d,error!\n",__FUNCTION__,__LINE__);
return skb->data += len;
}
@ -560,7 +560,7 @@ int rtw_usb_setup_endpoint(struct usb_device *dev,
struct urb *rtw_usb_alloc_urb(uint16_t iso_packets, uint16_t mem_flags);
struct usb_host_endpoint *rtw_usb_find_host_endpoint(struct usb_device *dev, uint8_t type, uint8_t ep);
struct usb_host_interface *rtw_usb_altnum_to_altsetting(const struct usb_interface *intf, uint8_t alt_index);
struct usb_interface *rtw_usb_ifnum_to_if(struct usb_device *dev, uint8_t iface_no);
struct usb_interface *rtw_usb_ifnum_to_if (struct usb_device *dev, uint8_t iface_no);
void *rtw_usb_buffer_alloc(struct usb_device *dev, usb_size_t size, uint8_t *dma_addr);
void *rtw_usbd_get_intfdata(struct usb_interface *intf);
void rtw_usb_linux_register(void *arg);
@ -699,7 +699,7 @@ __inline static void _init_timer(_timer *ptimer,_nic_hdl padapter,void *pfunc,vo
__inline static void _set_timer(_timer *ptimer,u32 delay_time)
{
// mod_timer(ptimer , (jiffies+(delay_time*HZ/1000)));
if(ptimer->function && ptimer->arg){
if (ptimer->function && ptimer->arg){
rtw_mtx_lock(NULL);
callout_reset(&ptimer->callout, delay_time,ptimer->function, ptimer->arg);
rtw_mtx_unlock(NULL);
@ -1315,7 +1315,7 @@ extern void dbg_rtw_mfree(u8 *pbuf, u32 sz, const char *func, int line);
#define rtw_zmalloc(sz) dbg_rtw_zmalloc((sz), __FUNCTION__, __LINE__)
#define rtw_mfree(pbuf, sz) dbg_rtw_mfree((pbuf), (sz), __FUNCTION__, __LINE__)
#else
#define rtw_update_mem_stat(flag, sz) do {} while(0)
#define rtw_update_mem_stat(flag, sz) do {} while (0)
extern u8* _rtw_vmalloc(u32 sz);
extern u8* _rtw_zvmalloc(u32 sz);
extern void _rtw_vmfree(u8 *pbuf, u32 sz);

View file

@ -300,8 +300,8 @@ void UpdateEarlyModeInfo8188E(struct xmit_priv *pxmitpriv,struct xmit_buf *pxmit
void dump_txrpt_ccx_88e(void *buf);
void handle_txrpt_ccx_88e(_adapter *adapter, u8 *buf);
#else
#define dump_txrpt_ccx_88e(buf) do {} while(0)
#define handle_txrpt_ccx_88e(adapter, buf) do {} while(0)
#define dump_txrpt_ccx_88e(buf) do {} while (0)
#define handle_txrpt_ccx_88e(adapter, buf) do {} while (0)
#endif //CONFIG_XMIT_ACK
void _dbg_dump_tx_info(_adapter *padapter,int frame_tag,struct tx_desc *ptxdesc);

View file

@ -114,8 +114,8 @@ struct txrpt_ccx_8192c {
void dump_txrpt_ccx_8192c(void *buf);
void handle_txrpt_ccx_8192c(_adapter *adapter, void *buf);
#else
#define dump_txrpt_ccx_8192c(buf) do {} while(0)
#define handle_txrpt_ccx_8192c(adapter, buf) do {} while(0)
#define dump_txrpt_ccx_8192c(buf) do {} while (0)
#define handle_txrpt_ccx_8192c(adapter, buf) do {} while (0)
#endif
#ifdef CONFIG_USB_HCI

View file

@ -129,8 +129,8 @@ struct txrpt_ccx_8192d {
void dump_txrpt_ccx_8192d(void *buf);
void handle_txrpt_ccx_8192d(_adapter *adapter, void *buf);
#else
#define dump_txrpt_ccx_8192d(buf) do {} while(0)
#define handle_txrpt_ccx_8192d(adapter, buf) do {} while(0)
#define dump_txrpt_ccx_8192d(buf) do {} while (0)
#define handle_txrpt_ccx_8192d(adapter, buf) do {} while (0)
#endif
#ifdef CONFIG_USB_HCI

View file

@ -142,7 +142,7 @@ typedef struct _CHNL_TXPOWER_TRIPLE
// ===== Below this line is sync from SD7 driver COMMON/bt_hci.h =====
#define BT_THREAD 0
#if(BT_THREAD == 1)
#if (BT_THREAD == 1)
#define SENDTXMEHTOD 2
#else
#define SENDTXMEHTOD 1 // 0=workitem, 1= SendDirectily, 2=thread
@ -1150,14 +1150,14 @@ typedef struct _BT30Info
BT_TRAFFIC BtTraffic;
BT_SECURITY BtSec;
#if(BT_THREAD == 0)
#if (BT_THREAD == 0)
RT_WORK_ITEM HCICmdWorkItem;
RT_TIMER BTHCICmdTimer;
#endif
#if (SENDTXMEHTOD==0)
RT_WORK_ITEM HCISendACLDataWorkItem;
RT_TIMER BTHCISendAclDataTimer;
#elif(SENDTXMEHTOD==2)
#elif (SENDTXMEHTOD==2)
RT_THREAD BTTxThread;
#endif
RT_WORK_ITEM BTPsDisableWorkItem;

View file

@ -211,8 +211,8 @@ struct txrpt_ccx_8723a {
void dump_txrpt_ccx_8723a(void *buf);
void handle_txrpt_ccx_8723a(_adapter *adapter, void *buf);
#else
#define dump_txrpt_ccx_8723a(buf) do {} while(0)
#define handle_txrpt_ccx_8723a(adapter, buf) do {} while(0)
#define dump_txrpt_ccx_8723a(buf) do {} while (0)
#define handle_txrpt_ccx_8723a(adapter, buf) do {} while (0)
#endif //CONFIG_XMIT_ACK
void rtl8723a_update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem);

View file

@ -54,7 +54,7 @@ void sta_info_update(_adapter *padapter, struct sta_info *psta);
void ap_sta_info_defer_update(_adapter *padapter, struct sta_info *psta);
u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reason);
int rtw_sta_flush(_adapter *padapter);
int rtw_ap_inform_ch_switch(_adapter *padapter, u8 new_ch, u8 ch_offset);
int rtw_ap_inform_ch_switch (_adapter *padapter, u8 new_ch, u8 ch_offset);
void start_ap_mode(_adapter *padapter);
void stop_ap_mode(_adapter *padapter);
#endif

View file

@ -26,7 +26,7 @@
#include <rtw_mp.h>
#if(MP_DRIVER == 1)
#if (MP_DRIVER == 1)
#pragma pack(1)
@ -295,7 +295,7 @@ typedef enum _BT_CTRL_OPCODE_LOWER{
#endif /* #if(MP_DRIVER == 1) */
#endif /* #if (MP_DRIVER == 1) */
#endif // #ifndef __INC_MPT_BT_H

View file

@ -127,7 +127,7 @@ do {\
pcmd->cmdsz = sizeof (*pparm);\
pcmd->rsp = NULL;\
pcmd->rspsz = 0;\
} while(0)
} while (0)
struct c2h_evt_hdr {
u8 id:4;

View file

@ -155,21 +155,21 @@
extern void rtl871x_cedbg(const char *fmt, ...);
#endif
#define RT_TRACE(_Comp, _Level, Fmt) do{}while(0)
#define _func_enter_ do{}while(0)
#define _func_exit_ do{}while(0)
#define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) do{}while(0)
#define RT_TRACE(_Comp, _Level, Fmt) do{}while (0)
#define _func_enter_ do{}while (0)
#define _func_exit_ do{}while (0)
#define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) do{}while (0)
#ifdef PLATFORM_WINDOWS
#define DBG_871X do {} while(0)
#define MSG_8192C do {} while(0)
#define DBG_8192C do {} while(0)
#define DBG_871X_LEVEL do {} while(0)
#define DBG_871X do {} while (0)
#define MSG_8192C do {} while (0)
#define DBG_8192C do {} while (0)
#define DBG_871X_LEVEL do {} while (0)
#else
#define DBG_871X(x, ...) do {} while(0)
#define MSG_8192C(x, ...) do {} while(0)
#define DBG_8192C(x,...) do {} while(0)
#define DBG_871X_LEVEL(x,...) do {} while(0)
#define DBG_871X(x, ...) do {} while (0)
#define MSG_8192C(x, ...) do {} while (0)
#define DBG_8192C(x,...) do {} while (0)
#define DBG_871X_LEVEL(x,...) do {} while (0)
#endif
#undef _dbgdump
@ -199,7 +199,7 @@ extern void rtl871x_cedbg(const char *fmt, ...);
else \
_dbgdump(DRIVER_PREFIX fmt, ##arg);\
}\
}while(0)
}while (0)
#endif
#ifdef CONFIG_DEBUG
@ -207,17 +207,17 @@ extern void rtl871x_cedbg(const char *fmt, ...);
#undef DBG_871X
#define DBG_871X(...) do {\
_dbgdump(DRIVER_PREFIX __VA_ARGS__);\
}while(0)
}while (0)
#undef MSG_8192C
#define MSG_8192C(...) do {\
_dbgdump(DRIVER_PREFIX __VA_ARGS__);\
}while(0)
}while (0)
#undef DBG_8192C
#define DBG_8192C(...) do {\
_dbgdump(DRIVER_PREFIX __VA_ARGS__);\
}while(0)
}while (0)
#endif
#endif /* CONFIG_DEBUG */
@ -232,11 +232,11 @@ extern void rtl871x_cedbg(const char *fmt, ...);
#undef RT_TRACE
#define RT_TRACE(_Comp, _Level, Fmt)\
do {\
if((_Comp & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) {\
if ((_Comp & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) {\
_dbgdump("%s [0x%08x,%d]", DRIVER_PREFIX, (unsigned int)_Comp, _Level);\
_dbgdump Fmt;\
}\
}while(0)
}while (0)
#endif
@ -250,7 +250,7 @@ extern void rtl871x_cedbg(const char *fmt, ...);
{ \
_dbgdump("\n %s : %s enters at %d\n", DRIVER_PREFIX, __FUNCTION__, __LINE__);\
} \
} while(0)
} while (0)
#undef _func_exit_
#define _func_exit_ \
@ -259,17 +259,17 @@ extern void rtl871x_cedbg(const char *fmt, ...);
{ \
_dbgdump("\n %s : %s exits at %d\n", DRIVER_PREFIX, __FUNCTION__, __LINE__); \
} \
} while(0)
} while (0)
#undef RT_PRINT_DATA
#define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) \
if(((_Comp) & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) \
if (((_Comp) & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) \
{ \
int __i; \
u8 *ptr = (u8 *)_HexData; \
_dbgdump("%s", DRIVER_PREFIX); \
_dbgdump(_TitleString); \
for( __i=0; __i<(int)_HexDataLen; __i++ ) \
for ( __i=0; __i<(int)_HexDataLen; __i++ ) \
{ \
_dbgdump("%02X%s", ptr[__i], (((__i + 1) % 4) == 0)?" ":" "); \
if (((__i + 1) % 16) == 0) _dbgdump("\n"); \

View file

@ -65,7 +65,7 @@
#define OID_MP_SEG4 0xFF011100
#define DEBUG_OID(dbg, str) \
if((!dbg)) \
if ((!dbg)) \
{ \
RT_TRACE(_module_rtl871x_ioctl_c_,_drv_info_,("%s(%d): %s", __FUNCTION__, __LINE__, str)); \
}

View file

@ -206,9 +206,9 @@ struct led_priv{
#ifdef CONFIG_SW_LED
#define rtw_led_control(adapter, LedAction) \
do { \
if((adapter)->ledpriv.LedControlHandler) \
if ((adapter)->ledpriv.LedControlHandler) \
(adapter)->ledpriv.LedControlHandler((adapter), (LedAction)); \
} while(0)
} while (0)
#else //CONFIG_SW_LED
#define rtw_led_control(adapter, LedAction)
#endif //CONFIG_SW_LED

View file

@ -651,7 +651,7 @@ __inline static void set_fwstate(struct mlme_priv *pmlmepriv, sint state)
{
pmlmepriv->fw_state |= state;
//FOR HW integration
if(_FW_UNDER_SURVEY==state){
if (_FW_UNDER_SURVEY==state){
pmlmepriv->bScanInProcess = _TRUE;
}
}
@ -660,7 +660,7 @@ __inline static void _clr_fwstate_(struct mlme_priv *pmlmepriv, sint state)
{
pmlmepriv->fw_state &= ~state;
//FOR HW integration
if(_FW_UNDER_SURVEY==state){
if (_FW_UNDER_SURVEY==state){
pmlmepriv->bScanInProcess = _FALSE;
}
}

View file

@ -692,7 +692,7 @@ int issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int power_mod
int issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid, int try_cnt, int wait_ms);
int issue_deauth(_adapter *padapter, unsigned char *da, unsigned short reason);
int issue_deauth_ex(_adapter *padapter, u8 *da, unsigned short reason, int try_cnt, int wait_ms);
void issue_action_spct_ch_switch(_adapter *padapter, u8 *ra, u8 new_ch, u8 ch_offset);
void issue_action_spct_ch_switch (_adapter *padapter, u8 *ra, u8 new_ch, u8 ch_offset);
void issue_action_BA(_adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short status);
unsigned int send_delba(_adapter *padapter, u8 initiator, u8 *addr);
unsigned int send_beacon(_adapter *padapter);
@ -741,13 +741,13 @@ void addba_timer_hdl(struct sta_info *psta);
do { \
/*DBG_871X("%s set_survey_timer(%p, %d)\n", __FUNCTION__, (mlmeext), (ms));*/ \
_set_timer(&(mlmeext)->survey_timer, (ms)); \
} while(0)
} while (0)
#define set_link_timer(mlmeext, ms) \
do { \
/*DBG_871X("%s set_link_timer(%p, %d)\n", __FUNCTION__, (mlmeext), (ms));*/ \
_set_timer(&(mlmeext)->link_timer, (ms)); \
} while(0)
} while (0)
extern int cckrates_included(unsigned char *rate, int ratelen);
extern int cckratesonly_included(unsigned char *rate, int ratelen);

View file

@ -76,21 +76,21 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role);
static inline void _rtw_p2p_set_state(struct wifidirect_info *wdinfo, enum P2P_STATE state)
{
if(wdinfo->p2p_state != state) {
if (wdinfo->p2p_state != state) {
//wdinfo->pre_p2p_state = wdinfo->p2p_state;
wdinfo->p2p_state = state;
}
}
static inline void _rtw_p2p_set_pre_state(struct wifidirect_info *wdinfo, enum P2P_STATE state)
{
if(wdinfo->pre_p2p_state != state) {
if (wdinfo->pre_p2p_state != state) {
wdinfo->pre_p2p_state = state;
}
}
#if 0
static inline void _rtw_p2p_restore_state(struct wifidirect_info *wdinfo)
{
if(wdinfo->pre_p2p_state != -1) {
if (wdinfo->pre_p2p_state != -1) {
wdinfo->p2p_state = wdinfo->pre_p2p_state;
wdinfo->pre_p2p_state = -1;
}
@ -98,7 +98,7 @@ static inline void _rtw_p2p_restore_state(struct wifidirect_info *wdinfo)
#endif
static inline void _rtw_p2p_set_role(struct wifidirect_info *wdinfo, enum P2P_ROLE role)
{
if(wdinfo->role != role) {
if (wdinfo->role != role) {
wdinfo->role = role;
}
}

View file

@ -307,7 +307,7 @@ struct pwrctrl_priv
do { \
/*DBG_871X("%s _rtw_set_pwr_state_check_timer(%p, %d)\n", __FUNCTION__, (pwrctrlpriv), (ms));*/ \
_set_timer(&(pwrctrlpriv)->pwr_state_check_timer, (ms)); \
} while(0)
} while (0)
#define rtw_set_pwr_state_check_timer(pwrctrlpriv) \
_rtw_set_pwr_state_check_timer((pwrctrlpriv), (pwrctrlpriv)->pwr_state_check_interval)

View file

@ -516,7 +516,7 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext);
__inline static u8 *get_rxmem(union recv_frame *precvframe)
{
//always return rx_head...
if(precvframe==NULL)
if (precvframe==NULL)
return NULL;
return precvframe->u.hdr.rx_head;
@ -533,7 +533,7 @@ __inline static u8 *get_recvframe_data(union recv_frame *precvframe)
{
//alwasy return rx_data
if(precvframe==NULL)
if (precvframe==NULL)
return NULL;
return precvframe->u.hdr.rx_data;
@ -550,12 +550,12 @@ __inline static u8 *recvframe_push(union recv_frame *precvframe, sint sz)
* start. rx_data must be still larger than rx_head, after pushing.
*/
if(precvframe==NULL)
if (precvframe==NULL)
return NULL;
precvframe->u.hdr.rx_data -= sz ;
if( precvframe->u.hdr.rx_data < precvframe->u.hdr.rx_head )
if ( precvframe->u.hdr.rx_data < precvframe->u.hdr.rx_head )
{
precvframe->u.hdr.rx_data += sz ;
return NULL;
@ -575,13 +575,13 @@ __inline static u8 *recvframe_pull(union recv_frame *precvframe, sint sz)
//used for extract sz bytes from rx_data, update rx_data and return the updated rx_data to the caller
if(precvframe==NULL)
if (precvframe==NULL)
return NULL;
precvframe->u.hdr.rx_data += sz;
if(precvframe->u.hdr.rx_data > precvframe->u.hdr.rx_tail)
if (precvframe->u.hdr.rx_data > precvframe->u.hdr.rx_tail)
{
precvframe->u.hdr.rx_data -= sz;
return NULL;
@ -601,14 +601,14 @@ __inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz)
//after putting, rx_tail must be still larger than rx_end.
unsigned char * prev_rx_tail;
if(precvframe==NULL)
if (precvframe==NULL)
return NULL;
prev_rx_tail = precvframe->u.hdr.rx_tail;
precvframe->u.hdr.rx_tail += sz;
if(precvframe->u.hdr.rx_tail > precvframe->u.hdr.rx_end)
if (precvframe->u.hdr.rx_tail > precvframe->u.hdr.rx_end)
{
precvframe->u.hdr.rx_tail -= sz;
return NULL;
@ -629,12 +629,12 @@ __inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
//used for extract sz bytes from rx_end, update rx_end and return the updated rx_end to the caller
//after pulling, rx_end must be still larger than rx_data.
if(precvframe==NULL)
if (precvframe==NULL)
return NULL;
precvframe->u.hdr.rx_tail -= sz;
if(precvframe->u.hdr.rx_tail < precvframe->u.hdr.rx_data)
if (precvframe->u.hdr.rx_tail < precvframe->u.hdr.rx_data)
{
precvframe->u.hdr.rx_tail += sz;
return NULL;
@ -652,7 +652,7 @@ __inline static _buffer * get_rxbuf_desc(union recv_frame *precvframe)
{
_buffer * buf_desc;
if(precvframe==NULL)
if (precvframe==NULL)
return NULL;
#ifdef PLATFORM_WINDOWS
NdisQueryPacket(precvframe->u.hdr.pkt, NULL, NULL, &buf_desc, NULL);

View file

@ -204,7 +204,7 @@ struct sha256_state {
#define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst)\
do{\
switch(psecuritypriv->dot11AuthAlgrthm)\
switch (psecuritypriv->dot11AuthAlgrthm)\
{\
case dot11AuthAlgrthm_Open:\
case dot11AuthAlgrthm_Shared:\
@ -212,7 +212,7 @@ do{\
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm;\
break;\
case dot11AuthAlgrthm_8021X:\
if(bmcst)\
if (bmcst)\
encry_algo = (u8)psecuritypriv->dot118021XGrpPrivacy;\
else\
encry_algo =(u8) psta->dot118021XPrivacy;\
@ -221,12 +221,12 @@ do{\
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm;\
break;\
}\
}while(0)
}while (0)
#define SET_ICE_IV_LEN( iv_len, icv_len, encrypt)\
do{\
switch(encrypt)\
switch (encrypt)\
{\
case _WEP40_:\
case _WEP104_:\
@ -250,7 +250,7 @@ do{\
icv_len = 0;\
break;\
}\
}while(0)
}while (0)
#define GET_TKIP_PN(iv,dot11txpn)\
@ -261,7 +261,7 @@ do{\
dot11txpn._byte_.TSC3=iv[5];\
dot11txpn._byte_.TSC4=iv[6];\
dot11txpn._byte_.TSC5=iv[7];\
}while(0)
}while (0)
#define ROL32( A, n ) ( ((A) << (n)) | ( ((A)>>(32-(n))) & ( (1UL << (n)) - 1 ) ) )

View file

@ -26,25 +26,25 @@ static inline void dump_buf(u8 *buf, u32 len)
{
u32 i;
printk("-----------------Len %d----------------\n", len);
for(i=0; i<len; i++)
for (i=0; i<len; i++)
printk("%2.2x-", *(buf+i));
printk("\n");
}
#define WAPI_TRACE(component, x, args...) \
do { if(wapi_debug_component & (component)) \
do { if (wapi_debug_component & (component)) \
printk(KERN_DEBUG "WAPI" ":" x "" , \
##args);\
}while(0);
}while (0);
#define WAPI_DATA(component, x, buf, len) \
do { if(wapi_debug_component & (component)){ \
do { if (wapi_debug_component & (component)){ \
printk("%s:\n", x);\
dump_buf((buf), (len));}\
}while(0);
}while (0);
#define RT_ASSERT_RET(_Exp) \
if(!(_Exp)) \
if (!(_Exp)) \
{ \
printk("RTWLAN: "); \
printk( "Assertion failed! %s,%s,line=%d\n", \
@ -52,7 +52,7 @@ do { if(wapi_debug_component & (component)){ \
return; \
}
#define RT_ASSERT_RET_VALUE(_Exp,Ret) \
if(!(_Exp)) \
if (!(_Exp)) \
{ \
printk("RTWLAN: "); \
printk( "Assertion failed! %s,%s,line=%d\n", \
@ -61,10 +61,10 @@ do { if(wapi_debug_component & (component)){ \
}
#else
#define RT_ASSERT_RET(_Exp) do {} while(0)
#define RT_ASSERT_RET_VALUE(_Exp,Ret) do {} while(0)
#define WAPI_TRACE(component, x, args...) do {} while(0)
#define WAPI_DATA(component, x, buf, len) do {} while(0)
#define RT_ASSERT_RET(_Exp) do {} while (0)
#define RT_ASSERT_RET_VALUE(_Exp,Ret) do {} while (0)
#define WAPI_TRACE(component, x, args...) do {} while (0)
#define WAPI_DATA(component, x, buf, len) do {} while (0)
#endif

View file

@ -108,7 +108,7 @@ do{\
pattrib_iv[2] = dot11txpn._byte_.TSC2;\
pattrib_iv[3] = ((keyidx & 0x3)<<6);\
dot11txpn.val = (dot11txpn.val == 0xffffff) ? 0: (dot11txpn.val+1);\
}while(0)
}while (0)
#define TKIP_IV(pattrib_iv, dot11txpn, keyidx)\
@ -122,7 +122,7 @@ do{\
pattrib_iv[6] = dot11txpn._byte_.TSC4;\
pattrib_iv[7] = dot11txpn._byte_.TSC5;\
dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0: (dot11txpn.val+1);\
}while(0)
}while (0)
#define AES_IV(pattrib_iv, dot11txpn, keyidx)\
do{\
@ -135,7 +135,7 @@ do{\
pattrib_iv[6] = dot11txpn._byte_.TSC4;\
pattrib_iv[7] = dot11txpn._byte_.TSC5;\
dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0: (dot11txpn.val+1);\
}while(0)
}while (0)
#define HWXMIT_ENTRY 4

View file

@ -356,7 +356,7 @@ struct sta_info {
sta->sta_stats.last_rx_probersp_uo_pkts = sta->sta_stats.rx_probersp_uo_pkts; \
sta->sta_stats.last_rx_ctrl_pkts = sta->sta_stats.rx_ctrl_pkts; \
sta->sta_stats.last_rx_data_pkts = sta->sta_stats.rx_data_pkts; \
} while(0)
} while (0)
#define STA_RX_PKTS_ARG(sta) \
sta->sta_stats.rx_mgnt_pkts \

View file

@ -112,7 +112,7 @@ static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj)
{
int ret = _FALSE;
int value;
if( (value=ATOMIC_INC_RETURN(&dvobj->continual_urb_error)) > MAX_CONTINUAL_URB_ERR) {
if ( (value=ATOMIC_INC_RETURN(&dvobj->continual_urb_error)) > MAX_CONTINUAL_URB_ERR) {
DBG_871X("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n", dvobj, value, MAX_CONTINUAL_URB_ERR);
ret = _TRUE;
} else {

View file

@ -255,26 +255,26 @@ enum WIFI_REG_DOMAIN {
#define SetToDs(pbuf) \
do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_TO_DS_); \
} while(0)
} while (0)
#define GetToDs(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_TO_DS_)) != 0)
#define ClearToDs(pbuf) \
do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_TO_DS_)); \
} while(0)
} while (0)
#define SetFrDs(pbuf) \
do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_FROM_DS_); \
} while(0)
} while (0)
#define GetFrDs(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_FROM_DS_)) != 0)
#define ClearFrDs(pbuf) \
do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \
} while(0)
} while (0)
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
@ -282,62 +282,62 @@ enum WIFI_REG_DOMAIN {
#define SetMFrag(pbuf) \
do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \
} while(0)
} while (0)
#define GetMFrag(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_MORE_FRAG_)) != 0)
#define ClearMFrag(pbuf) \
do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)); \
} while(0)
} while (0)
#define SetRetry(pbuf) \
do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_RETRY_); \
} while(0)
} while (0)
#define GetRetry(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_RETRY_)) != 0)
#define ClearRetry(pbuf) \
do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_RETRY_)); \
} while(0)
} while (0)
#define SetPwrMgt(pbuf) \
do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_PWRMGT_); \
} while(0)
} while (0)
#define GetPwrMgt(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_PWRMGT_)) != 0)
#define ClearPwrMgt(pbuf) \
do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)); \
} while(0)
} while (0)
#define SetMData(pbuf) \
do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_MORE_DATA_); \
} while(0)
} while (0)
#define GetMData(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_MORE_DATA_)) != 0)
#define ClearMData(pbuf) \
do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)); \
} while(0)
} while (0)
#define SetPrivacy(pbuf) \
do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_PRIVACY_); \
} while(0)
} while (0)
#define GetPrivacy(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_PRIVACY_)) != 0)
#define ClearPrivacy(pbuf) \
do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)); \
} while(0)
} while (0)
#define GetOrder(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0)
@ -348,7 +348,7 @@ enum WIFI_REG_DOMAIN {
do { \
*(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \
*(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
} while(0)
} while (0)
#define GetFrameSubType(pbuf) (cpu_to_le16(*(unsigned short *)(pbuf)) & (BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
@ -356,7 +356,7 @@ enum WIFI_REG_DOMAIN {
do { \
*(unsigned short *)(pbuf) &= cpu_to_le16(~(BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2))); \
*(unsigned short *)(pbuf) |= cpu_to_le16(type); \
} while(0)
} while (0)
#define GetSequence(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) >> 4)
@ -369,37 +369,37 @@ enum WIFI_REG_DOMAIN {
*(unsigned short *)((SIZE_PTR)(pbuf) + 22) = \
((*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & le16_to_cpu(~(0x000f))) | \
cpu_to_le16(0x0f & (num)); \
} while(0)
} while (0)
#define SetSeqNum(pbuf, num) \
do { \
*(unsigned short *)((SIZE_PTR)(pbuf) + 22) = \
((*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & le16_to_cpu((unsigned short)~0xfff0)) | \
le16_to_cpu((unsigned short)(0xfff0 & (num << 4))); \
} while(0)
} while (0)
#define SetDuration(pbuf, dur) \
do { \
*(unsigned short *)((SIZE_PTR)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)); \
} while(0)
} while (0)
#define SetPriority(pbuf, tid) \
do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(tid & 0xf); \
} while(0)
} while (0)
#define GetPriority(pbuf) ((le16_to_cpu(*(unsigned short *)(pbuf))) & 0xf)
#define SetEOSP(pbuf, eosp) \
do { \
*(unsigned short *)(pbuf) |= cpu_to_le16( (eosp & 1) << 4); \
} while(0)
} while (0)
#define SetAckpolicy(pbuf, ack) \
do { \
*(unsigned short *)(pbuf) |= cpu_to_le16( (ack & 3) << 5); \
} while(0)
} while (0)
#define GetAckpolicy(pbuf) (((le16_to_cpu(*(unsigned short *)pbuf)) >> 5) & 0x3)
@ -408,7 +408,7 @@ enum WIFI_REG_DOMAIN {
#define SetAMsdu(pbuf, amsdu) \
do { \
*(unsigned short *)(pbuf) |= cpu_to_le16( (amsdu & 1) << 7); \
} while(0)
} while (0)
#define GetAid(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 2)) & 0x3fff)
@ -514,7 +514,7 @@ __inline static unsigned char * get_hdr_bssid(unsigned char *pframe)
__inline static int IsFrameTypeCtrl(unsigned char *pframe)
{
if(WIFI_CTRL_TYPE == GetFrameType(pframe))
if (WIFI_CTRL_TYPE == GetFrameType(pframe))
return _TRUE;
else
return _FALSE;
@ -647,7 +647,7 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
#define SetOrderBit(pbuf) \
do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_ORDER_); \
} while(0)
} while (0)
#define GetOrderBit(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0)