mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
staging: rtl8188eu: Rework function getTxPowerIndex88E()
Rename CamelCase variables and function name. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7b98485c72
commit
88cbb39026
1 changed files with 44 additions and 59 deletions
|
@ -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];
|
||||
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];
|
||||
|
||||
/* 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];
|
||||
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]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue