Commit 4ef1a32d authored by navin patidar's avatar navin patidar Committed by Greg Kroah-Hartman

staging: rtl8188eu: Rework function _PHY_PathADDAOn()

Rename CamelCase local variables and function name.
Remove unnecessary debugging messages and local variables.
Declare it as a static function.
Signed-off-by: default avatarnavin patidar <navin.patidar@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 33ce0980
...@@ -666,30 +666,22 @@ static void reload_mac_registers(struct adapter *adapt, ...@@ -666,30 +666,22 @@ static void reload_mac_registers(struct adapter *adapt,
usb_write32(adapt, mac_reg[i], backup[i]); usb_write32(adapt, mac_reg[i], backup[i]);
} }
void static void path_adda_on(struct adapter *adapt, u32 *adda_reg,
_PHY_PathADDAOn( bool is_path_a_on, bool is2t)
struct adapter *adapt,
u32 *ADDAReg,
bool isPathAOn,
bool is2t
)
{ {
u32 pathOn; u32 path_on;
u32 i; u32 i;
struct hal_data_8188e *pHalData = GET_HAL_DATA(adapt);
struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("ADDA ON.\n"));
pathOn = isPathAOn ? 0x04db25a4 : 0x0b1b25a4; path_on = is_path_a_on ? 0x04db25a4 : 0x0b1b25a4;
if (!is2t) { if (!is2t) {
pathOn = 0x0bdb25a0; path_on = 0x0bdb25a0;
phy_set_bb_reg(adapt, ADDAReg[0], bMaskDWord, 0x0b1b25a0); phy_set_bb_reg(adapt, adda_reg[0], bMaskDWord, 0x0b1b25a0);
} else { } else {
phy_set_bb_reg(adapt, ADDAReg[0], bMaskDWord, pathOn); phy_set_bb_reg(adapt, adda_reg[0], bMaskDWord, path_on);
} }
for (i = 1; i < IQK_ADDA_REG_NUM; i++) for (i = 1; i < IQK_ADDA_REG_NUM; i++)
phy_set_bb_reg(adapt, ADDAReg[i], bMaskDWord, pathOn); phy_set_bb_reg(adapt, adda_reg[i], bMaskDWord, path_on);
} }
void void
...@@ -888,7 +880,7 @@ static void phy_IQCalibrate_8188E(struct adapter *adapt, s32 result[][8], u8 t, ...@@ -888,7 +880,7 @@ static void phy_IQCalibrate_8188E(struct adapter *adapt, s32 result[][8], u8 t,
} }
ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("IQ Calibration for %s for %d times\n", (is2t ? "2T2R" : "1T1R"), t)); ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("IQ Calibration for %s for %d times\n", (is2t ? "2T2R" : "1T1R"), t));
_PHY_PathADDAOn(adapt, ADDA_REG, true, is2t); path_adda_on(adapt, ADDA_REG, true, is2t);
if (t == 0) if (t == 0)
dm_odm->RFCalibrateInfo.bRfPiEnable = (u8)phy_query_bb_reg(adapt, rFPGA0_XA_HSSIParameter1, BIT(8)); dm_odm->RFCalibrateInfo.bRfPiEnable = (u8)phy_query_bb_reg(adapt, rFPGA0_XA_HSSIParameter1, BIT(8));
...@@ -959,7 +951,7 @@ static void phy_IQCalibrate_8188E(struct adapter *adapt, s32 result[][8], u8 t, ...@@ -959,7 +951,7 @@ static void phy_IQCalibrate_8188E(struct adapter *adapt, s32 result[][8], u8 t,
_PHY_PathAStandBy(adapt); _PHY_PathAStandBy(adapt);
/* Turn Path B ADDA on */ /* Turn Path B ADDA on */
_PHY_PathADDAOn(adapt, ADDA_REG, false, is2t); path_adda_on(adapt, ADDA_REG, false, is2t);
for (i = 0; i < retryCount; i++) { for (i = 0; i < retryCount; i++) {
PathBOK = phy_path_b_iqk(adapt); PathBOK = phy_path_b_iqk(adapt);
......
...@@ -46,9 +46,6 @@ void PHY_LCCalibrate_8188E(struct adapter *pAdapter); ...@@ -46,9 +46,6 @@ void PHY_LCCalibrate_8188E(struct adapter *pAdapter);
/* AP calibrate */ /* AP calibrate */
void PHY_DigitalPredistortion_8188E(struct adapter *pAdapter); void PHY_DigitalPredistortion_8188E(struct adapter *pAdapter);
void _PHY_PathADDAOn(struct adapter *pAdapter, u32 *ADDAReg,
bool isPathAOn, bool is2T);
void _PHY_MACSettingCalibration(struct adapter *pAdapter, u32 *MACReg, void _PHY_MACSettingCalibration(struct adapter *pAdapter, u32 *MACReg,
u32 *MACBackup); u32 *MACBackup);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment