فهرست منبع

qcacld-3.0: Move regulatory wait to restart path

The current logic to wait for the regulatory update is set in
hdd_wlan_start_modules. However, this function is called in both normal
startup and in idle restart. The regulatory event only comes to the
driver on idle restart. Set the flag in the idle restart path only.

Change-Id: I52ac1f2d84650fd3757133c9bc28e87ee2b903cb
CRs-fixed: 3030575
Lincoln Tran 3 سال پیش
والد
کامیت
1922e2a9b5
1فایلهای تغییر یافته به همراه10 افزوده شده و 5 حذف شده
  1. 10 5
      core/hdd/src/wlan_hdd_main.c

+ 10 - 5
core/hdd/src/wlan_hdd_main.c

@@ -4247,11 +4247,6 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit)
 
 	cds_set_driver_state_module_stop(false);
 
-	qdf_event_reset(&hdd_ctx->regulatory_update_event);
-	qdf_mutex_acquire(&hdd_ctx->regulatory_status_lock);
-	hdd_ctx->is_regulatory_update_in_progress = true;
-	qdf_mutex_release(&hdd_ctx->regulatory_status_lock);
-
 	switch (hdd_ctx->driver_status) {
 	case DRIVER_MODULES_UNINITIALIZED:
 		hdd_nofl_debug("Wlan transitioning (UNINITIALIZED -> CLOSED)");
@@ -11908,6 +11903,11 @@ int hdd_trigger_psoc_idle_restart(struct hdd_context *hdd_ctx)
 		hdd_ctx->current_pcie_gen_speed = 0;
 	}
 
+	qdf_event_reset(&hdd_ctx->regulatory_update_event);
+	qdf_mutex_acquire(&hdd_ctx->regulatory_status_lock);
+	hdd_ctx->is_regulatory_update_in_progress = true;
+	qdf_mutex_release(&hdd_ctx->regulatory_status_lock);
+
 	ret = pld_idle_restart(hdd_ctx->parent_dev, hdd_psoc_idle_restart);
 	hdd_soc_idle_restart_unlock();
 
@@ -16877,6 +16877,11 @@ static int __hdd_driver_mode_change(struct hdd_context *hdd_ctx,
 
 	hdd_set_conparam(next_mode);
 
+	qdf_event_reset(&hdd_ctx->regulatory_update_event);
+	qdf_mutex_acquire(&hdd_ctx->regulatory_status_lock);
+	hdd_ctx->is_regulatory_update_in_progress = true;
+	qdf_mutex_release(&hdd_ctx->regulatory_status_lock);
+
 	errno = pld_idle_restart(hdd_ctx->parent_dev,
 				 hdd_mode_change_psoc_idle_restart);
 	if (errno) {