From d0bdfd92df2bea5c5cc916a7ad1f668690ef45fb Mon Sep 17 00:00:00 2001 From: kimocoder Date: Mon, 2 Jul 2018 19:30:51 +0200 Subject: [PATCH] Enable DBG_TX_POWER_IDX and DBG_PG_TXPWR_READ, extra logging for these --- hal/hal_com_phycfg.c | 20 ++++++++++++++++---- include/autoconf.h | 5 +++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/hal/hal_com_phycfg.c b/hal/hal_com_phycfg.c index 97a8580..bbc82d4 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 */ @@ -2654,6 +2662,10 @@ PHY_SetTxPowerByRate( RTW_INFO("Invalid RateIndex %d in %s\n", rateIndex, __FUNCTION__); 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 +2705,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, @@ -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..f377706 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,7 +346,8 @@ /* #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 */ /* #define DBG_ROAMING_TEST */