diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 9fc7a1de21f3..e3e339945772 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1981,6 +1981,9 @@ void hdd_bus_bw_cancel_work(struct hdd_context *hdd_ctx); * Return: None. */ void hdd_send_wlan_tp_ind(struct hdd_context *hdd_ctx); + +#define GET_BW_COMPUTE_INTV(config) ((config)->busBandwidthComputeInterval) + #else static inline @@ -2023,6 +2026,9 @@ static inline void hdd_send_wlan_tp_ind(struct hdd_context *hdd_ctx) { } + +#define GET_BW_COMPUTE_INTV(config) 0 + #endif int hdd_qdf_trace_enable(QDF_MODULE_ID module_id, uint32_t bitmask); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 7cb87ecdb906..d9971dd9be93 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9793,14 +9793,15 @@ void hdd_dp_trace_init(struct hdd_config *config) uint8_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; hdd_string_to_u8_array(config->dp_trace_config, config_params, &num_entries, sizeof(config_params)); /* calculating, num bw timer intervals in a second (1000ms) */ - if (config->busBandwidthComputeInterval) - thresh_time_limit = - (1000 / config->busBandwidthComputeInterval); + bw_compute_interval = GET_BW_COMPUTE_INTV(config); + if (bw_compute_interval) + thresh_time_limit = 1000 / bw_compute_interval; else hdd_err("busBandwidthComputeInterval is 0, using defaults");