qcacld-3.0: Starts rt_debug_fill_timer only when rt_debug is enabled
There is a race condition between ipa_w2i_cb and rt_debug_host_fill,
since the rt_debug_fill_timer starts by default.
Since we introduced this mainly to debug an OOM issue, it is better
to enable this dynamically only for debug purpose.
Change to start rt_debug_fill_timer only when the RT_DEBUG flag is
enabled in INI.
Change-Id: I4fef0b66ffef0b02c26217b6f9eff2b8a4a11bcd
CRs-fixed: 1089832
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index 2748ac8..cd6d8d9 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -899,8 +899,6 @@
struct hdd_ipa_priv *hdd_ipa = (struct hdd_ipa_priv *)hdd_ctx->hdd_ipa;
qdf_mutex_create(&hdd_ipa->rt_debug_lock);
- qdf_mc_timer_init(&hdd_ipa->rt_debug_fill_timer, QDF_TIMER_TYPE_SW,
- hdd_ipa_uc_rt_debug_host_fill, (void *)hdd_ctx);
hdd_ipa->rt_buf_fill_index = 0;
qdf_mem_zero(hdd_ipa->rt_bug_buffer,
sizeof(struct uc_rt_debug_info) *
@@ -911,15 +909,18 @@
hdd_ipa->ipa_rx_internel_drop_count = 0;
hdd_ipa->ipa_rx_destructor_count = 0;
- qdf_mc_timer_start(&hdd_ipa->rt_debug_fill_timer,
- HDD_IPA_UC_RT_DEBUG_FILL_INTERVAL);
-
/* Reatime debug enable on feature enable */
if (!hdd_ipa_is_rt_debugging_enabled(hdd_ctx)) {
HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO,
"%s: IPA RT debug is not enabled", __func__);
return;
}
+
+ qdf_mc_timer_init(&hdd_ipa->rt_debug_fill_timer, QDF_TIMER_TYPE_SW,
+ hdd_ipa_uc_rt_debug_host_fill, (void *)hdd_ctx);
+ qdf_mc_timer_start(&hdd_ipa->rt_debug_fill_timer,
+ HDD_IPA_UC_RT_DEBUG_FILL_INTERVAL);
+
qdf_mc_timer_init(&hdd_ipa->rt_debug_timer, QDF_TIMER_TYPE_SW,
hdd_ipa_uc_rt_debug_handler, (void *)hdd_ctx);
qdf_mc_timer_start(&hdd_ipa->rt_debug_timer,