Quellcode durchsuchen

qcacld-3.0: Fix SAP start delay issue

When driver mode is changed from other mode to mission mode, regulatory
update will happen, flag is_regulatory_update_in_progress is set.
country_change_work thread is used to clear the flag, if other threads
holding OP lock, the work thread exits without clearing flag
is_regulatory_update_in_progress. SAP start is
blocked until timeout later.

To fix it, if failed to update regulatory, country_change_work thread
clears flag is_regulatory_update_in_progress too.

Change-Id: I97440ec14e5153f44a6a1b6028eb8dd9e75ccb5d
CRs-Fixed: 3831855
Jianmin Zhu vor 1 Jahr
Ursprung
Commit
9a5f598d02
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 4 0
      core/hdd/src/wlan_hdd_regulatory.c

+ 4 - 0
core/hdd/src/wlan_hdd_regulatory.c

@@ -1909,6 +1909,10 @@ static void hdd_handle_country_change_work_error(struct hdd_context *hdd_ctx,
 		qdf_sched_work(0, &hdd_ctx->country_change_work);
 	} else {
 		hdd_err("can not handle country change %d", errno);
+		qdf_event_set_all(&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);
 	}
 }