1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-29 08:27:41 +00:00

TX power control for RTL8814AU

This commit is contained in:
Sergei Makarenkov 2017-03-11 10:53:38 +03:00
parent 1183c55657
commit 568bd9eb3a
2 changed files with 15 additions and 3 deletions

View File

@ -469,6 +469,7 @@ void rtl8814_init_dm_priv(IN PADAPTER Adapter)
PHYDM_InitDebugSetting(podmpriv); PHYDM_InitDebugSetting(podmpriv);
pHalData->TxPwrInPercentage = TX_PWR_PERCENTAGE_3; pHalData->TxPwrInPercentage = TX_PWR_PERCENTAGE_3;
pHalData->CurrentTxPwrIdx = 18;
} }

View File

@ -1211,6 +1211,16 @@ PHY_SetRFPowerState8814A(
todo */ todo */
//1 5. Tx Power setting API //1 5. Tx Power setting API
VOID
phy_TxPwrAdjInPercentage(
IN PADAPTER Adapter,
OUT u8* pTxPwrIdx)
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
int txPower = *pTxPwrIdx + pHalData->CurrentTxPwrIdx - 18;
*pTxPwrIdx = txPower > RF6052_MAX_TX_PWR ? RF6052_MAX_TX_PWR : txPower;
}
VOID VOID
PHY_GetTxPowerLevel8814( PHY_GetTxPowerLevel8814(
@ -1315,6 +1325,7 @@ PHY_GetTxPowerIndex_8814A(
CCX_CellPowerLimit( pAdapter, Channel, Rate, &txPower ); CCX_CellPowerLimit( pAdapter, Channel, Rate, &txPower );
#endif #endif
#endif #endif
phy_TxPwrAdjInPercentage(pAdapter, (u8 *)&txPower);
if(txPower > MAX_POWER_INDEX) if(txPower > MAX_POWER_INDEX)
txPower = MAX_POWER_INDEX; txPower = MAX_POWER_INDEX;