Browse Source

qcacld-3.0: Add mac_open() error handling

The error handling in cds_open(), in the event that the call to
mac_open() fails, is currently stubbed out. Add appropriate error
handling for this case by referencing cds_open() and cds_close().

Change-Id: I6103050d5f2323250c9254a5a3add01fd0d34de3
CRs-Fixed: 2302968
Dustin Brown 6 years ago
parent
commit
da0262a36f
1 changed files with 7 additions and 3 deletions
  1. 7 3
      core/cds/src/cds_api.c

+ 7 - 3
core/cds/src/cds_api.c

@@ -690,15 +690,19 @@ QDF_STATUS cds_open(struct wlan_objmgr_psoc *psoc)
 
 err_mac_close:
 	mac_close(mac_handle);
+	gp_cds_context->mac_context = NULL;
 
 err_soc_detach:
-	/* todo: add propper error handling */
+	cdp_soc_detach(gp_cds_context->dp_soc);
+
+	ucfg_ocb_update_dp_handle(psoc, NULL);
+	pmo_ucfg_psoc_update_dp_handle(psoc, NULL);
+	wlan_psoc_set_dp_handle(psoc, NULL);
+
 err_wma_close:
 	cds_shutdown_notifier_purge();
 	wma_close();
 	wma_wmi_service_close();
-	pmo_ucfg_psoc_update_dp_handle(psoc, NULL);
-	wlan_psoc_set_dp_handle(psoc, NULL);
 
 err_htc_close:
 	if (gp_cds_context->htc_ctx) {