From 7f6bdd3b9db40310d08fd0c7935659fdbfc6287e Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Fri, 29 Jun 2018 10:39:30 +0800 Subject: [PATCH] qcacmn: Move SAP to safe channel after STA disconnection Standalone SAP is not allowed on lte-coex channel if STA+SAP SCC enabled on lte-coex channel. So move the SAP to a safe channel once STA disconnected. Change-Id: I00682f5bbb3da772e3e26ccd8d08183be28cc9ec CRs-Fixed: 2265263 --- inc/wlan_policy_mgr_api.h | 2 +- src/wlan_policy_mgr_action.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/inc/wlan_policy_mgr_api.h b/inc/wlan_policy_mgr_api.h index 6256fe7fc6cf..e48ff10ded08 100644 --- a/inc/wlan_policy_mgr_api.h +++ b/inc/wlan_policy_mgr_api.h @@ -2445,7 +2445,7 @@ void policy_mgr_update_user_config_sap_chan( * * Check if SAP should be moved to a non dfs channel after STA disconnection. * This API applicable only for STA+SAP SCC and ini 'sta_sap_scc_on_dfs_chan' - * is enabled. + * or 'sta_sap_scc_on_lte_coex_chan' is enabled. * * Return: true if sap restart is required, otherwise false */ diff --git a/src/wlan_policy_mgr_action.c b/src/wlan_policy_mgr_action.c index 3fa6002fd568..4a711e74bf37 100644 --- a/src/wlan_policy_mgr_action.c +++ b/src/wlan_policy_mgr_action.c @@ -853,10 +853,12 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect( policy_mgr_debug("sta_sap_scc_on_dfs_chan %u, sap_chan %u", sta_sap_scc_on_dfs_chan, sap_chan); - if (!sta_sap_scc_on_dfs_chan || - !(sap_chan && WLAN_REG_IS_5GHZ_CH(sap_chan) && - (wlan_reg_get_channel_state(pm_ctx->pdev, sap_chan) == - CHANNEL_STATE_DFS))) { + if ((!sta_sap_scc_on_dfs_chan || + !(sap_chan && WLAN_REG_IS_5GHZ_CH(sap_chan) && + (wlan_reg_get_channel_state(pm_ctx->pdev, sap_chan) == + CHANNEL_STATE_DFS))) && + (!policy_mgr_sta_sap_scc_on_lte_coex_chan(psoc) || + policy_mgr_is_safe_channel(psoc, sap_chan))) { return false; } @@ -1100,6 +1102,9 @@ void policy_mgr_check_concurrent_intf_and_restart_sap( * If STA+SAP sessions are on DFS channel and STA+SAP SCC is * enabled on DFS channel then move the SAP out of DFS channel * as soon as STA gets disconnect. + * If STA+SAP sessions are on unsafe channel and STA+SAP SCC is + * enabled on unsafe channel then move the SAP to safe channel + * as soon as STA disconnected. */ if (policy_mgr_is_sap_restart_required_after_sta_disconnect( psoc, &sap_ch)) {