From 137b8a4171c661c845bdcfcb520633899b9be129 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Tue, 3 Jul 2018 10:13:15 +0200 Subject: [PATCH] fix txpwr-by-rate logging and value when txpower-override is enabled --- hal/hal_com_phycfg.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hal/hal_com_phycfg.c b/hal/hal_com_phycfg.c index 4466e3a..5c3e95c 100644 --- a/hal/hal_com_phycfg.c +++ b/hal/hal_com_phycfg.c @@ -2666,13 +2666,14 @@ PHY_SetTxPowerByRate( return; } - if (pAdapter->registrypriv.RegTxPowerIndexOverride) - Value = pAdapter->registrypriv.RegTxPowerIndexOverride; + /* Disable offset when override is enabled jic, even + though its value should not be used in that case anyway. */ + if (pAdapter->registrypriv.RegTxPowerIndexOverride) Value = 0; if (DBG_TX_POWER_IDX) - RTW_INFO( "TXPWR: by-rate [%sG][%c] Rate:%s = %d\n", + RTW_INFO( "TXPWR: by-rate-offset [%sG][%c] Rate:%s = %d\n", (Band == BAND_ON_2_4G) ? "2.4" : "5", rf_path_char(RFPath), - MGN_RATE_STR(rateIndex), Value ); + MGN_RATE_STR(Rate), Value ); pHalData->TxPwrByRateOffset[Band][RFPath][rateIndex] = Value; }