diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index fd1335eaec3f..ac035e72c546 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1760,6 +1760,7 @@ struct hdd_adapter_ops_history { * @adapter_ops_wq: High priority workqueue for handling adapter operations * @multi_client_thermal_mitigation: Multi client thermal mitigation by fw * @disconnect_for_sta_mon_conc: disconnect if sta monitor intf concurrency + * @is_dual_mac_cfg_updated: indicate whether dual mac cfg has been updated */ struct hdd_context { struct wlan_objmgr_psoc *psoc; @@ -2102,6 +2103,7 @@ struct hdd_context { bool multi_client_thermal_mitigation; #endif bool disconnect_for_sta_mon_conc; + bool is_dual_mac_cfg_updated; }; /** diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 7a4ac4e22466..9c8e2931b05f 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2984,6 +2984,11 @@ wlan_hdd_update_dbs_scan_and_fw_mode_config(void) if (!policy_mgr_find_if_fw_supports_dbs(hdd_ctx->psoc)) return QDF_STATUS_SUCCESS; + if (hdd_ctx->is_dual_mac_cfg_updated) { + hdd_debug("dual mac config has already been updated, skip"); + return QDF_STATUS_SUCCESS; + } + cfg.scan_config = 0; cfg.fw_mode_config = 0; cfg.set_dual_mac_cb = policy_mgr_soc_set_dual_mac_cfg_cb; @@ -3030,6 +3035,8 @@ wlan_hdd_update_dbs_scan_and_fw_mode_config(void) /* wait for sme_soc_set_dual_mac_config to complete */ status = policy_mgr_wait_for_dual_mac_configuration(hdd_ctx->psoc); + if (QDF_IS_STATUS_SUCCESS(status)) + hdd_ctx->is_dual_mac_cfg_updated = true; } else { hdd_err("sme_soc_set_dual_mac_config failed %d", status); return status; @@ -14316,6 +14323,7 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) /* Once the firmware sequence is completed reset this flag */ hdd_ctx->imps_enabled = false; + hdd_ctx->is_dual_mac_cfg_updated = false; hdd_ctx->driver_status = DRIVER_MODULES_CLOSED; hdd_debug("Wlan transitioned (now CLOSED)");