From 4b70998fcb494bab976dad011c8b7d41fa62bc7a Mon Sep 17 00:00:00 2001 From: Tushnim Bhattacharyya Date: Thu, 8 Jun 2017 13:59:02 -0700 Subject: [PATCH] qcacmn: Restart SAP with CSA/ECSA when gWlanMccToSccSwitchMod=3 Restart SAP with CSA/ECSA when ini variable gWlanMccToSccSwitchMod=3. Currently ini variable setting gWlanMccToSccSwitchMod=2 was causing SAP to restart with CSA. Change-Id: I9a4b68cd154fa63325d146510832c2410f2dc244 CRs-Fixed: 2058567 --- .../policy_mgr/inc/wlan_policy_mgr_api.h | 2 +- .../policy_mgr/src/wlan_policy_mgr_action.c | 28 +------------------ 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h index 40cce054c0e1..728d32eb7f7b 100644 --- a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h +++ b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h @@ -782,7 +782,7 @@ struct policy_mgr_hdd_cbacks { QDF_STATUS (*wlan_hdd_get_channel_for_sap_restart)( struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, uint8_t *channel, - uint8_t *sec_ch, bool is_restart_sap); + uint8_t *sec_ch); enum policy_mgr_con_mode (*get_mode_for_non_connected_vdev)( struct wlan_objmgr_psoc *psoc, uint8_t vdev_id); diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c index 1695fc4bff80..8990550e66b2 100644 --- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c +++ b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c @@ -599,27 +599,6 @@ static bool policy_mgr_is_restart_sap_allowed( return true; } -/** - * policy_mgr_is_sap_channel_change_without_restart() - Check if - * SAP channel change allowed without restart - * @mcc_to_scc_switch: MCC to SCC switch enabled user config - * - * Check if SAP channel change allowed without restart - * - * Restart: true or false - */ -static bool policy_mgr_is_sap_channel_change_without_restart( - uint32_t mcc_to_scc_switch) { - if (mcc_to_scc_switch == - QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION || - mcc_to_scc_switch == - QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL) { - policy_mgr_info("SAP chan change without restart allowed"); - return true; - } - return false; -} - /** * policy_mgr_check_sta_ap_concurrent_ch_intf() - Restart SAP in STA-AP case * @data: Pointer check concurrent channel work data @@ -637,8 +616,6 @@ void policy_mgr_check_sta_ap_concurrent_ch_intf(void *data) QDF_STATUS status; uint8_t channel, sec_ch; uint8_t operating_channel, vdev_id; - bool restart_sap; - pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { @@ -661,9 +638,6 @@ void policy_mgr_check_sta_ap_concurrent_ch_intf(void *data) return; } - restart_sap = policy_mgr_is_sap_channel_change_without_restart( - mcc_to_scc_switch) ? false : true; - if (!pm_ctx->hdd_cbacks.wlan_hdd_get_channel_for_sap_restart) { policy_mgr_err("SAP restart get channel callback in NULL"); return; @@ -671,7 +645,7 @@ void policy_mgr_check_sta_ap_concurrent_ch_intf(void *data) qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock); status = pm_ctx->hdd_cbacks. wlan_hdd_get_channel_for_sap_restart(psoc, vdev_id, - &channel, &sec_ch, restart_sap); + &channel, &sec_ch); qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); if (status != QDF_STATUS_SUCCESS) { policy_mgr_err("Failed to switch SAP channel");