From 98c04a2dd3f34698b3cb3807dd3e81d813571f4e Mon Sep 17 00:00:00 2001 From: navin patidar Date: Sun, 7 Sep 2014 16:37:48 +0530 Subject: [PATCH] staging: rtl8188eu: Rework function _PHY_SaveADDARegisters() Rename CamelCase local variables and function name. Remove unnecessary debugging messages and local variables. Declare it as a static function. Signed-off-by: navin patidar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c | 16 +++++++--------- .../staging/rtl8188eu/include/HalPhyRf_8188e.h | 3 --- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c index d04ac50c8c81..732014dc4d92 100644 --- a/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c +++ b/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c @@ -625,15 +625,13 @@ static void pathb_fill_iqk(struct adapter *adapt, bool iqkok, s32 result[][8], } } -void _PHY_SaveADDARegisters(struct adapter *adapt, u32 *ADDAReg, u32 *ADDABackup, u32 RegisterNum) +static void save_adda_registers(struct adapter *adapt, u32 *addareg, + u32 *backup, u32 register_num) { 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, ("Save ADDA parameters.\n")); - for (i = 0; i < RegisterNum; i++) { - ADDABackup[i] = phy_query_bb_reg(adapt, ADDAReg[i], bMaskDWord); + for (i = 0; i < register_num; i++) { + backup[i] = phy_query_bb_reg(adapt, addareg[i], bMaskDWord); } } @@ -898,9 +896,9 @@ 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)); /* Save ADDA parameters, turn Path A ADDA on */ - _PHY_SaveADDARegisters(adapt, ADDA_REG, dm_odm->RFCalibrateInfo.ADDA_backup, IQK_ADDA_REG_NUM); + save_adda_registers(adapt, ADDA_REG, dm_odm->RFCalibrateInfo.ADDA_backup, IQK_ADDA_REG_NUM); _PHY_SaveMACRegisters(adapt, IQK_MAC_REG, dm_odm->RFCalibrateInfo.IQK_MAC_backup); - _PHY_SaveADDARegisters(adapt, IQK_BB_REG_92C, dm_odm->RFCalibrateInfo.IQK_BB_backup, IQK_BB_REG_NUM); + save_adda_registers(adapt, IQK_BB_REG_92C, dm_odm->RFCalibrateInfo.IQK_BB_backup, IQK_BB_REG_NUM); } ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("IQ Calibration for %s for %d times\n", (is2t ? "2T2R" : "1T1R"), t)); @@ -1222,7 +1220,7 @@ void PHY_IQCalibrate_8188E(struct adapter *adapt, bool recovery) } ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("\nIQK OK Indexforchannel %d.\n", Indexforchannel)); - _PHY_SaveADDARegisters(adapt, IQK_BB_REG_92C, dm_odm->RFCalibrateInfo.IQK_BB_backup_recover, 9); + save_adda_registers(adapt, IQK_BB_REG_92C, dm_odm->RFCalibrateInfo.IQK_BB_backup_recover, 9); ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("IQK finished\n")); } diff --git a/drivers/staging/rtl8188eu/include/HalPhyRf_8188e.h b/drivers/staging/rtl8188eu/include/HalPhyRf_8188e.h index 96aebf002879..67b347100c41 100644 --- a/drivers/staging/rtl8188eu/include/HalPhyRf_8188e.h +++ b/drivers/staging/rtl8188eu/include/HalPhyRf_8188e.h @@ -46,9 +46,6 @@ void PHY_LCCalibrate_8188E(struct adapter *pAdapter); /* AP calibrate */ void PHY_DigitalPredistortion_8188E(struct adapter *pAdapter); -void _PHY_SaveADDARegisters(struct adapter *pAdapter, u32 *ADDAReg, - u32 *ADDABackup, u32 RegisterNum); - void _PHY_PathADDAOn(struct adapter *pAdapter, u32 *ADDAReg, bool isPathAOn, bool is2T); -- 2.20.1