qcacld-3.0: Avoid STA plus STA concurrent connections

Add policy manager support to avoid simultaneous connections on
STA plus STA concurrent interfaces when
WMI_SERVICE_STA_PLUS_STA_SUPPORT is not set.

Change-Id: I73e65c56a98908128d56af2f4fba8ced5210fff1
CRs-Fixed: 2427828
This commit is contained in:
Rajeev Kumar Sirasanagandla
2019-04-02 16:29:30 +05:30
committed by nshrivas
parent 643da5a5cb
commit 82fb8031d9
2 changed files with 39 additions and 2 deletions

View File

@@ -2794,6 +2794,17 @@ bool policy_mgr_allow_sap_go_concurrency(struct wlan_objmgr_psoc *psoc,
uint8_t channel, uint8_t channel,
uint32_t vdev_id); uint32_t vdev_id);
/**
* policy_mgr_allow_multiple_sta_connections() - API to get FW support
* @psoc: Pointer to soc
*
* This function checks FW support for simultaneous connections on
* concurrent STA interfaces.
*
* Return: true if supports else false.
*/
bool policy_mgr_allow_multiple_sta_connections(struct wlan_objmgr_psoc *psoc);
/** /**
* policy_mgr_dual_beacon_on_single_mac_scc_capable() - get capability that * policy_mgr_dual_beacon_on_single_mac_scc_capable() - get capability that
* whether support dual beacon on same channel on single MAC * whether support dual beacon on same channel on single MAC

View File

@@ -1981,14 +1981,22 @@ bool policy_mgr_is_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
} }
} }
count = policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE,
list);
/* Check for STA+STA concurrency */
if (mode == PM_STA_MODE && count &&
!policy_mgr_allow_multiple_sta_connections(psoc)) {
policy_mgr_err("No 2nd STA connection, already one STA is connected");
goto done;
}
/* /*
* Check all IBSS+STA concurrencies * Check all IBSS+STA concurrencies
* *
* don't allow IBSS + STA MCC * don't allow IBSS + STA MCC
* don't allow IBSS + STA SCC if IBSS is on DFS channel * don't allow IBSS + STA SCC if IBSS is on DFS channel
*/ */
count = policy_mgr_mode_specific_connection_count(psoc,
PM_STA_MODE, list);
if ((PM_IBSS_MODE == mode) && if ((PM_IBSS_MODE == mode) &&
(policy_mgr_mode_specific_connection_count(psoc, (policy_mgr_mode_specific_connection_count(psoc,
PM_IBSS_MODE, list)) && count) { PM_IBSS_MODE, list)) && count) {
@@ -3414,6 +3422,24 @@ bool policy_mgr_allow_sap_go_concurrency(struct wlan_objmgr_psoc *psoc,
return true; return true;
} }
bool policy_mgr_allow_multiple_sta_connections(struct wlan_objmgr_psoc *psoc)
{
struct wmi_unified *wmi_handle;
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
if (!wmi_handle) {
policy_mgr_debug("Invalid WMI handle");
return false;
}
if (wmi_service_enabled(wmi_handle,
wmi_service_sta_plus_sta_support))
return true;
policy_mgr_debug("Concurrent STA connections are not supported");
return false;
}
bool policy_mgr_dual_beacon_on_single_mac_scc_capable( bool policy_mgr_dual_beacon_on_single_mac_scc_capable(
struct wlan_objmgr_psoc *psoc) struct wlan_objmgr_psoc *psoc)
{ {