Bladeren bron

qcacld-3.0: Clean up wlan wake lock during module exit

WLAN wake lock is created during module init but if probe
did not come from platform driver because of Q6 root/user
pd not coming up then during driver unload WLAN wake lock
is not destroyed which is leading to kernel panic because
WLAN driver is unloaded without cleaning up the wake up
source. Add fix to make sure to do hdd_deinit, pld_deinit
dispatcher_deinit and wlan wake up source deinit even if
hdd context is null because if probe did not happen from
platfrom driver then hdd_ctx will be null.

Change-Id: I213bded171b1c69da3332e84ebb0f7cbd940ef44
CRs-Fixed: 2240186
Rajeev Kumar 7 jaren geleden
bovenliggende
commit
3505ae54e0
1 gewijzigde bestanden met toevoegingen van 2 en 6 verwijderingen
  1. 2 6
      core/hdd/src/wlan_hdd_main.c

+ 2 - 6
core/hdd/src/wlan_hdd_main.c

@@ -12078,15 +12078,11 @@ static void __hdd_module_exit(void)
 	pr_info("%s: Unloading driver v%s\n", WLAN_MODULE_NAME,
 		QWLAN_VERSIONSTR);
 
-	if (!hdd_ctx) {
-		hdd_err("hdd context is NULL return!!");
-		return;
-	}
-
 	if (!hdd_wait_for_recovery_completion())
 		return;
 
-	qdf_cancel_delayed_work(&hdd_ctx->iface_idle_work);
+	if (hdd_ctx)
+		qdf_cancel_delayed_work(&hdd_ctx->iface_idle_work);
 
 	wlan_hdd_unregister_driver();