diff --git a/configs/genoa.usb.perf_defconfig b/configs/genoa.usb.perf_defconfig index 9959eae9d0d4..2fc9780f327b 100644 --- a/configs/genoa.usb.perf_defconfig +++ b/configs/genoa.usb.perf_defconfig @@ -28,6 +28,11 @@ CONFIG_WLAN_FEATURE_P2P_DEBUG := n CONFIG_WLAN_LOG_ENTER := n CONFIG_WLAN_LOG_EXIT := n +ifeq ($(CONFIG_DEBUG_FS), y) + CONFIG_WLAN_DEBUGFS := y + CONFIG_WLAN_POWER_DEBUGFS := y +endif + # Features gets enabled on slub debug CONFIG_WLAN_DEBUG_CRASH_INJECT := n CONFIG_FEATURE_MEMDUMP_ENABLE := n diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c index 8481221dd933..14e0174e679c 100644 --- a/core/dp/htt/htt.c +++ b/core/dp/htt/htt.c @@ -38,6 +38,7 @@ #include #include "hif.h" #include +#include #define HTT_HTC_PKT_POOL_INIT_SIZE 100 /* enough for a large A-MPDU */ @@ -570,6 +571,13 @@ htt_attach(struct htt_pdev_t *pdev, int desc_pool_size) ol_tx_target_credit_update( pdev->txrx_pdev, ol_cfg_target_tx_credit( pdev->ctrl_pdev)); + DPTRACE(qdf_dp_trace_credit_record(QDF_HTT_ATTACH, + QDF_CREDIT_INC, + ol_cfg_target_tx_credit(pdev->ctrl_pdev), + qdf_atomic_read(&pdev->txrx_pdev->target_tx_credit), + qdf_atomic_read(&pdev->txrx_pdev->txq_grps[0].credit), + qdf_atomic_read(&pdev->txrx_pdev->txq_grps[1].credit))); + } else { enum wlan_frm_fmt frm_type; diff --git a/core/dp/htt/htt_t2h.c b/core/dp/htt/htt_t2h.c index 10b325d431e2..e9d6c7b75b93 100644 --- a/core/dp/htt/htt_t2h.c +++ b/core/dp/htt/htt_t2h.c @@ -484,6 +484,11 @@ static void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg, pdev->txrx_pdev, compl_msg->desc_id, 1, 0, compl_msg->status); + DPTRACE(qdf_dp_trace_credit_record(QDF_TX_COMP, QDF_CREDIT_INC, + 1, qdf_atomic_read(&pdev->txrx_pdev->target_tx_credit), + qdf_atomic_read(&pdev->txrx_pdev->txq_grps[0].credit), + qdf_atomic_read(&pdev->txrx_pdev->txq_grps[1].credit))); + if (!ol_tx_get_is_mgmt_over_wmi_enabled()) { ol_tx_single_completion_handler(pdev->txrx_pdev, compl_msg->status, @@ -553,6 +558,13 @@ static void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg, htt_credit_delta = htt_t2h_adjust_bus_target_delta(pdev, htt_credit_delta); htt_tx_group_credit_process(pdev, msg_word); + DPTRACE(qdf_dp_trace_credit_record(QDF_TX_CREDIT_UPDATE, + QDF_CREDIT_INC, htt_credit_delta, + qdf_atomic_read(&pdev->txrx_pdev->target_tx_credit) + + htt_credit_delta, + qdf_atomic_read(&pdev->txrx_pdev->txq_grps[0].credit), + qdf_atomic_read(&pdev->txrx_pdev->txq_grps[1].credit))); + ol_tx_credit_completion_handler(pdev->txrx_pdev, htt_credit_delta); break; diff --git a/core/dp/txrx/ol_tx_sched.c b/core/dp/txrx/ol_tx_sched.c index c04be2340958..ec2742c79c35 100644 --- a/core/dp/txrx/ol_tx_sched.c +++ b/core/dp/txrx/ol_tx_sched.c @@ -1526,6 +1526,13 @@ ol_tx_sched(struct ol_txrx_pdev_t *pdev) qdf_atomic_read(&pdev->target_tx_credit) - num_credits); #endif + DPTRACE(qdf_dp_trace_credit_record(QDF_TX_SCHED, + QDF_CREDIT_DEC, num_credits, + qdf_atomic_read(&pdev->target_tx_credit) - + num_credits, + qdf_atomic_read(&pdev->txq_grps[0].credit), + qdf_atomic_read(&pdev->txq_grps[1].credit))); + qdf_atomic_add(-num_credits, &pdev->target_tx_credit); } qdf_spin_unlock_bh(&pdev->tx_queue_spinlock); diff --git a/core/dp/txrx/ol_tx_send.c b/core/dp/txrx/ol_tx_send.c index bac4798aad7f..3ae328107c3e 100644 --- a/core/dp/txrx/ol_tx_send.c +++ b/core/dp/txrx/ol_tx_send.c @@ -400,7 +400,14 @@ int ol_tx_deduct_one_credit(struct ol_txrx_pdev_t *pdev) if (!pdev->cfg.default_tx_comp_req) { ol_tx_target_credit_update(pdev, -1); ol_tx_deduct_one_any_group_credit(pdev); + + DPTRACE(qdf_dp_trace_credit_record(QDF_TX_HTT_MSG, + QDF_CREDIT_DEC, 1, + qdf_atomic_read(&pdev->target_tx_credit), + qdf_atomic_read(&pdev->txq_grps[0].credit), + qdf_atomic_read(&pdev->txq_grps[1].credit))); } + return 0; } #endif /* CONFIG_HL_SUPPORT */ diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index d2be899329a9..75879da9534d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -12488,7 +12488,7 @@ void hdd_dp_trace_init(struct hdd_config *config) uint8_t thresh = DP_TRACE_CONFIG_DEFAULT_THRESH; uint16_t thresh_time_limit = DP_TRACE_CONFIG_DEFAULT_THRESH_TIME_LIMIT; uint8_t verbosity = DP_TRACE_CONFIG_DEFAULT_VERBOSTY; - uint8_t proto_bitmap = DP_TRACE_CONFIG_DEFAULT_BITMAP; + uint32_t proto_bitmap = DP_TRACE_CONFIG_DEFAULT_BITMAP; uint8_t config_params[DP_TRACE_CONFIG_NUM_PARAMS]; uint8_t num_entries = 0; uint32_t bw_compute_interval; @@ -12803,6 +12803,8 @@ int hdd_wlan_startup(struct hdd_context *hdd_ctx) hdd_driver_memdump_init(); hdd_bus_bandwidth_init(hdd_ctx); + hdd_dp_trace_init(hdd_ctx->config); + errno = hdd_wlan_start_modules(hdd_ctx, false); if (errno) { hdd_err("Failed to start modules; errno:%d", errno); @@ -12826,8 +12828,6 @@ int hdd_wlan_startup(struct hdd_context *hdd_ctx) goto stop_modules; } - hdd_dp_trace_init(hdd_ctx->config); - errno = hdd_initialize_mac_address(hdd_ctx); if (errno) { hdd_err("MAC initializtion failed: %d", errno);