瀏覽代碼

qcacld-3.0: move registration to end of driver load

An upcoming change will add synchronization to the driver load
operation. Effectively, driver load and psoc probe will need to be
exclusive operations. Because driver registration can synchronously
invoke psoc probe, move this registration to the end of the driver load
function. This prepares the way for adding synchronization around the
bulk of the load logic, and releasing it just before registration. This
avoids issues where driver load and psoc probe would otherwise execute
at the same time.

Change-Id: I3a617673ea0d4a56e2c08b2ef2f98f8cbdf42205
CRs-Fixed: 2315976
Dustin Brown 6 年之前
父節點
當前提交
4b9dbe62c7
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. 8 8
      core/hdd/src/wlan_hdd_main.c

+ 8 - 8
core/hdd/src/wlan_hdd_main.c

@@ -12731,24 +12731,24 @@ static int hdd_driver_load(void)
 
 	hdd_set_conparam(con_mode);
 
-	errno = wlan_hdd_register_driver();
+	errno = wlan_hdd_state_ctrl_param_create();
 	if (errno) {
-		hdd_fln("Failed to register driver; errno:%d", errno);
+		hdd_fln("Failed to create ctrl param; errno:%d", errno);
 		goto wakelock_destroy;
 	}
 
-	errno = wlan_hdd_state_ctrl_param_create();
+	errno = wlan_hdd_register_driver();
 	if (errno) {
-		hdd_fln("Failed to create ctrl param; errno:%d", errno);
-		goto unregister_driver;
+		hdd_fln("Failed to register driver; errno:%d", errno);
+		goto param_destroy;
 	}
 
 	pr_info("%s: driver loaded\n", WLAN_MODULE_NAME);
 
 	return 0;
 
-unregister_driver:
-	wlan_hdd_unregister_driver();
+param_destroy:
+	wlan_hdd_state_ctrl_param_destroy();
 wakelock_destroy:
 	qdf_wake_lock_destroy(&wlan_wake_lock);
 comp_deinit:
@@ -12788,8 +12788,8 @@ static void hdd_driver_unload(void)
 	if (hdd_ctx)
 		qdf_cancel_delayed_work(&hdd_ctx->iface_idle_work);
 
-	wlan_hdd_state_ctrl_param_destroy();
 	wlan_hdd_unregister_driver();
+	wlan_hdd_state_ctrl_param_destroy();
 	hdd_set_conparam(0);
 	qdf_wake_lock_destroy(&wlan_wake_lock);
 	hdd_component_deinit();