diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c b/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c index da4cb28276b2..86759516838b 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c @@ -81,61 +81,58 @@ void PHY_RF6052SetBandwidth8723B( static int phy_RF6052_Config_ParaFile(struct adapter *Adapter) { u32 u4RegValue = 0; - u8 eRFPath; + u8 eRFPath = 0; struct bb_register_def *pPhyReg; struct hal_com_data *pHalData = GET_HAL_DATA(Adapter); /* 3----------------------------------------------------------------- */ /* 3 <2> Initialize RF */ /* 3----------------------------------------------------------------- */ - /* for (eRFPath = RF_PATH_A; eRFPath NumTotalRFPath; eRFPath++) */ - for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++) { - pPhyReg = &pHalData->PHYRegDef[eRFPath]; + pPhyReg = &pHalData->PHYRegDef[eRFPath]; - /*----Store original RFENV control type----*/ - switch (eRFPath) { - case RF_PATH_A: - u4RegValue = PHY_QueryBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV); - break; - case RF_PATH_B: - u4RegValue = PHY_QueryBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV << 16); - break; - } + /*----Store original RFENV control type----*/ + switch (eRFPath) { + case RF_PATH_A: + u4RegValue = PHY_QueryBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV); + break; + case RF_PATH_B: + u4RegValue = PHY_QueryBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV << 16); + break; + } - /*----Set RF_ENV enable----*/ - PHY_SetBBReg(Adapter, pPhyReg->rfintfe, bRFSI_RFENV << 16, 0x1); - udelay(1);/* PlatformStallExecution(1); */ + /*----Set RF_ENV enable----*/ + PHY_SetBBReg(Adapter, pPhyReg->rfintfe, bRFSI_RFENV << 16, 0x1); + udelay(1);/* PlatformStallExecution(1); */ - /*----Set RF_ENV output high----*/ - PHY_SetBBReg(Adapter, pPhyReg->rfintfo, bRFSI_RFENV, 0x1); - udelay(1);/* PlatformStallExecution(1); */ + /*----Set RF_ENV output high----*/ + PHY_SetBBReg(Adapter, pPhyReg->rfintfo, bRFSI_RFENV, 0x1); + udelay(1);/* PlatformStallExecution(1); */ - /* Set bit number of Address and Data for RF register */ - PHY_SetBBReg(Adapter, pPhyReg->rfHSSIPara2, b3WireAddressLength, 0x0); /* Set 1 to 4 bits for 8255 */ - udelay(1);/* PlatformStallExecution(1); */ + /* Set bit number of Address and Data for RF register */ + PHY_SetBBReg(Adapter, pPhyReg->rfHSSIPara2, b3WireAddressLength, 0x0); /* Set 1 to 4 bits for 8255 */ + udelay(1);/* PlatformStallExecution(1); */ - PHY_SetBBReg(Adapter, pPhyReg->rfHSSIPara2, b3WireDataLength, 0x0); /* Set 0 to 12 bits for 8255 */ - udelay(1);/* PlatformStallExecution(1); */ + PHY_SetBBReg(Adapter, pPhyReg->rfHSSIPara2, b3WireDataLength, 0x0); /* Set 0 to 12 bits for 8255 */ + udelay(1);/* PlatformStallExecution(1); */ - /*----Initialize RF fom connfiguration file----*/ - switch (eRFPath) { - case RF_PATH_A: - case RF_PATH_B: - ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, - CONFIG_RF_RADIO, eRFPath); - break; - } + /*----Initialize RF fom connfiguration file----*/ + switch (eRFPath) { + case RF_PATH_A: + case RF_PATH_B: + ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, + CONFIG_RF_RADIO, eRFPath); + break; + } - /*----Restore RFENV control type----*/ - switch (eRFPath) { - case RF_PATH_A: - PHY_SetBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV, u4RegValue); - break; - case RF_PATH_B: - PHY_SetBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV << 16, u4RegValue); - break; - } + /*----Restore RFENV control type----*/ + switch (eRFPath) { + case RF_PATH_A: + PHY_SetBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV, u4RegValue); + break; + case RF_PATH_B: + PHY_SetBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV << 16, u4RegValue); + break; } /* 3 ----------------------------------------------------------------- */ @@ -149,13 +146,6 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter) int PHY_RF6052_Config8723B(struct adapter *Adapter) { - struct hal_com_data *pHalData = GET_HAL_DATA(Adapter); - - /* */ - /* Initialize general global value */ - /* */ - pHalData->NumTotalRFPath = 1; - /* */ /* Config BB and RF */ /* */ diff --git a/drivers/staging/rtl8723bs/include/hal_data.h b/drivers/staging/rtl8723bs/include/hal_data.h index 78dec6e5db19..a03e32e4884c 100644 --- a/drivers/staging/rtl8723bs/include/hal_data.h +++ b/drivers/staging/rtl8723bs/include/hal_data.h @@ -187,7 +187,6 @@ struct hal_com_data { /* rf_ctrl */ u8 rf_chip; u8 PackageType; - u8 NumTotalRFPath; u8 InterfaceSel; u8 framesync; @@ -391,7 +390,6 @@ struct hal_com_data { }; #define GET_HAL_DATA(__padapter) ((struct hal_com_data *)((__padapter)->HalData)) -#define GET_HAL_RFPATH_NUM(__padapter) (((struct hal_com_data *)((__padapter)->HalData))->NumTotalRFPath) #define RT_GetInterfaceSelection(_Adapter) (GET_HAL_DATA(_Adapter)->InterfaceSel) #endif /* __HAL_DATA_H__ */