From fdf8a14621798277fb378918c24103c3070ea564 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Fri, 22 Jun 2018 22:33:44 +0200 Subject: [PATCH] Enable DBG_TX_POWER_IDX and DBG_PG_TXPWR_READ, extra logging for these --- hal/hal_com_phycfg.c | 22 +++++++++++++++++----- include/autoconf.h | 5 ++++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/hal/hal_com_phycfg.c b/hal/hal_com_phycfg.c index 97a8580..ccdb569 100644 --- a/hal/hal_com_phycfg.c +++ b/hal/hal_com_phycfg.c @@ -52,6 +52,10 @@ const char *const _pg_txpwr_src_str[] = { #define DBG_PG_TXPWR_READ 0 #endif +#ifndef DBG_TX_POWER_IDX +#define DBG_TX_POWER_IDX 0 +#endif + #if DBG_PG_TXPWR_READ static void dump_pg_txpwr_info_2g(void *sel, TxPowerInfo24G *txpwr_info, u8 rfpath_num, u8 max_tx_cnt) { @@ -1358,6 +1362,10 @@ phy_SetTxPowerByRateBase( return; } + if (DBG_TX_POWER_IDX) + RTW_INFO( "TXPWR: by-rate-base [%sG][%c] RateSection:%d = %d\n", + (Band == BAND_ON_2_4G) ? "2.4" : "5", rf_path_char(RfPath), RateSection, Value ); + if (Band == BAND_ON_2_4G) pHalData->TxPwrByRateBase2_4G[RfPath][RateSection] = Value; else /* BAND_ON_5G */ @@ -2655,6 +2663,11 @@ PHY_SetTxPowerByRate( return; } + if (DBG_TX_POWER_IDX) + RTW_INFO( "TXPWR: by-rate-base [%sG][%c] Rate:%s = %d\n", + (Band == BAND_ON_2_4G) ? "2.4" : "5", rf_path_char(RFPath), + MGN_RATE_STR(rateIndex), Value ); + pHalData->TxPwrByRateOffset[Band][RFPath][rateIndex] = Value; } @@ -2693,10 +2706,6 @@ phy_set_tx_power_level_by_path( } } -#ifndef DBG_TX_POWER_IDX -#define DBG_TX_POWER_IDX 0 -#endif - VOID PHY_SetTxPowerIndexByRateArray( IN PADAPTER pAdapter, @@ -2713,7 +2722,6 @@ PHY_SetTxPowerIndexByRateArray( for (i = 0; i < RateArraySize; ++i) { #if DBG_TX_POWER_IDX struct txpwr_idx_comp tic; - powerIndex = rtw_hal_get_tx_power_index(pAdapter, RFPath, Rates[i], BandWidth, Channel, &tic); RTW_INFO("TXPWR: [%c][%s]ch:%u, %s %uT, pwr_idx:%u = %u + (%d=%d:%d) + (%d) + (%d)\n" , rf_path_char(RFPath), ch_width_str(BandWidth), Channel, MGN_RATE_STR(Rates[i]), tic.ntx_idx + 1 @@ -3500,6 +3508,10 @@ PHY_SetTxPowerIndex( IN u8 Rate ) { + /* if (DBG_TX_POWER_IDX) */ + /* RTW_INFO( "TXPWR: set-index [%c] %s pwr_idx:%u\n", */ + /* rf_path_char(RFPath), MGN_RATE_STR(Rate), PowerIndex ); */ + if (IS_HARDWARE_TYPE_8814A(pAdapter)) { #if (RTL8814A_SUPPORT == 1) PHY_SetTxPowerIndex_8814A(pAdapter, PowerIndex, RFPath, Rate); diff --git a/include/autoconf.h b/include/autoconf.h index 0304e5b..7d87711 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -323,7 +323,7 @@ /* * Debug Related Config */ -#define DBG 1 +#define DBG 1 #define CONFIG_PROC_DEBUG @@ -346,6 +346,9 @@ /* #define DBG_RX_SIGNAL_DISPLAY_PROCESSING */ /* #define DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED "jeff-ap" */ +#define DBG_TX_POWER_IDX 1 +#define DBG_PG_TXPWR_READ 1 + /* #define DBG_SHOW_MCUFWDL_BEFORE_51_ENABLE */