From e99d08060bb3f336d2f8dc892b99be8291398546 Mon Sep 17 00:00:00 2001 From: Lincoln Tran Date: Wed, 28 Apr 2021 15:32:55 -0700 Subject: [PATCH] qcacld-3.0: Set AP power mode back to LPI When starting SAP, the AP power type is decided based on certain conditions. After turning off the SAP, the power type is no longer valid, so reset it back to default. Change-Id: I472da2e02b58017dab4855fc83cd4e15b24b7b08 CRs-fixed: 2934622 --- .../policy_mgr/src/wlan_policy_mgr_get_set_utils.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index 5bf580fd7a70..3b0f7df8ffa3 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c @@ -1971,6 +1971,14 @@ QDF_STATUS policy_mgr_decr_active_session(struct wlan_objmgr_psoc *psoc, pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency(false); }; + if ((mode == QDF_SAP_MODE || mode == QDF_P2P_GO_MODE) && + (policy_mgr_mode_specific_connection_count(psoc, PM_SAP_MODE, + NULL) == 0) && + (policy_mgr_mode_specific_connection_count(psoc, PM_P2P_GO_MODE, + NULL) == 0)) + wlan_reg_set_ap_pwr_and_update_chan_list(pm_ctx->pdev, + REG_INDOOR_AP); + /* Disable RPS if SAP interface has come up */ if (policy_mgr_mode_specific_connection_count(psoc, PM_SAP_MODE, NULL) == 0) {