From eb32063dcc3b3dc6121dc93f98ae14b271e0b3b4 Mon Sep 17 00:00:00 2001 From: hqu Date: Wed, 17 Jan 2018 17:25:25 +0800 Subject: [PATCH] qcacmn: Use no_of_open_sessions to check multiple beaconing sessions When start sap+sap with acs concurrently, the first sap usually choose dfs channel, the second sap will be failed to start. when check multiple beaconing sessions it only checks in_use sap for pm_conc_connection_lis which means bss started sap while it has no started sap at that time, so the second sap can't follow the first sap's dfs channel and start failed according to current code flow. Fix is to use no_of_open_sessions to check multiple beaconing sessions. CRs-Fixed: 2170567 Change-Id: Iada737dffcd826aaff3873b81355018d53485948 --- src/wlan_policy_mgr_get_set_utils.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/wlan_policy_mgr_get_set_utils.c b/src/wlan_policy_mgr_get_set_utils.c index dc2588ed8ca9..916d6291e4d6 100644 --- a/src/wlan_policy_mgr_get_set_utils.c +++ b/src/wlan_policy_mgr_get_set_utils.c @@ -2118,13 +2118,17 @@ bool policy_mgr_concurrent_open_sessions_running( bool policy_mgr_concurrent_beaconing_sessions_running( struct wlan_objmgr_psoc *psoc) { - return (policy_mgr_mode_specific_connection_count( - psoc, QDF_SAP_MODE, NULL) + - policy_mgr_mode_specific_connection_count( - psoc, QDF_P2P_GO_MODE, NULL) + - policy_mgr_mode_specific_connection_count( - psoc, QDF_IBSS_MODE, NULL) > 1) ? - true : false; + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("Invalid context"); + return false; + } + + return (pm_ctx->no_of_open_sessions[QDF_SAP_MODE] + + pm_ctx->no_of_open_sessions[QDF_P2P_GO_MODE] + + pm_ctx->no_of_open_sessions[QDF_IBSS_MODE] > 1) ? true : false; }