Przeglądaj źródła

qcacld-3.0: Fix warning during driver unload

During hdd_encrypt_decrypt_deinit, driver tries to acquire sme
global lock. But hdd_encrypt_decrypt_deinit is invoked after sme
close, where driver destroys sme global lock. This results
in failure to acquire sme global lock. Fix this by invoking
hdd_encrypt_decrypt_deinit before sme close. Also, move
hdd_encrypt_decrypt_init to hdd_features_init.

Change-Id: I2c9ab551ea53053db75dc197d6772d53e58f2dfc
CRs-Fixed: 1075442
Padma, Santhosh Kumar 8 lat temu
rodzic
commit
1472fab275
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      core/hdd/src/wlan_hdd_main.c

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

@@ -4791,7 +4791,6 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx)
 	/* Free up RoC request queue and flush workqueue */
 	cds_flush_work(&hdd_ctx->roc_req_work);
 
-	hdd_encrypt_decrypt_deinit(hdd_ctx);
 	wlansap_global_deinit();
 	wlan_hdd_deinit_tx_rx_histogram(hdd_ctx);
 	wiphy_unregister(wiphy);
@@ -7518,6 +7517,7 @@ static int hdd_features_init(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter)
 		hdd_err("Error setting txlimit in sme: %d", status);
 
 	hdd_tsf_init(hdd_ctx);
+	hdd_encrypt_decrypt_init(hdd_ctx);
 
 	ret = hdd_register_cb(hdd_ctx);
 	if (ret) {
@@ -7627,6 +7627,7 @@ static int hdd_deconfigure_cds(hdd_context_t *hdd_ctx)
 	ENTER();
 	/* De-register the SME callbacks */
 	hdd_deregister_cb(hdd_ctx);
+	hdd_encrypt_decrypt_deinit(hdd_ctx);
 
 	/* De-init Policy Manager */
 	if (!QDF_IS_STATUS_SUCCESS(cds_deinit_policy_mgr())) {
@@ -7974,7 +7975,6 @@ int hdd_wlan_startup(struct device *dev)
 		goto err_debugfs_exit;
 
 	memdump_init();
-	hdd_encrypt_decrypt_init(hdd_ctx);
 	hdd_driver_memdump_init();
 
 	if (hdd_ctx->config->fIsImpsEnabled)