From 067cd3e3ebb554f4e5957f38bcf5af060f6b00d0 Mon Sep 17 00:00:00 2001 From: Yeshwanth Sriram Guntuka Date: Thu, 14 Dec 2017 17:56:04 +0530 Subject: [PATCH] qcacmn: Set passive dwell time Set passive dwell time to 28msecs for active scan when bt a2dp is enabled and hw is not dbs capable and when sta is connected on 2G band. Change-Id: I44f2e3d98f2d7ddc52e4902ba989131c256da4ef CRs-Fixed: 2160963 --- inc/wlan_policy_mgr_api.h | 7 +++++++ src/wlan_policy_mgr_get_set_utils.c | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/inc/wlan_policy_mgr_api.h b/inc/wlan_policy_mgr_api.h index 7347880dce2a..f9160f93003a 100644 --- a/inc/wlan_policy_mgr_api.h +++ b/inc/wlan_policy_mgr_api.h @@ -2198,4 +2198,11 @@ void policy_mgr_set_weight_of_dfs_passive_channels_to_zero( */ bool policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan( struct wlan_objmgr_psoc *psoc); +/** + * policy_mgr_is_sta_connected_2g() - check if sta connected in 2g + * @psoc: pointer to soc + * + * Return: true if sta is connected in 2g else false + */ +bool policy_mgr_is_sta_connected_2g(struct wlan_objmgr_psoc *psoc); #endif /* __WLAN_POLICY_MGR_API_H */ diff --git a/src/wlan_policy_mgr_get_set_utils.c b/src/wlan_policy_mgr_get_set_utils.c index 50d8a3f6a4b9..e5ac3c384e39 100644 --- a/src/wlan_policy_mgr_get_set_utils.c +++ b/src/wlan_policy_mgr_get_set_utils.c @@ -2740,3 +2740,27 @@ bool policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan( return status; } + +bool policy_mgr_is_sta_connected_2g(struct wlan_objmgr_psoc *psoc) +{ + struct policy_mgr_psoc_priv_obj *pm_ctx; + uint32_t conn_index; + bool ret = false; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("Invalid Context"); + return ret; + } + qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock); + for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS; + conn_index++) { + if (pm_conc_connection_list[conn_index].mode == PM_STA_MODE && + pm_conc_connection_list[conn_index].chan <= 14 && + pm_conc_connection_list[conn_index].in_use) + ret = true; + } + qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); + + return ret; +}