From 9c2715c7ccca946f8dcf44f79b30e85f48369952 Mon Sep 17 00:00:00 2001 From: Lincoln Tran Date: Wed, 24 Mar 2021 13:46:44 -0700 Subject: [PATCH] qcacld-3.0: Expand the regulatory update critical section Currently, host exits the regulatory update critical section as soon as hdd_regulatory_dyn_cbk finishes. However, there is some work that is scheduled to send the updated scan channel list to FW, which needs to go inside the critical section as well. Move the logic to exit the critical section after host sends the channel list. Change-Id: I01f82232bdd4d4b3403f46dee5278fc74d50b05a CRs-fixed: 2905643 --- core/hdd/src/wlan_hdd_regulatory.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c index 9903ab9cc411..cd3c57f0e974 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -1606,6 +1606,12 @@ static void __hdd_country_change_work_handle(struct hdd_context *hdd_ctx) hdd_country_change_update_sta(hdd_ctx); sme_generic_change_country_code(hdd_ctx->mac_handle, hdd_ctx->reg.alpha2); + + qdf_event_set(&hdd_ctx->regulatory_update_event); + qdf_mutex_acquire(&hdd_ctx->regulatory_status_lock); + hdd_ctx->is_regulatory_update_in_progress = false; + qdf_mutex_release(&hdd_ctx->regulatory_status_lock); + hdd_country_change_update_sap(hdd_ctx); } @@ -1681,10 +1687,6 @@ static void hdd_regulatory_dyn_cbk(struct wlan_objmgr_psoc *psoc, hdd_config_tdls_with_band_switch(hdd_ctx); qdf_sched_work(0, &hdd_ctx->country_change_work); - qdf_event_set(&hdd_ctx->regulatory_update_event); - qdf_mutex_acquire(&hdd_ctx->regulatory_status_lock); - hdd_ctx->is_regulatory_update_in_progress = false; - qdf_mutex_release(&hdd_ctx->regulatory_status_lock); } int hdd_update_regulatory_config(struct hdd_context *hdd_ctx)