staging: r8188eu: clean up spacing style issues in hal dir
cover staging: r8188eu: clean up spacing style issues in hal dir
This series cleans up coding style issues in the hal directory reported by checkpatch --types SPACING.
Michael Straube (3):
staging: r8188eu: clean up spacing style issues in hal dir, part 1
staging: r8188eu: clean up spacing style issues in hal dir, part 2
staging: r8188eu: clean up spacing style issues in hal dir, part 3
.../r8188eu/hal/Hal8188ERateAdaptive.c | 48 ++-- .../staging/r8188eu/hal/HalHWImg8188E_BB.c | 22 +- .../staging/r8188eu/hal/HalHWImg8188E_MAC.c | 6 +- .../staging/r8188eu/hal/HalHWImg8188E_RF.c | 6 +- drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 138 +++++----- drivers/staging/r8188eu/hal/HalPwrSeqCmd.c | 2 +- drivers/staging/r8188eu/hal/hal_com.c | 36 +-- drivers/staging/r8188eu/hal/hal_intf.c | 4 +- drivers/staging/r8188eu/hal/odm.c | 114 ++++----- drivers/staging/r8188eu/hal/odm_HWConfig.c | 84 +++---- drivers/staging/r8188eu/hal/odm_RTL8188E.c | 70 +++--- .../staging/r8188eu/hal/odm_RegConfig8188E.c | 8 +- drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 74 +++--- .../staging/r8188eu/hal/rtl8188e_hal_init.c | 238 +++++++++--------- drivers/staging/r8188eu/hal/rtl8188e_mp.c | 40 +-- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 60 ++--- drivers/staging/r8188eu/hal/rtl8188e_rf6052.c | 66 ++--- drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 2 +- drivers/staging/r8188eu/hal/rtl8188eu_led.c | 10 +- drivers/staging/r8188eu/hal/rtl8188eu_recv.c | 2 +- drivers/staging/r8188eu/hal/rtl8188eu_xmit.c | 36 +-- drivers/staging/r8188eu/hal/usb_halinit.c | 162 ++++++------ drivers/staging/r8188eu/hal/usb_ops_linux.c | 20 +- 23 files changed, 624 insertions(+), 624 deletions(-)
Signature · 1 line
2.32.0
PATCH 1/3 staging: r8188eu: clean up spacing style issues in hal dir, part 1
Clean up spacing style issues reported by checkpatch in the first 10 files in the hal directory.
CHECK: spaces preferred around that ...
CHECK: No space is necessary after a cast
--- .../r8188eu/hal/Hal8188ERateAdaptive.c | 48 +++--- .../staging/r8188eu/hal/HalHWImg8188E_BB.c | 22 +-- .../staging/r8188eu/hal/HalHWImg8188E_MAC.c | 6 +- .../staging/r8188eu/hal/HalHWImg8188E_RF.c | 6 +- drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 138 +++++++++--------- drivers/staging/r8188eu/hal/HalPwrSeqCmd.c | 2 +- drivers/staging/r8188eu/hal/hal_com.c | 36 ++--- drivers/staging/r8188eu/hal/hal_intf.c | 4 +- drivers/staging/r8188eu/hal/odm.c | 114 +++++++-------- 9 files changed, 188 insertions(+), 188 deletions(-)
drivers/staging/r8188eu/hal/Hal8188ERateAdaptive.c +24 -24
@@ -16,7 +16,7 @@ Major Change History:/* Rate adaptive parameters */ -static u8 RETRY_PENALTY [PERENTRY ][RETRYSIZE +1 ] = { +static u8 RETRY_PENALTY [PERENTRY ][RETRYSIZE +1 ] = { {5 ,4 ,3 ,2 ,0 ,3 },/* 92 , idx = 0 */ {6 ,5 ,4 ,3 ,0 ,4 },/* 86 , idx = 1 */ {6 ,5 ,4 ,2 ,0 ,4 },/* 81 , idx = 2 */
@@ -42,7 +42,7 @@ static u8 RETRY_PENALTY[PERENTRY][RETRYSIZE+1] = { {49, 16, 16, 0, 0, 48} };/* 3, idx = 0x16 */ -static u8 PT_PENALTY [RETRYSIZE +1 ] = {34 ,31 ,30 ,24 ,0 ,32 }; +static u8 PT_PENALTY [RETRYSIZE +1 ] = {34 ,31 ,30 ,24 ,0 ,32 };/* wilson modify */ static u8 RETRY_PENALTY_IDX [2 ][RATESIZE ] = {
@@ -132,7 +132,7 @@ static int odm_RateDown_8188E(struct odm_dm_struct *dm_odm, struct odm_ra_info * pRaInfo->RateSGI =0 ; }else if (RateID > LowestRate) {if (RateID >0 ) { -for (i = RateID-1 ; i > LowestRate; i--) { +for (i = RateID -1 ; i > LowestRate; i--) {if (pRaInfo->RAUseRate &BIT (i)) { RateID = i; goto RateDownFinish;
@@ -183,7 +183,7 @@ static int odm_RateUp_8188E(odm_SetTxRPTTiming_8188E (dm_odm, pRaInfo,0 );if (RateID < HighestRate) { -for (i = RateID+1 ; i <= HighestRate; i++) { +for (i = RateID +1 ; i <= HighestRate; i++) {if (pRaInfo->RAUseRate &BIT (i)) { RateID = i; goto RateUpfinish;
@@ -198,7 +198,7 @@ static int odm_RateUp_8188E( RateID = HighestRate; } RateUpfinish: -if (pRaInfo->RAWaitingCounter == (4 +PendingForRateUpFail[pRaInfo->RAPendingCounter])) +if (pRaInfo->RAWaitingCounter == (4 + PendingForRateUpFail[pRaInfo->RAPendingCounter])) pRaInfo->RAWaitingCounter =0 ;else pRaInfo->RAWaitingCounter++;
@@ -212,8 +212,8 @@ static void odm_ResetRaCounter_8188E(struct odm_ra_info *pRaInfo)u8 RateID; RateID = pRaInfo->DecisionRate; - pRaInfo->NscUp = (N_THRESHOLD_HIGH [RateID]+N_THRESHOLD_LOW [RateID])>>1 ; - pRaInfo->NscDown = (N_THRESHOLD_HIGH [RateID]+N_THRESHOLD_LOW [RateID])>>1 ; + pRaInfo->NscUp = (N_THRESHOLD_HIGH [RateID] +N_THRESHOLD_LOW [RateID]) >>1 ; + pRaInfo->NscDown = (N_THRESHOLD_HIGH [RateID] +N_THRESHOLD_LOW [RateID]) >>1 ; } static void odm_RateDecision_8188E(struct odm_dm_struct *dm_odm,
@@ -295,41 +295,41 @@ static int odm_ARFBRefresh_8188E(struct odm_dm_struct *dm_odm, struct odm_ra_infswitch (pRaInfo->RateID) {case RATR_INX_WIRELESS_NGB : - pRaInfo->RAUseRate = (pRaInfo->RateMask)&0x0f8ff015 ; + pRaInfo->RAUseRate = (pRaInfo->RateMask) &0x0f8ff015 ;break ;case RATR_INX_WIRELESS_NG : - pRaInfo->RAUseRate = (pRaInfo->RateMask)&0x0f8ff010 ; + pRaInfo->RAUseRate = (pRaInfo->RateMask) &0x0f8ff010 ;break ;case RATR_INX_WIRELESS_NB : - pRaInfo->RAUseRate = (pRaInfo->RateMask)&0x0f8ff005 ; + pRaInfo->RAUseRate = (pRaInfo->RateMask) &0x0f8ff005 ;break ;case RATR_INX_WIRELESS_N : - pRaInfo->RAUseRate = (pRaInfo->RateMask)&0x0f8ff000 ; + pRaInfo->RAUseRate = (pRaInfo->RateMask) &0x0f8ff000 ;break ;case RATR_INX_WIRELESS_GB : - pRaInfo->RAUseRate = (pRaInfo->RateMask)&0x00000ff5 ; + pRaInfo->RAUseRate = (pRaInfo->RateMask) &0x00000ff5 ;break ;case RATR_INX_WIRELESS_G : - pRaInfo->RAUseRate = (pRaInfo->RateMask)&0x00000ff0 ; + pRaInfo->RAUseRate = (pRaInfo->RateMask) &0x00000ff0 ;break ;case RATR_INX_WIRELESS_B : - pRaInfo->RAUseRate = (pRaInfo->RateMask)&0x0000000d ; + pRaInfo->RAUseRate = (pRaInfo->RateMask) &0x0000000d ;break ;case 12 : MaskFromReg =ODM_Read4Byte (dm_odm,REG_ARFR0 ); - pRaInfo->RAUseRate = (pRaInfo->RateMask)&MaskFromReg; + pRaInfo->RAUseRate = (pRaInfo->RateMask) & MaskFromReg;break ;case 13 : MaskFromReg =ODM_Read4Byte (dm_odm,REG_ARFR1 ); - pRaInfo->RAUseRate = (pRaInfo->RateMask)&MaskFromReg; + pRaInfo->RAUseRate = (pRaInfo->RateMask) & MaskFromReg;break ;case 14 : MaskFromReg =ODM_Read4Byte (dm_odm,REG_ARFR2 ); - pRaInfo->RAUseRate = (pRaInfo->RateMask)&MaskFromReg; + pRaInfo->RAUseRate = (pRaInfo->RateMask) & MaskFromReg;break ;case 15 : MaskFromReg =ODM_Read4Byte (dm_odm,REG_ARFR3 ); - pRaInfo->RAUseRate = (pRaInfo->RateMask)&MaskFromReg; + pRaInfo->RAUseRate = (pRaInfo->RateMask) & MaskFromReg;break ;default : pRaInfo->RAUseRate = (pRaInfo->RateMask);
@@ -338,7 +338,7 @@ static int odm_ARFBRefresh_8188E(struct odm_dm_struct *dm_odm, struct odm_ra_inf/* Highest rate */ if (pRaInfo->RAUseRate) {for (i =RATESIZE ; i >=0 ; i--) { -if ((pRaInfo->RAUseRate)&BIT (i)) { +if ((pRaInfo->RAUseRate) &BIT (i)) { pRaInfo->HighestRate = i;break ; }
@@ -443,15 +443,15 @@ static void odm_PTDecision_8188E(struct odm_ra_info *pRaInfo) j = j >>1 ; temp_stage = (pRaInfo->PTStage +1 ) >>1 ;if (temp_stage > j) - stage_id = temp_stage-j; + stage_id = temp_stage - j;else stage_id =0 ; - pRaInfo->PTSmoothFactor = (pRaInfo->PTSmoothFactor>>1 ) + (pRaInfo->PTSmoothFactor>>2 ) + stage_id*16 +2 ; + pRaInfo->PTSmoothFactor = (pRaInfo->PTSmoothFactor >>1 ) + (pRaInfo->PTSmoothFactor >>2 ) + stage_id *16 +2 ;if (pRaInfo->PTSmoothFactor >192 ) pRaInfo->PTSmoothFactor =192 ; stage_id = pRaInfo->PTSmoothFactor >>6 ; - temp_stage = stage_id*2 ; + temp_stage = stage_id *2 ;if (temp_stage !=0 ) temp_stage -=1 ;if (pRaInfo->DROP >3 )
@@ -508,8 +508,8 @@ int ODM_RAInfo_Init(struct odm_dm_struct *dm_odm, u8 macid) pRaInfo->PreRssiStaRA =0 ; pRaInfo->SGIEnable =0 ; pRaInfo->RAUseRate =0xffffffff ; - pRaInfo->NscDown = (N_THRESHOLD_HIGH [0x13 ]+N_THRESHOLD_LOW [0x13 ])/2 ; - pRaInfo->NscUp = (N_THRESHOLD_HIGH [0x13 ]+N_THRESHOLD_LOW [0x13 ])/2 ; + pRaInfo->NscDown = (N_THRESHOLD_HIGH [0x13 ] +N_THRESHOLD_LOW [0x13 ]) /2 ; + pRaInfo->NscUp = (N_THRESHOLD_HIGH [0x13 ] +N_THRESHOLD_LOW [0x13 ]) /2 ; pRaInfo->RateSGI =0 ; pRaInfo->Active =1 ;/* Active is not used at present. by page, 110819 */ pRaInfo->RptTime =0x927c ;
drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c +11 -11
@@ -8,7 +8,7 @@do { \ i +=2 ; \ v1 = array[i]; \ - v2 = array[i+1 ]; \ + v2 = array[i +1 ]; \ } while (0)static bool CheckCondition (const u32 condition,const u32 hex)
@@ -179,7 +179,7 @@ enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *dm_odm)u8 platform = dm_odm->SupportPlatform;u8 interfaceValue = dm_odm->SupportInterface;u8 board = dm_odm->BoardType; -u32 arraylen =sizeof (array_agc_tab_1t_8188e)/sizeof (u32); +u32 arraylen =sizeof (array_agc_tab_1t_8188e) /sizeof (u32);u32 *array = array_agc_tab_1t_8188e;bool biol = false;struct adapter *adapter = dm_odm->Adapter;
@@ -203,7 +203,7 @@ enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *dm_odm)for (i =0 ; i < arraylen; i +=2 ) {u32 v1 = array[i]; -u32 v2 = array[i+1 ]; +u32 v2 = array[i +1 ];/* This (offset, data) pair meets the condition. */ if (v1 <0xCDCDCDCD ) {
@@ -459,7 +459,7 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)u8 platform = dm_odm->SupportPlatform;u8 interfaceValue = dm_odm->SupportInterface;u8 board = dm_odm->BoardType; -u32 arraylen =sizeof (array_phy_reg_1t_8188e)/sizeof (u32); +u32 arraylen =sizeof (array_phy_reg_1t_8188e) /sizeof (u32);u32 *array = array_phy_reg_1t_8188e;bool biol = false;struct adapter *adapter = dm_odm->Adapter;
@@ -482,7 +482,7 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)for (i =0 ; i < arraylen; i +=2 ) {u32 v1 = array[i]; -u32 v2 = array[i+1 ]; +u32 v2 = array[i +1 ];/* This (offset, data) pair meets the condition. */ if (v1 <0xCDCDCDCD ) {
@@ -676,8 +676,8 @@ void ODM_ReadAndConfig_PHY_REG_PG_8188E(struct odm_dm_struct *dm_odm)for (i =0 ; i < arraylen; i +=3 ) {u32 v1 = array[i]; -u32 v2 = array[i+1 ]; -u32 v3 = array[i+2 ]; +u32 v2 = array[i +1 ]; +u32 v3 = array[i +2 ];/* this line is a line of pure_body */ if (v1 <0xCDCDCDCD ) {
@@ -688,13 +688,13 @@ void ODM_ReadAndConfig_PHY_REG_PG_8188E(struct odm_dm_struct *dm_odm)/* don't need the hw_body */ i +=2 ;/* skip the pair of expression */ v1 = array[i]; - v2 = array[i+1 ]; - v3 = array[i+2 ]; + v2 = array[i +1 ]; + v3 = array[i +2 ];while (v2 !=0xDEAD ) { i +=3 ; v1 = array[i]; - v2 = array[i+1 ]; - v3 = array[i+1 ]; + v2 = array[i +1 ]; + v3 = array[i +1 ]; } } }
drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c +3 -3
@@ -129,14 +129,14 @@ static u32 array_MAC_REG_8188E[] = {enum HAL_STATUS ODM_ReadAndConfig_MAC_REG_8188E (struct odm_dm_struct *dm_odm) { -#define READ_NEXT_PAIR (v1, v2, i) do { i += 2; v1 = array[i]; v2 = array[i+1]; } while (0) +#define READ_NEXT_PAIR (v1, v2, i) do { i += 2; v1 = array[i]; v2 = array[i + 1]; } while (0)u32 hex =0 ;u32 i;u8 platform = dm_odm->SupportPlatform;u8 interface_val = dm_odm->SupportInterface;u8 board = dm_odm->BoardType; -u32 array_len =sizeof (array_MAC_REG_8188E)/sizeof (u32); +u32 array_len =sizeof (array_MAC_REG_8188E) /sizeof (u32);u32 *array = array_MAC_REG_8188E;bool biol = false;
@@ -161,7 +161,7 @@ enum HAL_STATUS ODM_ReadAndConfig_MAC_REG_8188E(struct odm_dm_struct *dm_odm)for (i =0 ; i < array_len; i +=2 ) {u32 v1 = array[i]; -u32 v2 = array[i+1 ]; +u32 v2 = array[i +1 ];/* This (offset, data) pair meets the condition. */ if (v1 <0xCDCDCDCD ) {
drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c +3 -3
@@ -140,14 +140,14 @@ enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct *pDM_Odm) {#define READ_NEXT_PAIR (v1, v2, i) do \ { i += 2; v1 = Array[i]; \ - v2 = Array[i+1]; } while (0) + v2 = Array[i + 1]; } while (0)u32 hex =0 ;u32 i =0 ;u8 platform = pDM_Odm->SupportPlatform;u8 interfaceValue = pDM_Odm->SupportInterface;u8 board = pDM_Odm->BoardType; -u32 ArrayLen =sizeof (Array_RadioA_1T_8188E)/sizeof (u32); +u32 ArrayLen =sizeof (Array_RadioA_1T_8188E) /sizeof (u32);u32 *Array = Array_RadioA_1T_8188E;bool biol = false;struct adapter *Adapter = pDM_Odm->Adapter;
@@ -171,7 +171,7 @@ enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct *pDM_Odm)for (i =0 ; i < ArrayLen; i +=2 ) {u32 v1 = Array[i]; -u32 v2 = Array[i+1 ]; +u32 v2 = Array[i +1 ];/* This (offset, data) pair meets the condition. */ if (v1 <0xCDCDCDCD ) {
drivers/staging/r8188eu/hal/HalPhyRf_8188e.c +69 -69
349 lines not on this page · raw message
drivers/staging/r8188eu/hal/HalPwrSeqCmd.c +1 -1
@@ -78,7 +78,7 @@ u8 HalPwrSeqCmdParsing(struct adapter *padapter, u8 cut_vers, u8 fab_vers,if (GET_PWR_CFG_VALUE (pwrcfgcmd) ==PWRSEQ_DELAY_US )udelay (GET_PWR_CFG_OFFSET (pwrcfgcmd));else -udelay (GET_PWR_CFG_OFFSET (pwrcfgcmd)*1000 ); +udelay (GET_PWR_CFG_OFFSET (pwrcfgcmd) *1000 );break ;case PWR_CMD_END :/* When this command is parsed, end the process */
drivers/staging/r8188eu/hal/hal_com.c +18 -18
@@ -16,46 +16,46 @@ void dump_chip_info(struct HAL_VERSION chip_vers)char buf[128 ];if (IS_81XXC (chip_vers)) { - cnt +=sprintf ((buf+cnt),"Chip Version Info: %s_" , + cnt +=sprintf ((buf + cnt),"Chip Version Info: %s_" ,IS_92C_SERIAL (chip_vers) ?"CHIP_8192C" :"CHIP_8188C" ); }else if (IS_92D (chip_vers)) { - cnt +=sprintf ((buf+cnt),"Chip Version Info: CHIP_8192D_" ); + cnt +=sprintf ((buf + cnt),"Chip Version Info: CHIP_8192D_" ); }else if (IS_8723_SERIES (chip_vers)) { - cnt +=sprintf ((buf+cnt),"Chip Version Info: CHIP_8723A_" ); + cnt +=sprintf ((buf + cnt),"Chip Version Info: CHIP_8723A_" ); }else if (IS_8188E (chip_vers)) { - cnt +=sprintf ((buf+cnt),"Chip Version Info: CHIP_8188E_" ); + cnt +=sprintf ((buf + cnt),"Chip Version Info: CHIP_8188E_" ); } - cnt +=sprintf ((buf+cnt),"%s_" ,IS_NORMAL_CHIP (chip_vers) ? + cnt +=sprintf ((buf + cnt),"%s_" ,IS_NORMAL_CHIP (chip_vers) ?"Normal_Chip" :"Test_Chip" ); - cnt +=sprintf ((buf+cnt),"%s_" ,IS_CHIP_VENDOR_TSMC (chip_vers) ? + cnt +=sprintf ((buf + cnt),"%s_" ,IS_CHIP_VENDOR_TSMC (chip_vers) ?"TSMC" :"UMC" );if (IS_A_CUT (chip_vers)) - cnt +=sprintf ((buf+cnt),"A_CUT_" ); + cnt +=sprintf ((buf + cnt),"A_CUT_" );else if (IS_B_CUT (chip_vers)) - cnt +=sprintf ((buf+cnt),"B_CUT_" ); + cnt +=sprintf ((buf + cnt),"B_CUT_" );else if (IS_C_CUT (chip_vers)) - cnt +=sprintf ((buf+cnt),"C_CUT_" ); + cnt +=sprintf ((buf + cnt),"C_CUT_" );else if (IS_D_CUT (chip_vers)) - cnt +=sprintf ((buf+cnt),"D_CUT_" ); + cnt +=sprintf ((buf + cnt),"D_CUT_" );else if (IS_E_CUT (chip_vers)) - cnt +=sprintf ((buf+cnt),"E_CUT_" ); + cnt +=sprintf ((buf + cnt),"E_CUT_" );else - cnt +=sprintf ((buf+cnt),"UNKNOWN_CUT(%d)_" , + cnt +=sprintf ((buf + cnt),"UNKNOWN_CUT(%d)_" , chip_vers.CUTVersion);if (IS_1T1R (chip_vers)) - cnt +=sprintf ((buf+cnt),"1T1R_" ); + cnt +=sprintf ((buf + cnt),"1T1R_" );else if (IS_1T2R (chip_vers)) - cnt +=sprintf ((buf+cnt),"1T2R_" ); + cnt +=sprintf ((buf + cnt),"1T2R_" );else if (IS_2T2R (chip_vers)) - cnt +=sprintf ((buf+cnt),"2T2R_" ); + cnt +=sprintf ((buf + cnt),"2T2R_" );else - cnt +=sprintf ((buf+cnt),"UNKNOWN_RFTYPE(%d)_" , + cnt +=sprintf ((buf + cnt),"UNKNOWN_RFTYPE(%d)_" , chip_vers.RFType); - cnt +=sprintf ((buf+cnt),"RomVer(%d)\n" , chip_vers.ROMVer); + cnt +=sprintf ((buf + cnt),"RomVer(%d)\n" , chip_vers.ROMVer);pr_info ("%s" , buf); }
@@ -337,7 +337,7 @@ s32 c2h_evt_read(struct adapter *adapter, u8 *buf)memset (c2h_evt,0 ,16 ); *buf =rtw_read8 (adapter,REG_C2HEVT_MSG_NORMAL ); - *(buf+1 ) =rtw_read8 (adapter,REG_C2HEVT_MSG_NORMAL +1 ); + *(buf +1 ) =rtw_read8 (adapter,REG_C2HEVT_MSG_NORMAL +1 );/* Read the content */ for (i =0 ; i < c2h_evt->plen; i++)
drivers/staging/r8188eu/hal/hal_intf.c +2 -2
@@ -254,8 +254,8 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level)#ifdef CONFIG_88EU_AP_MODE struct sta_info *psta =NULL ;struct sta_priv *pstapriv = &adapt->stapriv; -if ((mac_id-1 ) >0 ) - psta = pstapriv->sta_aid[(mac_id-1 ) -1 ]; +if ((mac_id -1 ) >0 ) + psta = pstapriv->sta_aid[(mac_id -1 ) -1 ];if (psta)add_RATid (adapt, psta,0 );/* todo: based on rssi_level*/ #endif
drivers/staging/r8188eu/hal/odm.c +57 -57
315 lines not on this page · raw message
Signature · 1 line
2.32.0
PATCH 2/3 staging: r8188eu: clean up spacing style issues in hal dir, part 2
In reply to Michael StraubeClean up spacing style issues reported by checkpatch in the next 10 files in the hal directory.
CHECK: spaces preferred around that ...
CHECK: No space is necessary after a cast
WARNING: space prohibited before semicolon
WARNING: space prohibited between function name and open parenthesis '('
--- drivers/staging/r8188eu/hal/odm_HWConfig.c | 84 +++---- drivers/staging/r8188eu/hal/odm_RTL8188E.c | 70 +++--- .../staging/r8188eu/hal/odm_RegConfig8188E.c | 8 +- drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 74 +++--- .../staging/r8188eu/hal/rtl8188e_hal_init.c | 238 +++++++++--------- drivers/staging/r8188eu/hal/rtl8188e_mp.c | 40 +-- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 60 ++--- 7 files changed, 287 insertions(+), 287 deletions(-)
drivers/staging/r8188eu/hal/odm_HWConfig.c +42 -42
@@ -15,7 +15,7 @@ static u8 odm_QueryRxPwrPercentage(s8 AntPower)else if (AntPower >=0 )return 100 ;else -return 100 +AntPower; +return 100 + AntPower; }/* 2012/01/12 MH MOve some signal strength smooth method to MP HAL layer. */
@@ -39,7 +39,7 @@ static s32 odm_SignalScaleMapping_92CSeries(struct odm_dm_struct *dm_odm, s32 Cuif (CurrSig >=51 && CurrSig <=100 ) RetSig =100 ;else if (CurrSig >=41 && CurrSig <=50 ) - RetSig =80 + ((CurrSig -40 )*2 ); + RetSig =80 + ((CurrSig -40 ) *2 );else if (CurrSig >=31 && CurrSig <=40 ) RetSig =66 + (CurrSig -30 );else if (CurrSig >=21 && CurrSig <=30 )
@@ -121,44 +121,44 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm, cck_highpwr = dm_odm->bCckHighPower; - cck_agc_rpt = pPhyStaRpt->cck_agc_rpt_ofdm_cfosho_a ; + cck_agc_rpt = pPhyStaRpt->cck_agc_rpt_ofdm_cfosho_a;/* 2011.11.28 LukeLee: 88E use different LNA & VGA gain table */ /* The RSSI formula should be modified according to the gain table */ /* In 88E, cck_highpwr is always set to 1 */ -if (dm_odm->SupportICType & (ODM_RTL8188E |ODM_RTL8812 )) { +if (dm_odm->SupportICType & (ODM_RTL8188E |ODM_RTL8812 )) { LNA_idx = ((cck_agc_rpt &0xE0 ) >>5 ); VGA_idx = (cck_agc_rpt &0x1F );switch (LNA_idx) {case 7 :if (VGA_idx <=27 ) - rx_pwr_all =-100 +2 *(27 -VGA_idx);/* VGA_idx = 27~2 */ + rx_pwr_all =-100 +2 * (27 - VGA_idx);/* VGA_idx = 27~2 */ else rx_pwr_all =-100 ;break ;case 6 : - rx_pwr_all =-48 +2 *(2 -VGA_idx);/* VGA_idx = 2~0 */ + rx_pwr_all =-48 +2 * (2 - VGA_idx);/* VGA_idx = 2~0 */ break ;case 5 : - rx_pwr_all =-42 +2 *(7 -VGA_idx);/* VGA_idx = 7~5 */ + rx_pwr_all =-42 +2 * (7 - VGA_idx);/* VGA_idx = 7~5 */ break ;case 4 : - rx_pwr_all =-36 +2 *(7 -VGA_idx);/* VGA_idx = 7~4 */ + rx_pwr_all =-36 +2 * (7 - VGA_idx);/* VGA_idx = 7~4 */ break ;case 3 : - rx_pwr_all =-24 +2 *(7 -VGA_idx);/* VGA_idx = 7~0 */ + rx_pwr_all =-24 +2 * (7 - VGA_idx);/* VGA_idx = 7~0 */ break ;case 2 :if (cck_highpwr) - rx_pwr_all =-12 +2 *(5 -VGA_idx);/* VGA_idx = 5~0 */ + rx_pwr_all =-12 +2 * (5 - VGA_idx);/* VGA_idx = 5~0 */ else - rx_pwr_all =-6 +2 *(5 -VGA_idx); + rx_pwr_all =-6 +2 * (5 - VGA_idx);break ;case 1 : - rx_pwr_all =8 -2 *VGA_idx; + rx_pwr_all =8 -2 * VGA_idx;break ;case 0 : - rx_pwr_all =14 -2 *VGA_idx; + rx_pwr_all =14 -2 * VGA_idx;break ;default :break ;
@@ -167,7 +167,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,PWDB_ALL =odm_QueryRxPwrPercentage (rx_pwr_all);if (!cck_highpwr) {if (PWDB_ALL >=80 ) -PWDB_ALL = ((PWDB_ALL -80 )<<1 )+((PWDB_ALL -80 )>>1 )+80 ; +PWDB_ALL = ((PWDB_ALL -80 ) <<1 ) + ((PWDB_ALL -80 ) >>1 ) +80 ;else if ((PWDB_ALL <=78 ) && (PWDB_ALL >=20 ))PWDB_ALL +=3 ;if (PWDB_ALL >100 )
@@ -175,7 +175,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm, } }else {if (!cck_highpwr) { - report = (cck_agc_rpt &0xc0 )>>6 ; + report = (cck_agc_rpt &0xc0 ) >>6 ;switch (report) {/* 03312009 modified by cosa */ /* Modify the RF RNA gain value to -40, -20, -2, 14 by Jenyu's suggestion */
@@ -194,19 +194,19 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,break ; } }else { - report = (cck_agc_rpt &0x60 )>>5 ; + report = (cck_agc_rpt &0x60 ) >>5 ;switch (report) {case 0x3 : - rx_pwr_all =-46 - ((cck_agc_rpt &0x1f )<<1 ) ; + rx_pwr_all =-46 - ((cck_agc_rpt &0x1f ) <<1 );break ;case 0x2 : - rx_pwr_all =-26 - ((cck_agc_rpt &0x1f )<<1 ); + rx_pwr_all =-26 - ((cck_agc_rpt &0x1f ) <<1 );break ;case 0x1 : - rx_pwr_all =-12 - ((cck_agc_rpt &0x1f )<<1 ); + rx_pwr_all =-12 - ((cck_agc_rpt &0x1f ) <<1 );break ;case 0x0 : - rx_pwr_all =16 - ((cck_agc_rpt &0x1f )<<1 ); + rx_pwr_all =16 - ((cck_agc_rpt &0x1f ) <<1 );break ; } }
@@ -215,13 +215,13 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,/* Modification for ext-LNA board */ if (dm_odm->BoardType ==ODM_BOARD_HIGHPWR ) { -if ((cck_agc_rpt>>7 ) ==0 ) { -PWDB_ALL = (PWDB_ALL >94 ) ?100 : (PWDB_ALL +6 ); +if ((cck_agc_rpt >>7 ) ==0 ) { +PWDB_ALL = (PWDB_ALL >94 ) ?100 : (PWDB_ALL +6 ); }else {if (PWDB_ALL >38 )PWDB_ALL -=16 ;else -PWDB_ALL = (PWDB_ALL <=16 ) ? (PWDB_ALL >>2 ) : (PWDB_ALL -12 ); +PWDB_ALL = (PWDB_ALL <=16 ) ? (PWDB_ALL >>2 ) : (PWDB_ALL -12 ); }/* CCK modification */
@@ -254,7 +254,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,else if (SQ_rpt <20 )SQ =100 ;else -SQ = ((64 -SQ_rpt) *100 ) /44 ; +SQ = ((64 - SQ_rpt) *100 ) /44 ; } pPhyInfo->SignalQuality =SQ ; pPhyInfo->RxMIMOSignalQuality[RF_PATH_A ] =SQ ;
@@ -270,7 +270,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,if (dm_odm->RFPathRxEnable &BIT (i)) rf_rx_num++; - rx_pwr[i] = ((pPhyStaRpt->path_agc[i].gain &0x3F )*2 ) -110 ; + rx_pwr[i] = ((pPhyStaRpt->path_agc[i].gain &0x3F ) *2 ) -110 ;if (i ==RF_PATH_A ) adapt->signal_strength = rx_pwr[i];
@@ -294,8 +294,8 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm, pPhyInfo->RxMIMOSignalStrength[i] = (u8 )RSSI ;/* Get Rx snr value in DB */ - pPhyInfo->RxSNR[i] = (s32)(pPhyStaRpt->path_rxsnr[i]/2 ); - dm_odm->PhyDbgInfo.RxSNRdB[i] = (s32)(pPhyStaRpt->path_rxsnr[i]/2 ); + pPhyInfo->RxSNR[i] = (s32)(pPhyStaRpt->path_rxsnr[i] /2 ); + dm_odm->PhyDbgInfo.RxSNRdB[i] = (s32)(pPhyStaRpt->path_rxsnr[i] /2 );/* Record Signal Strength for next packet */ if (pPktinfo->bPacketMatchBSSID) {
@@ -390,8 +390,8 @@ static void odm_Process_RSSIForDM(struct odm_dm_struct *dm_odm,if (dm_odm->AntDivType ==CG_TRX_SMART_ANTDIV ) {if (pDM_FatTable->FAT_State ==FAT_TRAINING_STATE ) {if (pPktinfo->bPacketToSelf) { - antsel_tr_mux = (pDM_FatTable->antsel_rx_keep_2<<2 ) | - (pDM_FatTable->antsel_rx_keep_1<<1 ) | + antsel_tr_mux = (pDM_FatTable->antsel_rx_keep_2 <<2 ) | + (pDM_FatTable->antsel_rx_keep_1 <<1 ) | pDM_FatTable->antsel_rx_keep_0; pDM_FatTable->antSumRSSI[antsel_tr_mux] += pPhyInfo->RxPWDBAll; pDM_FatTable->antRSSIcnt[antsel_tr_mux]++;
@@ -399,8 +399,8 @@ static void odm_Process_RSSIForDM(struct odm_dm_struct *dm_odm, } }else if ((dm_odm->AntDivType ==CG_TRX_HW_ANTDIV ) || (dm_odm->AntDivType ==CGCS_RX_HW_ANTDIV )) {if (pPktinfo->bPacketToSelf || pPktinfo->bPacketBeacon) { - antsel_tr_mux = (pDM_FatTable->antsel_rx_keep_2<<2 ) | - (pDM_FatTable->antsel_rx_keep_1<<1 ) | pDM_FatTable->antsel_rx_keep_0; + antsel_tr_mux = (pDM_FatTable->antsel_rx_keep_2 <<2 ) | + (pDM_FatTable->antsel_rx_keep_1 <<1 ) | pDM_FatTable->antsel_rx_keep_0;ODM_AntselStatistics_88E (dm_odm, antsel_tr_mux, pPktinfo->StationID, pPhyInfo->RxPWDBAll); } }
@@ -439,17 +439,17 @@ static void odm_Process_RSSIForDM(struct odm_dm_struct *dm_odm, }else {if (pPhyInfo->RxPWDBAll > (u32 )UndecoratedSmoothedOFDM) { UndecoratedSmoothedOFDM = - (((UndecoratedSmoothedOFDM)*(Rx_Smooth_Factor-1 )) + + (((UndecoratedSmoothedOFDM) * (Rx_Smooth_Factor -1 )) + (RSSI_Ave)) / (Rx_Smooth_Factor); UndecoratedSmoothedOFDM = UndecoratedSmoothedOFDM +1 ; }else { UndecoratedSmoothedOFDM = - (((UndecoratedSmoothedOFDM)*(Rx_Smooth_Factor-1 )) + + (((UndecoratedSmoothedOFDM) * (Rx_Smooth_Factor -1 )) + (RSSI_Ave)) / (Rx_Smooth_Factor); } } - pEntry->rssi_stat.PacketMap = (pEntry->rssi_stat.PacketMap<<1 ) |BIT (0 ); + pEntry->rssi_stat.PacketMap = (pEntry->rssi_stat.PacketMap <<1 ) |BIT (0 ); }else { RSSI_Ave = pPhyInfo->RxPWDBAll;
@@ -460,16 +460,16 @@ static void odm_Process_RSSIForDM(struct odm_dm_struct *dm_odm, }else {if (pPhyInfo->RxPWDBAll > (u32 )UndecoratedSmoothedCCK) { UndecoratedSmoothedCCK = - ((UndecoratedSmoothedCCK * (Rx_Smooth_Factor-1 )) + + ((UndecoratedSmoothedCCK * (Rx_Smooth_Factor -1 )) + pPhyInfo->RxPWDBAll) / Rx_Smooth_Factor; UndecoratedSmoothedCCK = UndecoratedSmoothedCCK +1 ; }else { UndecoratedSmoothedCCK = - ((UndecoratedSmoothedCCK * (Rx_Smooth_Factor-1 )) + + ((UndecoratedSmoothedCCK * (Rx_Smooth_Factor -1 )) + pPhyInfo->RxPWDBAll) / Rx_Smooth_Factor; } } - pEntry->rssi_stat.PacketMap = pEntry->rssi_stat.PacketMap<<1 ; + pEntry->rssi_stat.PacketMap = pEntry->rssi_stat.PacketMap <<1 ; }/* 2011.07.28 LukeLee: modified to prevent unstable CCK RSSI */ if (pEntry->rssi_stat.ValidBit >=64 )
@@ -478,16 +478,16 @@ static void odm_Process_RSSIForDM(struct odm_dm_struct *dm_odm, pEntry->rssi_stat.ValidBit++;for (i =0 ; i < pEntry->rssi_stat.ValidBit; i++) - OFDM_pkt += (u8)(pEntry->rssi_stat.PacketMap>>i)&BIT (0 ); + OFDM_pkt += (u8)(pEntry->rssi_stat.PacketMap >> i) &BIT (0 );if (pEntry->rssi_stat.ValidBit ==64 ) { - Weighting = ((OFDM_pkt<<4 ) >64 ) ?64 : (OFDM_pkt<<4 ); - UndecoratedSmoothedPWDB = (Weighting*UndecoratedSmoothedOFDM+(64 -Weighting)*UndecoratedSmoothedCCK)>>6 ; + Weighting = ((OFDM_pkt <<4 ) >64 ) ?64 : (OFDM_pkt <<4 ); + UndecoratedSmoothedPWDB = (Weighting * UndecoratedSmoothedOFDM + (64 - Weighting) * UndecoratedSmoothedCCK) >>6 ; }else {if (pEntry->rssi_stat.ValidBit !=0 ) UndecoratedSmoothedPWDB = (OFDM_pkt * UndecoratedSmoothedOFDM + - (pEntry->rssi_stat.ValidBit-OFDM_pkt) * - UndecoratedSmoothedCCK)/pEntry->rssi_stat.ValidBit; + (pEntry->rssi_stat.ValidBit - OFDM_pkt) * + UndecoratedSmoothedCCK) / pEntry->rssi_stat.ValidBit;else UndecoratedSmoothedPWDB =0 ; }
drivers/staging/r8188eu/hal/odm_RTL8188E.c +35 -35
153 lines not on this page · raw message
drivers/staging/r8188eu/hal/odm_RegConfig8188E.c +4 -4
@@ -29,17 +29,17 @@ void odm_ConfigRFReg_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr,void odm_ConfigRF_RadioA_8188E (struct odm_dm_struct *pDM_Odm,u32 Addr,u32 Data) {u32 content =0x1000 ;/* RF_Content: radioa_txt */ -u32 maskforPhySet = (u32)(content&0xE000 ); +u32 maskforPhySet = (u32)(content &0xE000 ); -odm_ConfigRFReg_8188E (pDM_Odm, Addr, Data,RF_PATH_A , Addr|maskforPhySet); +odm_ConfigRFReg_8188E (pDM_Odm, Addr, Data,RF_PATH_A , Addr | maskforPhySet); }void odm_ConfigRF_RadioB_8188E (struct odm_dm_struct *pDM_Odm,u32 Addr,u32 Data) {u32 content =0x1001 ;/* RF_Content: radiob_txt */ -u32 maskforPhySet = (u32)(content&0xE000 ); +u32 maskforPhySet = (u32)(content &0xE000 ); -odm_ConfigRFReg_8188E (pDM_Odm, Addr, Data,RF_PATH_B , Addr|maskforPhySet); +odm_ConfigRFReg_8188E (pDM_Odm, Addr, Data,RF_PATH_B , Addr | maskforPhySet); }void odm_ConfigMAC_8188E (struct odm_dm_struct *pDM_Odm,u32 Addr,u8 Data)
drivers/staging/r8188eu/hal/rtl8188e_cmd.c +37 -37
215 lines not on this page · raw message
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +119 -119
730 lines not on this page · raw message
drivers/staging/r8188eu/hal/rtl8188e_mp.c +20 -20
@@ -78,8 +78,8 @@ void Hal_MPT_CCKTxPowerAdjust(struct adapter *Adapter, bool bInCH14)/* Readback the current bb cck swing value and compare with the table to */ /* get the current swing index */ for (i =0 ; i <CCK_TABLE_SIZE ; i++) { -if (((CurrCCKSwingVal&0xff ) == (u32 )CCKSwingTable_Ch1_Ch13[i][0 ]) && - (((CurrCCKSwingVal&0xff00 )>>8 ) == (u32 )CCKSwingTable_Ch1_Ch13[i][1 ])) { +if (((CurrCCKSwingVal &0xff ) == (u32 )CCKSwingTable_Ch1_Ch13[i][0 ]) && + (((CurrCCKSwingVal &0xff00 ) >>8 ) == (u32 )CCKSwingTable_Ch1_Ch13[i][1 ])) { CCKSwingIndex = i;break ; }
@@ -87,23 +87,23 @@ void Hal_MPT_CCKTxPowerAdjust(struct adapter *Adapter, bool bInCH14)/* Write 0xa22 0xa23 */ TempVal = CCKSwingTable_Ch1_Ch13[CCKSwingIndex][0 ] + - (CCKSwingTable_Ch1_Ch13[CCKSwingIndex][1 ]<<8 ); + (CCKSwingTable_Ch1_Ch13[CCKSwingIndex][1 ] <<8 );/* Write 0xa24 ~ 0xa27 */ TempVal2 =0 ; TempVal2 = CCKSwingTable_Ch1_Ch13[CCKSwingIndex][2 ] + - (CCKSwingTable_Ch1_Ch13[CCKSwingIndex][3 ]<<8 ) + - (CCKSwingTable_Ch1_Ch13[CCKSwingIndex][4 ]<<16 )+ - (CCKSwingTable_Ch1_Ch13[CCKSwingIndex][5 ]<<24 ); + (CCKSwingTable_Ch1_Ch13[CCKSwingIndex][3 ] <<8 ) + + (CCKSwingTable_Ch1_Ch13[CCKSwingIndex][4 ] <<16 ) + + (CCKSwingTable_Ch1_Ch13[CCKSwingIndex][5 ] <<24 );/* Write 0xa28 0xa29 */ TempVal3 =0 ; TempVal3 = CCKSwingTable_Ch1_Ch13[CCKSwingIndex][6 ] + - (CCKSwingTable_Ch1_Ch13[CCKSwingIndex][7 ]<<8 ); + (CCKSwingTable_Ch1_Ch13[CCKSwingIndex][7 ] <<8 ); }else {for (i =0 ; i <CCK_TABLE_SIZE ; i++) { -if (((CurrCCKSwingVal&0xff ) == (u32 )CCKSwingTable_Ch14[i][0 ]) && - (((CurrCCKSwingVal&0xff00 )>>8 ) == (u32 )CCKSwingTable_Ch14[i][1 ])) { +if (((CurrCCKSwingVal &0xff ) == (u32 )CCKSwingTable_Ch14[i][0 ]) && + (((CurrCCKSwingVal &0xff00 ) >>8 ) == (u32 )CCKSwingTable_Ch14[i][1 ])) { CCKSwingIndex = i;break ; }
@@ -111,19 +111,19 @@ void Hal_MPT_CCKTxPowerAdjust(struct adapter *Adapter, bool bInCH14)/* Write 0xa22 0xa23 */ TempVal = CCKSwingTable_Ch14[CCKSwingIndex][0 ] + - (CCKSwingTable_Ch14[CCKSwingIndex][1 ]<<8 ); + (CCKSwingTable_Ch14[CCKSwingIndex][1 ] <<8 );/* Write 0xa24 ~ 0xa27 */ TempVal2 =0 ; TempVal2 = CCKSwingTable_Ch14[CCKSwingIndex][2 ] + - (CCKSwingTable_Ch14[CCKSwingIndex][3 ]<<8 ) + - (CCKSwingTable_Ch14[CCKSwingIndex][4 ]<<16 )+ - (CCKSwingTable_Ch14[CCKSwingIndex][5 ]<<24 ); + (CCKSwingTable_Ch14[CCKSwingIndex][3 ] <<8 ) + + (CCKSwingTable_Ch14[CCKSwingIndex][4 ] <<16 ) + + (CCKSwingTable_Ch14[CCKSwingIndex][5 ] <<24 );/* Write 0xa28 0xa29 */ TempVal3 =0 ; TempVal3 = CCKSwingTable_Ch14[CCKSwingIndex][6 ] + - (CCKSwingTable_Ch14[CCKSwingIndex][7 ]<<8 ); + (CCKSwingTable_Ch14[CCKSwingIndex][7 ] <<8 ); }write_bbreg (Adapter, rCCK0_TxFilter1, bMaskHWord, TempVal);
@@ -247,12 +247,12 @@ void Hal_SetCCKTxPower(struct adapter *pAdapter, u8 *TxPower)/* rf-A cck tx power */ write_bbreg (pAdapter, rTxAGC_A_CCK1_Mcs32, bMaskByte1, TxPower[RF_PATH_A ]); - tmpval = (TxPower[RF_PATH_A ]<<16 ) | (TxPower[RF_PATH_A ]<<8 ) | TxPower[RF_PATH_A ]; + tmpval = (TxPower[RF_PATH_A ] <<16 ) | (TxPower[RF_PATH_A ] <<8 ) | TxPower[RF_PATH_A ];write_bbreg (pAdapter, rTxAGC_B_CCK11_A_CCK2_11,0xffffff00 , tmpval);/* rf-B cck tx power */ write_bbreg (pAdapter, rTxAGC_B_CCK11_A_CCK2_11, bMaskByte0, TxPower[RF_PATH_B ]); - tmpval = (TxPower[RF_PATH_B ]<<16 ) | (TxPower[RF_PATH_B ]<<8 ) | TxPower[RF_PATH_B ]; + tmpval = (TxPower[RF_PATH_B ] <<16 ) | (TxPower[RF_PATH_B ] <<8 ) | TxPower[RF_PATH_B ];write_bbreg (pAdapter, rTxAGC_B_CCK1_55_Mcs32,0xffffff00 , tmpval); }
@@ -263,7 +263,7 @@ void Hal_SetOFDMTxPower(struct adapter *pAdapter, u8 *TxPower)/* HT Tx-rf(A) */ tmpval = TxPower[RF_PATH_A ]; - TxAGC = (tmpval<<24 ) | (tmpval<<16 ) | (tmpval<<8 ) | tmpval; + TxAGC = (tmpval <<24 ) | (tmpval <<16 ) | (tmpval <<8 ) | tmpval;write_bbreg (pAdapter, rTxAGC_A_Rate18_06, bMaskDWord, TxAGC);write_bbreg (pAdapter, rTxAGC_A_Rate54_24, bMaskDWord, TxAGC);
@@ -274,7 +274,7 @@ void Hal_SetOFDMTxPower(struct adapter *pAdapter, u8 *TxPower)/* HT Tx-rf(B) */ tmpval = TxPower[RF_PATH_B ]; - TxAGC = (tmpval<<24 ) | (tmpval<<16 ) | (tmpval<<8 ) | tmpval; + TxAGC = (tmpval <<24 ) | (tmpval <<16 ) | (tmpval <<8 ) | tmpval;write_bbreg (pAdapter, rTxAGC_B_Rate18_06, bMaskDWord, TxAGC);write_bbreg (pAdapter, rTxAGC_B_Rate54_24, bMaskDWord, TxAGC);
@@ -312,7 +312,7 @@ void Hal_SetAntennaPathPower(struct adapter *pAdapter)case RF_6052 :Hal_SetCCKTxPower (pAdapter, TxPowerLevel);if (pAdapter->mppriv.rateidx <MPT_RATE_6M )/* CCK rate */ -Hal_MPT_CCKTxPowerAdjustbyIndex (pAdapter, TxPowerLevel[rfPath]%2 ==0 ); +Hal_MPT_CCKTxPowerAdjustbyIndex (pAdapter, TxPowerLevel[rfPath] %2 ==0 );Hal_SetOFDMTxPower (pAdapter, TxPowerLevel);break ;default :
@@ -351,7 +351,7 @@ void Hal_SetTxPower(struct adapter *pAdapter)case RF_6052 :Hal_SetCCKTxPower (pAdapter, TxPowerLevel);if (pAdapter->mppriv.rateidx <MPT_RATE_6M )/* CCK rate */ -Hal_MPT_CCKTxPowerAdjustbyIndex (pAdapter, TxPowerLevel[rfPath]%2 ==0 ); +Hal_MPT_CCKTxPowerAdjustbyIndex (pAdapter, TxPowerLevel[rfPath] %2 ==0 );Hal_SetOFDMTxPower (pAdapter, TxPowerLevel);break ;default :
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +30 -30
139 lines not on this page · raw message
Signature · 1 line
2.32.0
PATCH 3/3 staging: r8188eu: clean up spacing style issues in hal dir, part 3
In reply to Michael StraubeClean up spacing style issues reported by checkpatch in the remaining files in the hal directory.
CHECK: spaces preferred around that ...
--- drivers/staging/r8188eu/hal/rtl8188e_rf6052.c | 66 +++---- drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 2 +- drivers/staging/r8188eu/hal/rtl8188eu_led.c | 10 +- drivers/staging/r8188eu/hal/rtl8188eu_recv.c | 2 +- drivers/staging/r8188eu/hal/rtl8188eu_xmit.c | 36 ++-- drivers/staging/r8188eu/hal/usb_halinit.c | 162 +++++++++--------- drivers/staging/r8188eu/hal/usb_ops_linux.c | 20 +-- 7 files changed, 149 insertions(+), 149 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_rf6052.c +33 -33
@@ -147,8 +147,8 @@ rtl8188e_PHY_RF6052SetCckTxPower(if (TurboScanOff) {for (idx1 =RF_PATH_A ; idx1 <=RF_PATH_B ; idx1++) { TxAGC[idx1] = - pPowerlevel[idx1] | (pPowerlevel[idx1]<<8 ) | - (pPowerlevel[idx1]<<16 ) | (pPowerlevel[idx1]<<24 ); + pPowerlevel[idx1] | (pPowerlevel[idx1] <<8 ) | + (pPowerlevel[idx1] <<16 ) | (pPowerlevel[idx1] <<24 );/* 2010/10/18 MH For external PA module. We need to limit power index to be less than 0x20. */ if (TxAGC[idx1] >0x20 && pHalData->ExternalPA) TxAGC[idx1] =0x20 ;
@@ -171,16 +171,16 @@ i * Currently, we cannot fully disable driver dynamic }else {for (idx1 =RF_PATH_A ; idx1 <=RF_PATH_B ; idx1++) { TxAGC[idx1] = - pPowerlevel[idx1] | (pPowerlevel[idx1]<<8 ) | - (pPowerlevel[idx1]<<16 ) | (pPowerlevel[idx1]<<24 ); + pPowerlevel[idx1] | (pPowerlevel[idx1] <<8 ) | + (pPowerlevel[idx1] <<16 ) | (pPowerlevel[idx1] <<24 ); }if (pHalData->EEPROMRegulatory ==0 ) { tmpval = (pHalData->MCSTxPowerLevelOriginalOffset[0 ][6 ]) + - (pHalData->MCSTxPowerLevelOriginalOffset[0 ][7 ]<<8 ); + (pHalData->MCSTxPowerLevelOriginalOffset[0 ][7 ] <<8 ); TxAGC[RF_PATH_A ] += tmpval; tmpval = (pHalData->MCSTxPowerLevelOriginalOffset[0 ][14 ]) + - (pHalData->MCSTxPowerLevelOriginalOffset[0 ][15 ]<<24 ); + (pHalData->MCSTxPowerLevelOriginalOffset[0 ][15 ] <<24 ); TxAGC[RF_PATH_B ] += tmpval; } }
@@ -206,15 +206,15 @@ i * Currently, we cannot fully disable driver dynamic }/* rf-A cck tx power */ - tmpval = TxAGC[RF_PATH_A ]&0xff ; + tmpval = TxAGC[RF_PATH_A ] &0xff ;PHY_SetBBReg (Adapter, rTxAGC_A_CCK1_Mcs32, bMaskByte1, tmpval); - tmpval = TxAGC[RF_PATH_A ]>>8 ; + tmpval = TxAGC[RF_PATH_A ] >>8 ;PHY_SetBBReg (Adapter, rTxAGC_B_CCK11_A_CCK2_11,0xffffff00 , tmpval);/* rf-B cck tx power */ - tmpval = TxAGC[RF_PATH_B ]>>24 ; + tmpval = TxAGC[RF_PATH_B ] >>24 ;PHY_SetBBReg (Adapter, rTxAGC_B_CCK11_A_CCK2_11, bMaskByte0, tmpval); - tmpval = TxAGC[RF_PATH_B ]&0x00ffffff ; + tmpval = TxAGC[RF_PATH_B ] &0x00ffffff ;PHY_SetBBReg (Adapter, rTxAGC_B_CCK1_55_Mcs32,0xffffff00 , tmpval); }/* PHY_RF6052SetCckTxPower */
@@ -232,8 +232,8 @@ static void getpowerbase88e(struct adapter *Adapter, u8 *pPowerLevelOFDM,for (i =0 ; i <2 ; i++) { powerBase0 = pPowerLevelOFDM[i]; - powerBase0 = (powerBase0<<24 ) | (powerBase0<<16 ) | (powerBase0<<8 ) | powerBase0; - *(OfdmBase+i) = powerBase0; + powerBase0 = (powerBase0 <<24 ) | (powerBase0 <<16 ) | (powerBase0 <<8 ) | powerBase0; + *(OfdmBase + i) = powerBase0; }for (i =0 ; i < pHalData->NumTotalRFPath; i++) {/* Check HT20 to HT40 diff */
@@ -242,8 +242,8 @@ static void getpowerbase88e(struct adapter *Adapter, u8 *pPowerLevelOFDM,else powerlevel[i] = pPowerLevelBW40[i]; powerBase1 = powerlevel[i]; - powerBase1 = (powerBase1<<24 ) | (powerBase1<<16 ) | (powerBase1<<8 ) | powerBase1; - *(MCSBase+i) = powerBase1; + powerBase1 = (powerBase1 <<24 ) | (powerBase1 <<16 ) | (powerBase1 <<8 ) | powerBase1; + *(MCSBase + i) = powerBase1; } } static void get_rx_power_val_by_reg(struct adapter *Adapter, u8 Channel,
@@ -264,7 +264,7 @@ static void get_rx_power_val_by_reg(struct adapter *Adapter, u8 Channel,case 0 :/* Realtek better performance */ /* increase power diff defined by Realtek for large power */ chnlGroup =0 ; - writeVal = pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index+(rf ?8 :0 )] + + writeVal = pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index + (rf ?8 :0 )] + ((index <2 ) ? powerBase0[rf] : powerBase1[rf]);break ;case 1 :/* Realtek regulatory */
@@ -285,7 +285,7 @@ static void get_rx_power_val_by_reg(struct adapter *Adapter, u8 Channel,else if (Channel ==14 )/* Channel 14 */ chnlGroup =5 ; } - writeVal = pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index+(rf ?8 :0 )] + + writeVal = pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index + (rf ?8 :0 )] + ((index <2 ) ? powerBase0[rf] : powerBase1[rf]);break ;case 2 :/* Better regulatory */
@@ -297,14 +297,14 @@ static void get_rx_power_val_by_reg(struct adapter *Adapter, u8 Channel, chnlGroup =0 ;if (index <2 ) - pwr_diff = pHalData->TxPwrLegacyHtDiff[rf][Channel-1 ]; + pwr_diff = pHalData->TxPwrLegacyHtDiff[rf][Channel -1 ];else if (pHalData->CurrentChannelBW ==HT_CHANNEL_WIDTH_20 ) - pwr_diff = pHalData->TxPwrHt20Diff[rf][Channel-1 ]; + pwr_diff = pHalData->TxPwrHt20Diff[rf][Channel -1 ];if (pHalData->CurrentChannelBW ==HT_CHANNEL_WIDTH_40 ) - customer_pwr_limit = pHalData->PwrGroupHT40[rf][Channel-1 ]; + customer_pwr_limit = pHalData->PwrGroupHT40[rf][Channel -1 ];else - customer_pwr_limit = pHalData->PwrGroupHT20[rf][Channel-1 ]; + customer_pwr_limit = pHalData->PwrGroupHT20[rf][Channel -1 ];if (pwr_diff >= customer_pwr_limit) pwr_diff =0 ;
@@ -312,18 +312,18 @@ static void get_rx_power_val_by_reg(struct adapter *Adapter, u8 Channel, pwr_diff = customer_pwr_limit - pwr_diff;for (i =0 ; i <4 ; i++) { - pwr_diff_limit[i] = (u8)((pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index+(rf ?8 :0 )]&(0x7f <<(i*8 )))>>(i*8 )); + pwr_diff_limit[i] = (u8)((pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index + (rf ?8 :0 )] & (0x7f << (i *8 ))) >> (i *8 ));if (pwr_diff_limit[i] > pwr_diff) pwr_diff_limit[i] = pwr_diff; } - customer_limit = (pwr_diff_limit[3 ]<<24 ) | (pwr_diff_limit[2 ]<<16 ) | - (pwr_diff_limit[1 ]<<8 ) | (pwr_diff_limit[0 ]); + customer_limit = (pwr_diff_limit[3 ] <<24 ) | (pwr_diff_limit[2 ] <<16 ) | + (pwr_diff_limit[1 ] <<8 ) | (pwr_diff_limit[0 ]); writeVal = customer_limit + ((index <2 ) ? powerBase0[rf] : powerBase1[rf]);break ;default : chnlGroup =0 ; - writeVal = pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index+(rf ?8 :0 )] + + writeVal = pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index + (rf ?8 :0 )] + ((index <2 ) ? powerBase0[rf] : powerBase1[rf]);break ; }
@@ -340,7 +340,7 @@ static void get_rx_power_val_by_reg(struct adapter *Adapter, u8 Channel,/* This mechanism is only applied when Driver-Highpower-Mechanism is OFF. */ if (pdmpriv->DynamicTxHighPowerLvl == TxHighPwrLevel_BT1) writeVal = writeVal -0x06060606 ; - *(pOutWriteVal+rf) = writeVal; + *(pOutWriteVal + rf) = writeVal; } }static void writeOFDMPowerReg88E (struct adapter *Adapter,u8 index,u32 *pValue)
@@ -361,11 +361,11 @@ static void writeOFDMPowerReg88E(struct adapter *Adapter, u8 index, u32 *pValue)for (rf =0 ; rf <2 ; rf++) { writeVal = pValue[rf];for (i =0 ; i <4 ; i++) { - pwr_val[i] = (u8)((writeVal & (0x7f <<(i*8 )))>>(i*8 )); + pwr_val[i] = (u8)((writeVal & (0x7f << (i *8 ))) >> (i *8 ));if (pwr_val[i] >RF6052_MAX_TX_PWR ) pwr_val[i] =RF6052_MAX_TX_PWR ; } - writeVal = (pwr_val[3 ]<<24 ) | (pwr_val[2 ]<<16 ) | (pwr_val[1 ]<<8 ) | pwr_val[0 ]; + writeVal = (pwr_val[3 ] <<24 ) | (pwr_val[2 ] <<16 ) | (pwr_val[1 ] <<8 ) | pwr_val[0 ];if (rf ==0 ) regoffset = regoffset_a[index];
@@ -386,10 +386,10 @@ static void writeOFDMPowerReg88E(struct adapter *Adapter, u8 index, u32 *pValue) regoffset =0xc98 ;for (i =0 ; i <3 ; i++) {if (i !=2 ) - writeVal = (writeVal >8 ) ? (writeVal-8 ) :0 ; + writeVal = (writeVal >8 ) ? (writeVal -8 ) :0 ;else - writeVal = (writeVal >6 ) ? (writeVal-6 ) :0 ; -rtw_write8 (Adapter, (u32)(regoffset+i), (u8 )writeVal); + writeVal = (writeVal >6 ) ? (writeVal -6 ) :0 ; +rtw_write8 (Adapter, (u32)(regoffset + i), (u8 )writeVal); } } }
@@ -475,11 +475,11 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter)break ;case RF_PATH_B :case RF_PATH_D : - u4RegValue =PHY_QueryBBReg (Adapter, pPhyReg->rfintfs, bRFSI_RFENV<<16 ); + u4RegValue =PHY_QueryBBReg (Adapter, pPhyReg->rfintfs, bRFSI_RFENV <<16 );break ; }/*----Set RF_ENV enable----*/ -PHY_SetBBReg (Adapter, pPhyReg->rfintfe, bRFSI_RFENV<<16 ,0x1 ); +PHY_SetBBReg (Adapter, pPhyReg->rfintfe, bRFSI_RFENV <<16 ,0x1 );udelay (1 );/* PlatformStallExecution(1); */ /*----Set RF_ENV output high----*/
@@ -516,7 +516,7 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter)break ;case RF_PATH_B :case RF_PATH_D : -PHY_SetBBReg (Adapter, pPhyReg->rfintfs, bRFSI_RFENV<<16 , u4RegValue); +PHY_SetBBReg (Adapter, pPhyReg->rfintfs, bRFSI_RFENV <<16 , u4RegValue);break ; }if (rtStatus != _SUCCESS)
drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c +1 -1
@@ -177,7 +177,7 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, struct phy_statrtl8188e_process_phy_info (padapter, precvframe); } }else if (pkt_info.bPacketToSelf || pkt_info.bPacketBeacon) { -if (check_fwstate (&padapter->mlmepriv,WIFI_ADHOC_STATE |WIFI_ADHOC_MASTER_STATE )) { +if (check_fwstate (&padapter->mlmepriv,WIFI_ADHOC_STATE |WIFI_ADHOC_MASTER_STATE )) {if (psta) precvframe->psta = psta; }
drivers/staging/r8188eu/hal/rtl8188eu_led.c +5 -5
@@ -20,10 +20,10 @@ void SwLedOn(struct adapter *padapter, struct LED_871x *pLed) LedCfg =rtw_read8 (padapter,REG_LEDCFG2 );switch (pLed->LedPin) {case LED_PIN_LED0 : -rtw_write8 (padapter,REG_LEDCFG2 , (LedCfg&0xf0 )|BIT (5 )|BIT (6 ));/* SW control led0 on. */ +rtw_write8 (padapter,REG_LEDCFG2 , (LedCfg &0xf0 ) |BIT (5 ) |BIT (6 ));/* SW control led0 on. */ break ;case LED_PIN_LED1 : -rtw_write8 (padapter,REG_LEDCFG2 , (LedCfg&0x0f )|BIT (5 ));/* SW control led1 on. */ +rtw_write8 (padapter,REG_LEDCFG2 , (LedCfg &0x0f ) |BIT (5 ));/* SW control led1 on. */ break ;default :break ;
@@ -48,17 +48,17 @@ void SwLedOff(struct adapter *padapter, struct LED_871x *pLed)if (pHalData->bLedOpenDrain) {/* Open-drain arrangement for controlling the LED) */ LedCfg &=0x90 ;/* Set to software control. */ -rtw_write8 (padapter,REG_LEDCFG2 , (LedCfg|BIT (3 ))); +rtw_write8 (padapter,REG_LEDCFG2 , (LedCfg |BIT (3 ))); LedCfg =rtw_read8 (padapter,REG_MAC_PINMUX_CFG ); LedCfg &=0xFE ;rtw_write8 (padapter,REG_MAC_PINMUX_CFG , LedCfg); }else { -rtw_write8 (padapter,REG_LEDCFG2 , (LedCfg|BIT (3 )|BIT (5 )|BIT (6 ))); +rtw_write8 (padapter,REG_LEDCFG2 , (LedCfg |BIT (3 ) |BIT (5 ) |BIT (6 ))); }break ;case LED_PIN_LED1 : LedCfg &=0x0f ;/* Set to software control. */ -rtw_write8 (padapter,REG_LEDCFG2 , (LedCfg|BIT (3 ))); +rtw_write8 (padapter,REG_LEDCFG2 , (LedCfg |BIT (3 )));break ;default :break ;
drivers/staging/r8188eu/hal/rtl8188eu_recv.c +1 -1
@@ -82,7 +82,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)if (pskb) { pskb->dev = padapter->pnetdev; tmpaddr = (size_t )pskb->data; - alignment = tmpaddr & (RECVBUFF_ALIGN_SZ -1 ); + alignment = tmpaddr & (RECVBUFF_ALIGN_SZ -1 );skb_reserve (pskb, (RECVBUFF_ALIGN_SZ - alignment));skb_queue_tail (&precvpriv->free_recv_skb_queue, pskb);
drivers/staging/r8188eu/hal/rtl8188eu_xmit.c +18 -18
@@ -61,12 +61,12 @@ void rtl8188e_fill_fake_txdesc(struct adapter *adapt, u8 *desc, u32 BufferLen, u/* offset 0 */ ptxdesc->txdw0 |=cpu_to_le32 (OWN |FSG |LSG );/* own, bFirstSeg, bLastSeg; */ - ptxdesc->txdw0 |=cpu_to_le32 (((TXDESC_SIZE +OFFSET_SZ )<<OFFSET_SHT )&0x00ff0000 );/* 32 bytes for TX Desc */ + ptxdesc->txdw0 |=cpu_to_le32 (((TXDESC_SIZE +OFFSET_SZ ) <<OFFSET_SHT ) &0x00ff0000 );/* 32 bytes for TX Desc */ - ptxdesc->txdw0 |=cpu_to_le32 (BufferLen&0x0000ffff );/* Buffer size + command header */ + ptxdesc->txdw0 |=cpu_to_le32 (BufferLen &0x0000ffff );/* Buffer size + command header */ /* offset 4 */ - ptxdesc->txdw1 |=cpu_to_le32 ((QSLT_MGNT <<QSEL_SHT )&0x00001f00 );/* Fixed queue of Mgnt queue */ + ptxdesc->txdw1 |=cpu_to_le32 ((QSLT_MGNT <<QSEL_SHT ) &0x00001f00 );/* Fixed queue of Mgnt queue */ /* Set NAVUSEHDR to prevent Ps-poll AId filed to be changed to error vlaue by Hw. */ if (ispspoll) {
@@ -94,16 +94,16 @@ static void fill_txdesc_sectype(struct pkt_attrib *pattrib, struct tx_desc *ptxd/* SEC_TYPE : 0:NO_ENC,1:WEP40/TKIP,2:WAPI,3:AES */ case _WEP40_:case _WEP104_: - ptxdesc->txdw1 |=cpu_to_le32 ((0x01 <<SEC_TYPE_SHT )&0x00c00000 ); + ptxdesc->txdw1 |=cpu_to_le32 ((0x01 <<SEC_TYPE_SHT ) &0x00c00000 ); ptxdesc->txdw2 |=cpu_to_le32 (0x7 <<AMPDU_DENSITY_SHT );break ;case _TKIP_:case _TKIP_WTMIC_: - ptxdesc->txdw1 |=cpu_to_le32 ((0x01 <<SEC_TYPE_SHT )&0x00c00000 ); + ptxdesc->txdw1 |=cpu_to_le32 ((0x01 <<SEC_TYPE_SHT ) &0x00c00000 ); ptxdesc->txdw2 |=cpu_to_le32 (0x7 <<AMPDU_DENSITY_SHT );break ;case _AES_: - ptxdesc->txdw1 |=cpu_to_le32 ((0x03 <<SEC_TYPE_SHT )&0x00c00000 ); + ptxdesc->txdw1 |=cpu_to_le32 ((0x03 <<SEC_TYPE_SHT ) &0x00c00000 ); ptxdesc->txdw2 |=cpu_to_le32 (0x7 <<AMPDU_DENSITY_SHT );break ;case _NO_PRIVACY_:
@@ -130,7 +130,7 @@ static void fill_txdesc_vcs(struct pkt_attrib *pattrib, __le32 *pdw) *pdw |=cpu_to_le32 (HW_RTS_EN );/* Set RTS BW */ if (pattrib->ht_en) { - *pdw |= (pattrib->bwmode&HT_CHANNEL_WIDTH_40 ) ?cpu_to_le32 (BIT (27 )) :0 ; + *pdw |= (pattrib->bwmode &HT_CHANNEL_WIDTH_40 ) ?cpu_to_le32 (BIT (27 )) :0 ;if (pattrib->ch_offset ==HAL_PRIME_CHNL_OFFSET_LOWER ) *pdw |=cpu_to_le32 ((0x01 <<28 ) &0x30000000 );
@@ -147,7 +147,7 @@ static void fill_txdesc_vcs(struct pkt_attrib *pattrib, __le32 *pdw)static void fill_txdesc_phy (struct pkt_attrib *pattrib,__le32 *pdw) {if (pattrib->ht_en) { - *pdw |= (pattrib->bwmode&HT_CHANNEL_WIDTH_40 ) ?cpu_to_le32 (BIT (25 )) :0 ; + *pdw |= (pattrib->bwmode &HT_CHANNEL_WIDTH_40 ) ?cpu_to_le32 (BIT (25 )) :0 ;if (pattrib->ch_offset ==HAL_PRIME_CHNL_OFFSET_LOWER ) *pdw |=cpu_to_le32 ((0x01 <<DATA_SC_SHT ) &0x003f0000 );
@@ -175,7 +175,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bagif (adapt->registrypriv.mp_mode ==0 ) {if ((!bagg_pkt) && (urb_zero_packet_chk (adapt, sz) ==0 )) { - ptxdesc = (struct tx_desc *)(pmem+PACKET_OFFSET_SZ ); + ptxdesc = (struct tx_desc *)(pmem +PACKET_OFFSET_SZ ); pull =1 ; } }
@@ -267,11 +267,11 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag ptxdesc->txdw4 |=cpu_to_le32 (BIT (24 ));/* DATA_SHORT */ ptxdesc->txdw5 |=cpu_to_le32 (MRateToHwRate (pmlmeext->tx_rate)); } - }else if ((pxmitframe->frame_tag&0x0f ) ==MGNT_FRAMETAG ) { + }else if ((pxmitframe->frame_tag &0x0f ) ==MGNT_FRAMETAG ) {/* offset 4 */ ptxdesc->txdw1 |=cpu_to_le32 (pattrib->mac_id &0x3f ); - qsel = (uint)(pattrib->qsel&0x0000001f ); + qsel = (uint)(pattrib->qsel &0x0000001f ); ptxdesc->txdw1 |=cpu_to_le32 ((qsel <<QSEL_SHT ) &0x00001f00 ); ptxdesc->txdw1 |=cpu_to_le32 ((pattrib->raid <<RATE_ID_SHT ) &0x000f0000 );
@@ -282,7 +282,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag ptxdesc->txdw2 |=cpu_to_le32 (BIT (19 ));/* offset 12 */ - ptxdesc->txdw3 |=cpu_to_le32 ((pattrib->seqnum<<SEQ_SHT )&0x0FFF0000 ); + ptxdesc->txdw3 |=cpu_to_le32 ((pattrib->seqnum <<SEQ_SHT ) &0x0FFF0000 );/* offset 20 */ ptxdesc->txdw5 |=cpu_to_le32 (RTY_LMT_EN );/* retry limit enable */
@@ -292,9 +292,9 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag ptxdesc->txdw5 |=cpu_to_le32 (0x00300000 );/* retry limit = 12 */ ptxdesc->txdw5 |=cpu_to_le32 (MRateToHwRate (pmlmeext->tx_rate)); - }else if ((pxmitframe->frame_tag&0x0f ) ==TXAGG_FRAMETAG ) { + }else if ((pxmitframe->frame_tag &0x0f ) ==TXAGG_FRAMETAG ) {DBG_88E ("pxmitframe->frame_tag == TXAGG_FRAMETAG\n" ); - }else if (((pxmitframe->frame_tag&0x0f ) ==MP_FRAMETAG ) && + }else if (((pxmitframe->frame_tag &0x0f ) ==MP_FRAMETAG ) && (adapt->registrypriv.mp_mode ==1 )) {fill_txdesc_for_mp (adapt, ptxdesc); }else {
@@ -308,7 +308,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag/* offset 8 */ /* offset 12 */ - ptxdesc->txdw3 |=cpu_to_le32 ((pattrib->seqnum<<SEQ_SHT )&0x0fff0000 ); + ptxdesc->txdw3 |=cpu_to_le32 ((pattrib->seqnum <<SEQ_SHT ) &0x0fff0000 );/* offset 20 */ ptxdesc->txdw5 |=cpu_to_le32 (MRateToHwRate (pmlmeext->tx_rate));
@@ -470,7 +470,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp/* 3 2. aggregate same priority and same DA(AP or STA) frames */ pfirstframe = pxmitframe; - len =xmitframe_need_length (pfirstframe) +TXDESC_SIZE + (pfirstframe->pkt_offset*PACKET_OFFSET_SZ ); + len =xmitframe_need_length (pfirstframe) +TXDESC_SIZE + (pfirstframe->pkt_offset *PACKET_OFFSET_SZ ); pbuf_tail = len; pbuf =_RND8 (pbuf_tail);
@@ -521,7 +521,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp pxmitframe->agg_num =0 ;/* not first frame of aggregation */ pxmitframe->pkt_offset =0 ;/* not first frame of aggregation, no need to reserve offset */ - len =xmitframe_need_length (pxmitframe) +TXDESC_SIZE + (pxmitframe->pkt_offset*PACKET_OFFSET_SZ ); + len =xmitframe_need_length (pxmitframe) +TXDESC_SIZE + (pxmitframe->pkt_offset *PACKET_OFFSET_SZ );if (_RND8 (pbuf + len) >MAX_XMITBUF_SZ ) { pxmitframe->agg_num =1 ;
@@ -626,7 +626,7 @@ static s32 pre_xmitframe(struct adapter *adapt, struct xmit_frame *pxmitframe)if (rtw_txframes_sta_ac_pending (adapt, pattrib) >0 ) goto enqueue; -if (check_fwstate (pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true) +if (check_fwstate (pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == true) goto enqueue; pxmitbuf =rtw_alloc_xmitbuf (pxmitpriv);
drivers/staging/r8188eu/hal/usb_halinit.c +81 -81
474 lines not on this page · raw message
drivers/staging/r8188eu/hal/usb_ops_linux.c +10 -10
@@ -114,7 +114,7 @@ static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr) requesttype =0x01 ;/* read_in */ index =0 ;/* n/a */ - wvalue = (u16)(addr&0x0000ffff ); + wvalue = (u16)(addr &0x0000ffff ); len =1 ;usbctrl_vendorreq (pintfhdl, request, wvalue, index, &data, len, requesttype);
@@ -137,11 +137,11 @@ static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr) request =0x05 ; requesttype =0x01 ;/* read_in */ index =0 ;/* n/a */ - wvalue = (u16)(addr&0x0000ffff ); + wvalue = (u16)(addr &0x0000ffff ); len =2 ;usbctrl_vendorreq (pintfhdl, request, wvalue, index, &data, len, requesttype); -return (u16)(le32_to_cpu (data)&0xffff ); +return (u16)(le32_to_cpu (data) &0xffff ); }static u32 usb_read32 (struct intf_hdl *pintfhdl,u32 addr)
@@ -157,7 +157,7 @@ static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr) requesttype =0x01 ;/* read_in */ index =0 ;/* n/a */ - wvalue = (u16)(addr&0x0000ffff ); + wvalue = (u16)(addr &0x0000ffff ); len =4 ;usbctrl_vendorreq (pintfhdl, request, wvalue, index, &data, len, requesttype);
@@ -179,7 +179,7 @@ static int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val) request =0x05 ; requesttype =0x00 ;/* write_out */ index =0 ;/* n/a */ - wvalue = (u16)(addr&0x0000ffff ); + wvalue = (u16)(addr &0x0000ffff ); len =1 ; data = val; ret =usbctrl_vendorreq (pintfhdl, request, wvalue, index, &data, len, requesttype);
@@ -203,7 +203,7 @@ static int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val) requesttype =0x00 ;/* write_out */ index =0 ;/* n/a */ - wvalue = (u16)(addr&0x0000ffff ); + wvalue = (u16)(addr &0x0000ffff ); len =2 ; data =cpu_to_le32 (val &0x0000ffff );
@@ -231,7 +231,7 @@ static int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val) requesttype =0x00 ;/* write_out */ index =0 ;/* n/a */ - wvalue = (u16)(addr&0x0000ffff ); + wvalue = (u16)(addr &0x0000ffff ); len =4 ; data =cpu_to_le32 (val);
@@ -258,7 +258,7 @@ static int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata requesttype =0x00 ;/* write_out */ index =0 ;/* n/a */ - wvalue = (u16)(addr&0x0000ffff ); + wvalue = (u16)(addr &0x0000ffff ); len = length;memcpy (buf, pdata, len);
@@ -438,7 +438,7 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) pkt_copy =NULL ;if (transfer_len >0 && pkt_cnt ==0 ) - pkt_cnt = (le32_to_cpu (prxstat->rxdw2)>>16 ) &0xff ; + pkt_cnt = (le32_to_cpu (prxstat->rxdw2) >>16 ) &0xff ; }while ((transfer_len >0 ) && (pkt_cnt >0 ));
@@ -573,7 +573,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) } tmpaddr = (size_t )precvbuf->pskb->data; - alignment = tmpaddr & (RECVBUFF_ALIGN_SZ -1 ); + alignment = tmpaddr & (RECVBUFF_ALIGN_SZ -1 );skb_reserve (precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment)); precvbuf->phead = precvbuf->pskb->head;
Signature · 1 line
2.32.0