staging: rtl8188eu: Rework function _PHY_PathADDAOn()
authornavin patidar <navin.patidar@gmail.com>
Sun, 7 Sep 2014 11:07:52 +0000 (16:37 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Sep 2014 21:05:20 +0000 (14:05 -0700)
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 <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c
drivers/staging/rtl8188eu/include/HalPhyRf_8188e.h

index 63e4010647bb6590bf533bc6c354891b85aed7ca..24278f979ecf5121780044956f061477cb27dd23 100644 (file)
@@ -666,30 +666,22 @@ static void reload_mac_registers(struct adapter *adapt,
        usb_write32(adapt, mac_reg[i], backup[i]);
 }
 
-void
-_PHY_PathADDAOn(
-               struct adapter *adapt,
-               u32 *ADDAReg,
-               bool isPathAOn,
-               bool is2t
-       )
+static void path_adda_on(struct adapter *adapt, u32 *adda_reg,
+                        bool is_path_a_on, bool is2t)
 {
-       u32 pathOn;
+       u32 path_on;
        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) {
-               pathOn = 0x0bdb25a0;
-               phy_set_bb_reg(adapt, ADDAReg[0], bMaskDWord, 0x0b1b25a0);
+               path_on = 0x0bdb25a0;
+               phy_set_bb_reg(adapt, adda_reg[0], bMaskDWord, 0x0b1b25a0);
        } 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++)
-               phy_set_bb_reg(adapt, ADDAReg[i], bMaskDWord, pathOn);
+               phy_set_bb_reg(adapt, adda_reg[i], bMaskDWord, path_on);
 }
 
 void
@@ -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));
 
-       _PHY_PathADDAOn(adapt, ADDA_REG, true, is2t);
+       path_adda_on(adapt, ADDA_REG, true, is2t);
        if (t == 0)
                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,
                _PHY_PathAStandBy(adapt);
 
                /*  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++) {
                        PathBOK = phy_path_b_iqk(adapt);
index 67b347100c41b625d1ae7db4756a99f92f330bea..efd1feaa40961c3feed0d679bc0bf12d3bad9488 100644 (file)
@@ -46,9 +46,6 @@ void PHY_LCCalibrate_8188E(struct adapter *pAdapter);
 /*  AP calibrate */
 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,
                                u32 *MACBackup);