From d906d8bc70f26d84fd610c058c065ea81dbe083f Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Fri, 25 Jun 2021 06:10:40 +0800 Subject: [PATCH] qcacld-3.0: Enable wakelock for enhanced CFR capture There is potential risk when starting CFR and resume happens at same time. Wake lock is added to CFR component, and this change enables wake lock for enhanced CFR. Change-Id: I1ebe8c11fad66b66adcad0b551756abf2c010cde CRs-Fixed: 2977699 --- Kbuild | 1 + core/hdd/src/wlan_hdd_cfr.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Kbuild b/Kbuild index 49d89737da99..9a91164f5b62 100644 --- a/Kbuild +++ b/Kbuild @@ -2629,6 +2629,7 @@ cppflags-$(CONFIG_HDD_INIT_WITH_RTNL_LOCK) += -DCONFIG_HDD_INIT_WITH_RTNL_LOCK cppflags-$(CONFIG_WLAN_CONV_SPECTRAL_ENABLE) += -DWLAN_CONV_SPECTRAL_ENABLE cppflags-$(CONFIG_WLAN_CFR_ENABLE) += -DWLAN_CFR_ENABLE cppflags-$(CONFIG_WLAN_ENH_CFR_ENABLE) += -DWLAN_ENH_CFR_ENABLE +cppflags-$(CONFIG_WLAN_ENH_CFR_ENABLE) += -DWLAN_CFR_PM cppflags-$(CONFIG_WLAN_CFR_ENABLE) += -DCFR_USE_FIXED_FOLDER cppflags-$(CONFIG_DIRECT_BUF_RX_ENABLE) += -DDIRECT_BUF_RX_ENABLE cppflags-$(CONFIG_WMI_DBR_SUPPORT) += -DWMI_DBR_SUPPORT diff --git a/core/hdd/src/wlan_hdd_cfr.c b/core/hdd/src/wlan_hdd_cfr.c index 0027d9de360a..7d9ac2d2b981 100644 --- a/core/hdd/src/wlan_hdd_cfr.c +++ b/core/hdd/src/wlan_hdd_cfr.c @@ -501,11 +501,16 @@ wlan_cfg80211_peer_enh_cfr_capture(struct hdd_adapter *adapter, hdd_debug("cleanup rcc mode"); ucfg_cfr_set_rcc_mode(vdev, RCC_DIS_ALL_MODE, 0); } + + if (is_start_capture) + ucfg_cfr_resume(wlan_vdev_get_pdev(vdev)); + ucfg_cfr_subscribe_ppdu_desc(wlan_vdev_get_pdev(vdev), is_start_capture); ucfg_cfr_committed_rcc_config(vdev); if (!is_start_capture) { ucfg_cfr_stop_indication(vdev); + ucfg_cfr_suspend(wlan_vdev_get_pdev(vdev)); hdd_debug("stop indication done"); }