tx_fwinfo->TxRate = MRateToHwRate8190Pci(tcb_desc->data_rate);
tx_fwinfo->EnableCPUDur = tcb_desc->bTxEnableFwCalcDur;
tx_fwinfo->Short = QueryIsShort(tx_fwinfo->TxHT, tx_fwinfo->TxRate, tcb_desc);
- if (tcb_desc->bAMPDUEnable)
- {//AMPDU enabled
+ if (tcb_desc->bAMPDUEnable) {//AMPDU enabled
tx_fwinfo->AllowAggregation = 1;
/* DWORD 1 */
tx_fwinfo->RxMF = tcb_desc->ampdu_factor;
for (i = 0; i < net->rates_len; i++) {
basic_rate = net->rates[i]&0x7f;
- switch (basic_rate)
- {
+ switch (basic_rate) {
case MGN_1M:
*rate_config |= RRSR_1M;
break;
break;
}
}
- for (i = 0; i < net->rates_ex_len; i++)
- {
+ for (i = 0; i < net->rates_ex_len; i++) {
basic_rate = net->rates_ex[i]&0x7f;
- switch (basic_rate)
- {
+ switch (basic_rate) {
case MGN_1M:
*rate_config |= RRSR_1M;
break;
u16 N_DBPS;
u16 Ceiling;
- if (rtl8192_IsWirelessBMode(DataRate))
- {
+ if (rtl8192_IsWirelessBMode(DataRate)) {
if (bManagementFrame || !bShortPreamble || DataRate == 10) /* long preamble */
FrameTime = (u16)(144+48+(FrameLength*8/(DataRate/10)));
else // Short preamble
{
u8 ret = DESC90_RATE1M;
- switch (rate)
- {
+ switch (rate) {
case MGN_1M:
ret = DESC90_RATE1M;
break;
tx_fwinfo->TxRate = MRateToHwRate8190Pci(tcb_desc->data_rate);
tx_fwinfo->EnableCPUDur = tcb_desc->bTxEnableFwCalcDur;
tx_fwinfo->Short = QueryIsShort(tx_fwinfo->TxHT, tx_fwinfo->TxRate, tcb_desc);
- if (tcb_desc->bAMPDUEnable) /* AMPDU enabled */
- {
+ if (tcb_desc->bAMPDUEnable) { /* AMPDU enabled */
tx_fwinfo->AllowAggregation = 1;
/* DWORD 1 */
tx_fwinfo->RxMF = tcb_desc->ampdu_factor;
break;
case IEEE_N_24G:
case IEEE_N_5G:
- if (ieee->pHTInfo->PeerMimoPs == 0) /* MIMO_PS_STATIC */
- {
+ if (ieee->pHTInfo->PeerMimoPs == 0) { /* MIMO_PS_STATIC */
ratr_value &= 0x0007F007;
} else {
if (priv->rf_type == RF_1T2R)
else
priv->EEPROM_Def_Ver = 1;
RT_TRACE(COMP_EPROM, "EEPROM_DEF_VER:%d\n", priv->EEPROM_Def_Ver);
- if (priv->EEPROM_Def_Ver == 0) /* old eeprom definition */
- {
+ if (priv->EEPROM_Def_Ver == 0) { /* old eeprom definition */
int i;
if (bLoad_From_EEPOM)
priv->EEPROMTxPowerLevelCCK = (eprom_read(dev, (EEPROM_TxPwIndex_CCK>>1))&0xff) >> 8;
//
#ifdef TO_DO_LIST
if (Adapter->ResetProgress == RESET_TYPE_NORESET) {
- if (pMgntInfo->RegRfOff == TRUE) /* User disable RF via registry. */
- {
+ if (pMgntInfo->RegRfOff == TRUE) { /* User disable RF via registry. */
RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RegRfOff ----------\n"));
MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW);
// Those actions will be discard in MgntActSet_RF_State because of the same state
for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++)
PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x0);
- } else if (pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) /* H/W or S/W RF OFF before sleep. */
- {
+ } else if (pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) { /* H/W or S/W RF OFF before sleep. */
RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RfOffReason(%d) ----------\n", pMgntInfo->RfOffReason));
MgntActSet_RF_State(Adapter, eRfOff, pMgntInfo->RfOffReason);
} else {
RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): RF is on ----------\n"));
}
} else {
- if (pHalData->eRFPowerState == eRfOff)
- {
+ if (pHalData->eRFPowerState == eRfOff) {
MgntActSet_RF_State(Adapter, eRfOff, pMgntInfo->RfOffReason);
// Those actions will be discard in MgntActSet_RF_State because of the same state
for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++)
}
#endif
//config RF.
- if (priv->ResetProgress == RESET_TYPE_NORESET)
- {
+ if (priv->ResetProgress == RESET_TYPE_NORESET) {
rtl8192_phy_RFConfig(dev);
RT_TRACE(COMP_INIT, "%s():after phy RF config\n", __func__);
}
}
if ((priv->force_reset) || (priv->ResetProgress == RESET_TYPE_NORESET &&
(priv->bForcedSilentReset ||
- (!priv->bDisableNormalResetCheck && ResetType == RESET_TYPE_SILENT)))) /* This is control by OID set in Pomelo */
- {
+ (!priv->bDisableNormalResetCheck && ResetType == RESET_TYPE_SILENT)))) { /* This is control by OID set in Pomelo */
RT_TRACE(COMP_RESET, "%s():priv->force_reset is %d,priv->ResetProgress is %d, priv->bForcedSilentReset is %d,priv->bDisableNormalResetCheck is %d,ResetType is %d\n", __func__, priv->force_reset, priv->ResetProgress, priv->bForcedSilentReset, priv->bDisableNormalResetCheck, ResetType);
rtl819x_ifsilentreset(dev);
}
u8 ret_rate = 0xff;
if (!bIsHT) {
- switch (rate)
- {
+ switch (rate) {
case DESC90_RATE1M:
ret_rate = MGN_1M;
break;
}
} else {
- switch (rate)
- {
+ switch (rate) {
case DESC90_RATEMCS0:
ret_rate = MGN_MCS0;
break;
{
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
- if (stats->bIsAMPDU && !stats->bFirstMPDU)
- {
+ if (stats->bIsAMPDU && !stats->bFirstMPDU) {
stats->mac_time[0] = priv->LastRxDescTSFLow;
stats->mac_time[1] = priv->LastRxDescTSFHigh;
} else {
}
// <2> Showed on UI for engineering
- if (pprevious_stats->bPacketToSelf || pprevious_stats->bPacketBeacon || pprevious_stats->bToSelfBA)
- {
- for (nspatial_stream = 0; nspatial_stream < 2; nspatial_stream++) /* 2 spatial stream */
- {
+ if (pprevious_stats->bPacketToSelf || pprevious_stats->bPacketBeacon || pprevious_stats->bToSelfBA) {
+ for (nspatial_stream = 0; nspatial_stream < 2; nspatial_stream++) { /* 2 spatial stream */
if (pprevious_stats->RxMIMOSignalQuality[nspatial_stream] != -1) {
if (priv->stats.rx_evm_percentage[nspatial_stream] == 0) /* initialize */
priv->stats.rx_evm_percentage[nspatial_stream] = pprevious_stats->RxMIMOSignalQuality[nspatial_stream];
else
preamble_guardinterval = 0;// long
- switch (stats->rate)
- {
+ switch (stats->rate) {
//
// CCK rate
//
ieee->hwsec_active = 1;
- if ((ieee->pHTInfo->IOTAction&HT_IOT_ACT_PURE_N_MODE) || !hwwep) /* add hwsec_support flag to totol control hw_sec on/off */
- {
+ if ((ieee->pHTInfo->IOTAction&HT_IOT_ACT_PURE_N_MODE) || !hwwep) { /* add hwsec_support flag to totol control hw_sec on/off */
ieee->hwsec_active = 0;
SECR_value &= ~SCR_RxDecEnable;
}
TargetCommand = i+CAM_CONTENT_COUNT*EntryNo;
TargetCommand |= BIT31|BIT16;
- if (i == 0) /* MAC|Config */
- {
+ if (i == 0) { /* MAC|Config */
TargetContent = (u32)(*(MacAddr+0)) << 16|
(u32)(*(MacAddr+1)) << 24|
(u32)usConfig;
write_nic_dword(dev, WCAMI, TargetContent);
write_nic_dword(dev, RWCAM, TargetCommand);
- } else if (i == 1) /* MAC */
- {
+ } else if (i == 1) { /* MAC */
TargetContent = (u32)(*(MacAddr+2)) |
(u32)(*(MacAddr+3)) << 8|
(u32)(*(MacAddr+4)) << 16|