staging: rtl8188eu: Rework function getTxPowerIndex88E()
authornavin patidar <navin.patidar@gmail.com>
Sun, 31 Aug 2014 06:44:24 +0000 (12:14 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 Aug 2014 19:57:41 +0000 (12:57 -0700)
Rename CamelCase variables and function name.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c

index 83cd19de4ff494e0e67c99f1006c54eeed67f3af..f4df9efe07c747e429bc48a980ad03bde037bfb7 100644 (file)
@@ -150,78 +150,63 @@ void phy_set_rf_reg(struct adapter *adapt, enum rf_radio_path rf_path,
        rf_serial_write(adapt, rf_path, reg_addr, data);
 }
 
-static void getTxPowerIndex88E(struct adapter *Adapter, u8 channel, u8 *cckPowerLevel,
-                              u8 *ofdmPowerLevel, u8 *BW20PowerLevel,
-                              u8 *BW40PowerLevel)
+static void get_tx_power_index(struct adapter *adapt, u8 channel, u8 *cck_pwr,
+                              u8 *ofdm_pwr, u8 *bw20_pwr, u8 *bw40_pwr)
 {
-       struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
+       struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt);
        u8 index = (channel - 1);
        u8 TxCount = 0, path_nums;
 
-       if ((RF_1T2R == pHalData->rf_type) || (RF_1T1R == pHalData->rf_type))
+       if ((RF_1T2R == hal_data->rf_type) || (RF_1T1R == hal_data->rf_type))
                path_nums = 1;
        else
                path_nums = 2;
 
        for (TxCount = 0; TxCount < path_nums; TxCount++) {
                if (TxCount == RF_PATH_A) {
-                       /*  1. CCK */
-                       cckPowerLevel[TxCount]  = pHalData->Index24G_CCK_Base[TxCount][index];
-                       /* 2. OFDM */
-                       ofdmPowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index]+
-                               pHalData->OFDM_24G_Diff[TxCount][RF_PATH_A];
-                       /*  1. BW20 */
-                       BW20PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index]+
-                               pHalData->BW20_24G_Diff[TxCount][RF_PATH_A];
-                       /* 2. BW40 */
-                       BW40PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[TxCount][index];
+                       cck_pwr[TxCount] = hal_data->Index24G_CCK_Base[TxCount][index];
+                       ofdm_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index]+
+                                           hal_data->OFDM_24G_Diff[TxCount][RF_PATH_A];
+
+                       bw20_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index]+
+                                           hal_data->BW20_24G_Diff[TxCount][RF_PATH_A];
+                       bw40_pwr[TxCount] = hal_data->Index24G_BW40_Base[TxCount][index];
                } else if (TxCount == RF_PATH_B) {
-                       /*  1. CCK */
-                       cckPowerLevel[TxCount]  = pHalData->Index24G_CCK_Base[TxCount][index];
-                       /* 2. OFDM */
-                       ofdmPowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index]+
-                       pHalData->BW20_24G_Diff[RF_PATH_A][index]+
-                       pHalData->BW20_24G_Diff[TxCount][index];
-                       /*  1. BW20 */
-                       BW20PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index]+
-                       pHalData->BW20_24G_Diff[TxCount][RF_PATH_A]+
-                       pHalData->BW20_24G_Diff[TxCount][index];
-                       /* 2. BW40 */
-                       BW40PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[TxCount][index];
+                       cck_pwr[TxCount] = hal_data->Index24G_CCK_Base[TxCount][index];
+                       ofdm_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index]+
+                       hal_data->BW20_24G_Diff[RF_PATH_A][index]+
+                       hal_data->BW20_24G_Diff[TxCount][index];
+
+                       bw20_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index]+
+                       hal_data->BW20_24G_Diff[TxCount][RF_PATH_A]+
+                       hal_data->BW20_24G_Diff[TxCount][index];
+                       bw40_pwr[TxCount] = hal_data->Index24G_BW40_Base[TxCount][index];
                } else if (TxCount == RF_PATH_C) {
-                       /*  1. CCK */
-                       cckPowerLevel[TxCount]  = pHalData->Index24G_CCK_Base[TxCount][index];
-                       /* 2. OFDM */
-                       ofdmPowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index]+
-                       pHalData->BW20_24G_Diff[RF_PATH_A][index]+
-                       pHalData->BW20_24G_Diff[RF_PATH_B][index]+
-                       pHalData->BW20_24G_Diff[TxCount][index];
-                       /*  1. BW20 */
-                       BW20PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index]+
-                       pHalData->BW20_24G_Diff[RF_PATH_A][index]+
-                       pHalData->BW20_24G_Diff[RF_PATH_B][index]+
-                       pHalData->BW20_24G_Diff[TxCount][index];
-                       /* 2. BW40 */
-                       BW40PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[TxCount][index];
+                       cck_pwr[TxCount] = hal_data->Index24G_CCK_Base[TxCount][index];
+                       ofdm_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index]+
+                       hal_data->BW20_24G_Diff[RF_PATH_A][index]+
+                       hal_data->BW20_24G_Diff[RF_PATH_B][index]+
+                       hal_data->BW20_24G_Diff[TxCount][index];
+
+                       bw20_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index]+
+                       hal_data->BW20_24G_Diff[RF_PATH_A][index]+
+                       hal_data->BW20_24G_Diff[RF_PATH_B][index]+
+                       hal_data->BW20_24G_Diff[TxCount][index];
+                       bw40_pwr[TxCount] = hal_data->Index24G_BW40_Base[TxCount][index];
                } else if (TxCount == RF_PATH_D) {
-                       /*  1. CCK */
-                       cckPowerLevel[TxCount]  = pHalData->Index24G_CCK_Base[TxCount][index];
-                       /* 2. OFDM */
-                       ofdmPowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index]+
-                       pHalData->BW20_24G_Diff[RF_PATH_A][index]+
-                       pHalData->BW20_24G_Diff[RF_PATH_B][index]+
-                       pHalData->BW20_24G_Diff[RF_PATH_C][index]+
-                       pHalData->BW20_24G_Diff[TxCount][index];
-
-                       /*  1. BW20 */
-                       BW20PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index]+
-                       pHalData->BW20_24G_Diff[RF_PATH_A][index]+
-                       pHalData->BW20_24G_Diff[RF_PATH_B][index]+
-                       pHalData->BW20_24G_Diff[RF_PATH_C][index]+
-                       pHalData->BW20_24G_Diff[TxCount][index];
-
-                       /* 2. BW40 */
-                       BW40PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[TxCount][index];
+                       cck_pwr[TxCount] = hal_data->Index24G_CCK_Base[TxCount][index];
+                       ofdm_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index]+
+                       hal_data->BW20_24G_Diff[RF_PATH_A][index]+
+                       hal_data->BW20_24G_Diff[RF_PATH_B][index]+
+                       hal_data->BW20_24G_Diff[RF_PATH_C][index]+
+                       hal_data->BW20_24G_Diff[TxCount][index];
+
+                       bw20_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index]+
+                       hal_data->BW20_24G_Diff[RF_PATH_A][index]+
+                       hal_data->BW20_24G_Diff[RF_PATH_B][index]+
+                       hal_data->BW20_24G_Diff[RF_PATH_C][index]+
+                       hal_data->BW20_24G_Diff[TxCount][index];
+                       bw40_pwr[TxCount] = hal_data->Index24G_BW40_Base[TxCount][index];
                }
        }
 }
@@ -265,7 +250,7 @@ PHY_SetTxPowerLevel8188E(
        u8 BW20PowerLevel[MAX_TX_COUNT] = {0};
        u8 BW40PowerLevel[MAX_TX_COUNT] = {0};
 
-       getTxPowerIndex88E(Adapter, channel, &cckPowerLevel[0], &ofdmPowerLevel[0], &BW20PowerLevel[0], &BW40PowerLevel[0]);
+       get_tx_power_index(Adapter, channel, &cckPowerLevel[0], &ofdmPowerLevel[0], &BW20PowerLevel[0], &BW40PowerLevel[0]);
 
        phy_PowerIndexCheck88E(Adapter, channel, &cckPowerLevel[0], &ofdmPowerLevel[0], &BW20PowerLevel[0], &BW40PowerLevel[0]);
 
This page took 0.03673 seconds and 5 git commands to generate.