mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
qcacld-3.0: Acquire mutex lock within MCC policy mgr api
Currently, the mutex lock is acquired in the caller functions before calling policy mgr api to check MCC. Remove it and add the mutex lock within the policy manager API instead. Change-Id: I7be6081ed12c1882b808d3ca4e92392d175349e7 CRs-Fixed: 2732055
This commit is contained in:
parent
bc353f1629
commit
98ca3dac37
2 changed files with 9 additions and 4 deletions
|
|
@ -621,9 +621,7 @@ void policy_mgr_update_conc_list(struct wlan_objmgr_psoc *psoc,
|
|||
|
||||
/* IPA only cares about STA or SAP mode */
|
||||
if (mode == PM_STA_MODE || mode == PM_SAP_MODE) {
|
||||
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
||||
mcc_mode = policy_mgr_current_concurrency_is_mcc(psoc);
|
||||
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
||||
|
||||
if (pm_ctx->dp_cbacks.hdd_ipa_set_mcc_mode_cb)
|
||||
pm_ctx->dp_cbacks.hdd_ipa_set_mcc_mode_cb(mcc_mode);
|
||||
|
|
|
|||
|
|
@ -1562,9 +1562,17 @@ bool policy_mgr_current_concurrency_is_mcc(struct wlan_objmgr_psoc *psoc)
|
|||
{
|
||||
uint32_t num_connections = 0;
|
||||
bool is_mcc = 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 is_mcc;
|
||||
}
|
||||
|
||||
num_connections = policy_mgr_get_connection_count(psoc);
|
||||
|
||||
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
||||
switch (num_connections) {
|
||||
case 1:
|
||||
break;
|
||||
|
|
@ -1591,6 +1599,7 @@ bool policy_mgr_current_concurrency_is_mcc(struct wlan_objmgr_psoc *psoc)
|
|||
num_connections);
|
||||
break;
|
||||
}
|
||||
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
||||
|
||||
return is_mcc;
|
||||
}
|
||||
|
|
@ -1925,9 +1934,7 @@ QDF_STATUS policy_mgr_decr_active_session(struct wlan_objmgr_psoc *psoc,
|
|||
* or SAP since IPA only cares about these two
|
||||
*/
|
||||
if (mode == QDF_STA_MODE || mode == QDF_SAP_MODE) {
|
||||
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
||||
mcc_mode = policy_mgr_current_concurrency_is_mcc(psoc);
|
||||
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
||||
|
||||
if (pm_ctx->dp_cbacks.hdd_ipa_set_mcc_mode_cb)
|
||||
pm_ctx->dp_cbacks.hdd_ipa_set_mcc_mode_cb(mcc_mode);
|
||||
|
|
|
|||
Loading…
Reference in a new issue