From 40ac5fb27d5104ff9a2c2b3d42b539bdc76376f6 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Wed, 22 May 2019 00:00:34 +0200 Subject: [PATCH] TX power control for 8814 --- hal/rtl8814a/rtl8814a_dm.c | 2 +- hal/rtl8814a/rtl8814a_phycfg.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hal/rtl8814a/rtl8814a_dm.c b/hal/rtl8814a/rtl8814a_dm.c index 61a77d1..aef425e 100644 --- a/hal/rtl8814a/rtl8814a_dm.c +++ b/hal/rtl8814a/rtl8814a_dm.c @@ -334,7 +334,7 @@ void rtl8814_init_dm_priv(IN PADAPTER Adapter) #endif Init_ODM_ComInfo_8814(Adapter); - odm_init_all_timers(podmpriv ); + odm_init_all_timers(podmpriv ); //PHYDM_InitDebugSetting(podmpriv); pHalData->CurrentTxPwrIdx = 18; diff --git a/hal/rtl8814a/rtl8814a_phycfg.c b/hal/rtl8814a/rtl8814a_phycfg.c index fa1cd06..30d096a 100644 --- a/hal/rtl8814a/rtl8814a_phycfg.c +++ b/hal/rtl8814a/rtl8814a_phycfg.c @@ -1094,7 +1094,7 @@ PHY_SetRFPowerState8814A( #elif (DEV_BUS_TYPE == RT_SDIO_INTERFACE) bResult = phy_SetRFPowerState_8814Sdio(Adapter, eRFPowerState); #endif - + RT_TRACE(COMP_RF, DBG_LOUD, ("<--------- PHY_SetRFPowerState8814(): bResult(%d)\n", bResult)); return bResult; @@ -1230,17 +1230,18 @@ PHY_GetTxPowerIndex8814A( tic->ebias = 0; } + phy_TxPwrAdjInPercentage(pAdapter, (u8 *)&txPower); if(txPower > MAX_POWER_INDEX) txPower = MAX_POWER_INDEX; - //if (Adapter->registrypriv.mp_mode==0 && + //if (Adapter->registrypriv.mp_mode==0 && //(pHalData->bautoload_fail_flag || pHalData->EfuseMap[EFUSE_INIT_MAP][EEPROM_TX_PWR_INX_JAGUAR] == 0xFF)) //txPower = 0x12; /*RTW_INFO("Final Tx Power(RF-%c, Channel: %d) = %d(0x%X)\n", ((RFPath==0)?'A':(RFPath==1)?'B':(RFPath==2)?'C':'D'), Channel, txPower, txPower);*/ - return (u8) txPower; + return (u8) txPower; } @@ -1248,7 +1249,7 @@ VOID PHY_SetTxPowerIndex_8814A( IN PADAPTER Adapter, IN u32 PowerIndex, - IN enum rf_path RFPath, + IN enum rf_path RFPath, IN u8 Rate ) {