From a4b218d19530e5a75e71d3e9fa6c553c4b2a62b3 Mon Sep 17 00:00:00 2001 From: hqu Date: Wed, 6 May 2020 16:28:50 +0800 Subject: [PATCH] qcacmn: Reset im stats and freq ctrl params when enable dcs wlan im In the process of dcs disable delay, do restart(start/stop) SAP operation, when SAP is started, it will send dcs cmd to enable dcs wlan im again, but dcs_disable_timer is still running and disable_delay_process is still true, dcs interference detection won't work in time, after dcs_disable_timer timeout, it will set disable_delay_process to false and dcs interference detection will work again, but it will delay for some time from SAP started. Fix is to reset im stats and freq ctrl params when enable dcs wlan im. Change-Id: I5be96b65037088c2797135a2b4c685c2826b2b57 CRs-Fixed: 2676033 --- umac/dcs/core/src/wlan_dcs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/umac/dcs/core/src/wlan_dcs.c b/umac/dcs/core/src/wlan_dcs.c index 264e08c3e62c..bdc96774edae 100644 --- a/umac/dcs/core/src/wlan_dcs.c +++ b/umac/dcs/core/src/wlan_dcs.c @@ -126,6 +126,13 @@ QDF_STATUS wlan_dcs_cmd_send(struct wlan_objmgr_psoc *psoc, dcs_tx_ops = target_if_dcs_get_tx_ops(psoc); if (dcs_tx_ops->dcs_cmd_send) { + if (dcs_enable & CAP_DCS_WLANIM) { + qdf_timer_stop(&dcs_pdev_priv->dcs_disable_timer); + qdf_mem_set(&dcs_pdev_priv->dcs_im_stats, + sizeof(dcs_pdev_priv->dcs_im_stats), 0); + dcs_pdev_priv->dcs_freq_ctrl_params. + disable_delay_process = false; + } dcs_info("dcs_enable: %u, pdev_id: %u", dcs_enable, pdev_id); return dcs_tx_ops->dcs_cmd_send(psoc, pdev_id,