qcacld-3.0: Check for STA+GO restart only if SAP is active
In function policy_mgr_is_restart_sap_allowed, STA+SAP concurrency is decided based on return status of policy_mgr_get_concurrency_mode. It can happen, SAP adapter is opened. But hostapd_open and start_ap is not done. Then, this api will return SAP bit true even even though SAP is not active. So, explicitly check if the SAP is active by checking the SAP connection count along with the concurrency mode. This can result in GO channel override with STA channel. Hence check the sap and go mode connection count along with the concurrency mode. Change-Id: I672d503f34734d7e16175fedc685d2838e77d8f7 CRs-Fixed: 2405189
This commit is contained in:
@@ -1238,15 +1238,21 @@ static bool policy_mgr_is_restart_sap_allowed(
|
|||||||
{
|
{
|
||||||
uint32_t sta_ap_bit_mask = QDF_STA_MASK | QDF_SAP_MASK;
|
uint32_t sta_ap_bit_mask = QDF_STA_MASK | QDF_SAP_MASK;
|
||||||
uint32_t sta_go_bit_mask = QDF_STA_MASK | QDF_P2P_GO_MASK;
|
uint32_t sta_go_bit_mask = QDF_STA_MASK | QDF_P2P_GO_MASK;
|
||||||
|
uint32_t ap_present, go_present;
|
||||||
|
|
||||||
|
ap_present = policy_mgr_mode_specific_connection_count(
|
||||||
|
psoc, PM_SAP_MODE, NULL);
|
||||||
|
go_present = policy_mgr_mode_specific_connection_count(
|
||||||
|
psoc, PM_P2P_GO_MODE, NULL);
|
||||||
|
|
||||||
if ((mcc_to_scc_switch == QDF_MCC_TO_SCC_SWITCH_DISABLE) ||
|
if ((mcc_to_scc_switch == QDF_MCC_TO_SCC_SWITCH_DISABLE) ||
|
||||||
!policy_mgr_concurrent_open_sessions_running(psoc) ||
|
!policy_mgr_concurrent_open_sessions_running(psoc) ||
|
||||||
!(((policy_mgr_get_concurrency_mode(psoc) & sta_ap_bit_mask)
|
!((ap_present && ((policy_mgr_get_concurrency_mode(psoc) &
|
||||||
== sta_ap_bit_mask) ||
|
sta_ap_bit_mask) == sta_ap_bit_mask)) ||
|
||||||
((mcc_to_scc_switch ==
|
((mcc_to_scc_switch ==
|
||||||
QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION) &&
|
QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION)
|
||||||
((policy_mgr_get_concurrency_mode(psoc) & sta_go_bit_mask)
|
&& go_present && ((policy_mgr_get_concurrency_mode(psoc) &
|
||||||
== sta_go_bit_mask)))) {
|
sta_go_bit_mask) == sta_go_bit_mask)))) {
|
||||||
policy_mgr_debug("MCC switch disabled or not concurrent STA/SAP, STA/GO");
|
policy_mgr_debug("MCC switch disabled or not concurrent STA/SAP, STA/GO");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user