mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 08:34:20 +00:00
rtl8188eu: Change all "if(" to "if ("
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
aa89a39a09
commit
6ead3e77dc
61 changed files with 3500 additions and 3500 deletions
|
@ -50,7 +50,7 @@ static u8 _is_fw_read_cmd_down(struct adapter* padapter, u8 msgbox_num)
|
|||
|
||||
do{
|
||||
valid = rtw_read8(padapter,REG_HMETFR) & BIT(msgbox_num);
|
||||
if(0 == valid ){
|
||||
if (0 == valid ){
|
||||
read_down = true;
|
||||
}
|
||||
}while( (!read_down) && (retry_cnts--));
|
||||
|
@ -88,7 +88,7 @@ static s32 FillH2CCmd_88E(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8
|
|||
padapter = GET_PRIMARY_ADAPTER(padapter);
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if(padapter->bFWReady == false)
|
||||
if (padapter->bFWReady == false)
|
||||
{
|
||||
DBG_8192C("FillH2CCmd_88E(): return H2C cmd because fw is not ready\n");
|
||||
return ret;
|
||||
|
@ -109,14 +109,14 @@ static s32 FillH2CCmd_88E(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8
|
|||
do{
|
||||
h2c_box_num = pHalData->LastHMEBoxNum;
|
||||
|
||||
if(!_is_fw_read_cmd_down(padapter, h2c_box_num)){
|
||||
if (!_is_fw_read_cmd_down(padapter, h2c_box_num)){
|
||||
DBG_8192C(" fw read cmd failed...\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
*(u8*)(&h2c_cmd) = ElementID;
|
||||
|
||||
if(CmdLen<=3)
|
||||
if (CmdLen<=3)
|
||||
{
|
||||
memcpy((u8*)(&h2c_cmd)+1, pCmdBuffer, CmdLen );
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ u8 rtl8188e_set_rssi_cmd(struct adapter*padapter, u8 *param)
|
|||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
;
|
||||
|
||||
if(pHalData->fw_ractrl == true){
|
||||
if (pHalData->fw_ractrl == true){
|
||||
}else{
|
||||
DBG_8192C("==>%s fw dont support RA\n",__FUNCTION__);
|
||||
res=_FAIL;
|
||||
|
@ -183,7 +183,7 @@ u8 rtl8188e_set_raid_cmd(struct adapter*padapter, u32 mask)
|
|||
u8 res=_SUCCESS;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
;
|
||||
if(pHalData->fw_ractrl == true){
|
||||
if (pHalData->fw_ractrl == true){
|
||||
__le32 lmask;
|
||||
|
||||
memset(buf, 0, 3);
|
||||
|
@ -212,7 +212,7 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi
|
|||
raid = (bitmap>>28) & 0x0f;
|
||||
bitmap &=0x0fffffff;
|
||||
|
||||
if(rssi_level != DM_RATR_STA_INIT)
|
||||
if (rssi_level != DM_RATR_STA_INIT)
|
||||
bitmap = ODM_Get_Rate_Bitmap(&pHalData->odmpriv, macid, bitmap, rssi_level);
|
||||
|
||||
bitmap |= ((raid<<28)&0xf0000000);
|
||||
|
@ -232,7 +232,7 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi
|
|||
__FUNCTION__,macid ,raid ,bitmap, shortGIrate);
|
||||
|
||||
|
||||
#if(RATE_ADAPTIVE_SUPPORT == 1)
|
||||
#if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
ODM_RA_UpdateRateInfo_8188E(
|
||||
&(pHalData->odmpriv),
|
||||
macid,
|
||||
|
@ -286,7 +286,7 @@ void rtl8188e_set_FwPwrMode_cmd(struct adapter *padapter, u8 Mode)
|
|||
|
||||
H2CSetPwrMode.bAllQueueUAPSD = padapter->registrypriv.uapsd_enable;
|
||||
|
||||
if(Mode > 0)
|
||||
if (Mode > 0)
|
||||
{
|
||||
H2CSetPwrMode.PwrState = 0x00;/* AllON(0x0C), RFON(0x04), RFOFF(0x00) */
|
||||
#ifdef CONFIG_EXT_CLK
|
||||
|
@ -312,13 +312,13 @@ void rtl8188e_set_FwMediaStatus_cmd(struct adapter *padapter, __le16 mstatus_rpt
|
|||
DBG_871X("### %s: MStatus=%x MACID=%d\n", __FUNCTION__,opmode,macid);
|
||||
FillH2CCmd_88E(padapter, H2C_COM_MEDIA_STATUS_RPT, sizeof(mst_rpt), (u8 *)&mst_rpt);
|
||||
|
||||
if(macid > 31){
|
||||
if (macid > 31){
|
||||
macid = macid-32;
|
||||
reg_macid_no_link = REG_MACID_NO_LINK_1;
|
||||
}
|
||||
|
||||
/* Delete select macid (MACID 0~63) from queue list. */
|
||||
if(opmode == 1)/* 1:connect */
|
||||
if (opmode == 1)/* 1:connect */
|
||||
{
|
||||
rtw_write32(padapter,reg_macid_no_link, (rtw_read32(padapter,reg_macid_no_link) & (~BIT(macid))));
|
||||
}
|
||||
|
@ -376,7 +376,7 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength)
|
|||
pframe += 2;
|
||||
pktlen += 2;
|
||||
|
||||
if( (pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)
|
||||
if ( (pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)
|
||||
{
|
||||
/* DBG_871X("ie len=%d\n", cur_network->IELength); */
|
||||
pktlen += cur_network->IELength - sizeof(struct ndis_802_11_fixed_ies);
|
||||
|
@ -397,7 +397,7 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength)
|
|||
/* DS parameter set */
|
||||
pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pktlen);
|
||||
|
||||
if( (pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE)
|
||||
if ( (pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE)
|
||||
{
|
||||
u32 ATIMWindow;
|
||||
/* IBSS Parameter Set... */
|
||||
|
@ -561,7 +561,7 @@ CheckFwRsvdPageContent(
|
|||
HAL_DATA_TYPE* pHalData = GET_HAL_DATA(Adapter);
|
||||
u32 MaxBcnPageNum;
|
||||
|
||||
if(pHalData->FwRsvdPageStartOffset != 0)
|
||||
if (pHalData->FwRsvdPageStartOffset != 0)
|
||||
{
|
||||
/*MaxBcnPageNum = PageNum_128(pMgntInfo->MaxBeaconSize);
|
||||
RT_ASSERT((MaxBcnPageNum <= pHalData->FwRsvdPageStartOffset),
|
||||
|
@ -708,7 +708,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus)
|
|||
|
||||
DBG_871X("%s mstatus(%x)\n", __FUNCTION__,mstatus);
|
||||
|
||||
if(mstatus == 1) {
|
||||
if (mstatus == 1) {
|
||||
/* We should set AID, correct TSF, HW seq enable before set JoinBssReport to Fw in 88/92C. */
|
||||
/* Suggested by filen. Added by tynli. */
|
||||
rtw_write16(padapter, REG_BCN_PSR_RPT, (0xC000|pmlmeinfo->aid));
|
||||
|
@ -730,7 +730,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus)
|
|||
rtw_write8(padapter, REG_BCN_CTRL, rtw_read8(padapter, REG_BCN_CTRL)&(~BIT(3)));
|
||||
rtw_write8(padapter, REG_BCN_CTRL, rtw_read8(padapter, REG_BCN_CTRL)|BIT(4));
|
||||
|
||||
if(pHalData->RegFwHwTxQCtrl&BIT6)
|
||||
if (pHalData->RegFwHwTxQCtrl&BIT6)
|
||||
{
|
||||
DBG_871X("HalDownloadRSVDPage(): There is an Adapter is sending beacon.\n");
|
||||
bSendBeacon = true;
|
||||
|
@ -761,10 +761,10 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus)
|
|||
}while(!bcn_valid && DLBcnCount<=100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
|
||||
|
||||
/* RT_ASSERT(bcn_valid, ("HalDownloadRSVDPage88ES(): 1 Download RSVD page failed!\n")); */
|
||||
if(padapter->bSurpriseRemoved || padapter->bDriverStopped)
|
||||
if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
|
||||
{
|
||||
}
|
||||
else if(!bcn_valid)
|
||||
else if (!bcn_valid)
|
||||
DBG_871X("%s: 1 Download RSVD page failed! DLBcnCount:%u, poll:%u\n", __FUNCTION__ ,DLBcnCount, poll);
|
||||
else
|
||||
DBG_871X("%s: 1 Download RSVD success! DLBcnCount:%u, poll:%u\n", __FUNCTION__, DLBcnCount, poll);
|
||||
|
@ -774,10 +774,10 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus)
|
|||
/* At run time, we cannot get the Tx Desc until it is released in TxHandleInterrupt() so we will return */
|
||||
/* the beacon TCB in the following code. 2011.11.23. by tynli. */
|
||||
/* */
|
||||
/* if(bcn_valid && padapter->bEnterPnpSleep) */
|
||||
if(0)
|
||||
/* if (bcn_valid && padapter->bEnterPnpSleep) */
|
||||
if (0)
|
||||
{
|
||||
if(bSendBeacon)
|
||||
if (bSendBeacon)
|
||||
{
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_BCN_VALID, NULL);
|
||||
DLBcnCount = 0;
|
||||
|
@ -798,10 +798,10 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus)
|
|||
}while(!bcn_valid && DLBcnCount<=100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
|
||||
|
||||
/* RT_ASSERT(bcn_valid, ("HalDownloadRSVDPage(): 2 Download RSVD page failed!\n")); */
|
||||
if(padapter->bSurpriseRemoved || padapter->bDriverStopped)
|
||||
if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
|
||||
{
|
||||
}
|
||||
else if(!bcn_valid)
|
||||
else if (!bcn_valid)
|
||||
DBG_871X("%s: 2 Download RSVD page failed! DLBcnCount:%u, poll:%u\n", __FUNCTION__ ,DLBcnCount, poll);
|
||||
else
|
||||
DBG_871X("%s: 2 Download RSVD success! DLBcnCount:%u, poll:%u\n", __FUNCTION__, DLBcnCount, poll);
|
||||
|
@ -819,7 +819,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus)
|
|||
/* prevent from setting 0x422[6] to 0 after download reserved page, or it will cause */
|
||||
/* the beacon cannot be sent by HW. */
|
||||
/* 2010.06.23. Added by tynli. */
|
||||
if(bSendBeacon)
|
||||
if (bSendBeacon)
|
||||
{
|
||||
rtw_write8(padapter, REG_FWHW_TXQ_CTRL+2, (pHalData->RegFwHwTxQCtrl|BIT6));
|
||||
pHalData->RegFwHwTxQCtrl |= BIT6;
|
||||
|
@ -828,7 +828,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus)
|
|||
/* */
|
||||
/* Update RSVD page location H2C to Fw. */
|
||||
/* */
|
||||
if(bcn_valid)
|
||||
if (bcn_valid)
|
||||
{
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_BCN_VALID, NULL);
|
||||
DBG_871X("Set RSVD page location to Fw.\n");
|
||||
|
@ -836,7 +836,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus)
|
|||
}
|
||||
|
||||
/* Do not enable HW DMA BCN or it will cause Pcie interface hang by timing issue. 2011.11.24. by tynli. */
|
||||
/* if(!padapter->bEnterPnpSleep) */
|
||||
/* if (!padapter->bEnterPnpSleep) */
|
||||
{
|
||||
/* Clear CR[8] or beacon packet will not be send to TxBuf anymore. */
|
||||
pHalData->RegCR_1 &= (~BIT0);
|
||||
|
@ -863,7 +863,7 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter* padapter, u8 p2p_ps_state)
|
|||
case P2P_PS_ENABLE:
|
||||
DBG_8192C("P2P_PS_ENABLE\n");
|
||||
/* update CTWindow value. */
|
||||
if( pwdinfo->ctwindow > 0 )
|
||||
if ( pwdinfo->ctwindow > 0 )
|
||||
{
|
||||
p2p_ps_offload->CTWindow_En = 1;
|
||||
rtw_write8(padapter, REG_P2P_CTWIN, pwdinfo->ctwindow);
|
||||
|
@ -874,7 +874,7 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter* padapter, u8 p2p_ps_state)
|
|||
{
|
||||
/* To control the register setting for which NOA */
|
||||
rtw_write8(padapter, REG_NOA_DESC_SEL, (i << 4));
|
||||
if(i == 0)
|
||||
if (i == 0)
|
||||
p2p_ps_offload->NoA0_En = 1;
|
||||
else
|
||||
p2p_ps_offload->NoA1_En = 1;
|
||||
|
@ -893,14 +893,14 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter* padapter, u8 p2p_ps_state)
|
|||
rtw_write8(padapter, REG_NOA_DESC_COUNT, pwdinfo->noa_count[i]);
|
||||
}
|
||||
|
||||
if( (pwdinfo->opp_ps == 1) || (pwdinfo->noa_num > 0) )
|
||||
if ( (pwdinfo->opp_ps == 1) || (pwdinfo->noa_num > 0) )
|
||||
{
|
||||
/* rst p2p circuit */
|
||||
rtw_write8(padapter, REG_DUAL_TSF_RST, BIT(4));
|
||||
|
||||
p2p_ps_offload->Offload_En = 1;
|
||||
|
||||
if(pwdinfo->role == P2P_ROLE_GO)
|
||||
if (pwdinfo->role == P2P_ROLE_GO)
|
||||
{
|
||||
p2p_ps_offload->role= 1;
|
||||
p2p_ps_offload->AllStaSleep = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue