Преглед изворни кода

qcacld-3.0: Modify HDD psoc destroy API to return OS status

HDD APIs should return native OS return code hence modify
hdd_release_and_destroy_psoc() to return native OS return code

Change-Id: I95c173cbd5004d4c9d18ea31d7ce65e9f30a4813
CRs-Fixed: 1111418
Rajeev Kumar пре 8 година
родитељ
комит
99e4cf680d

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

@@ -8037,8 +8037,8 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx)
 	if (QDF_IS_STATUS_ERROR(qdf_status))
 		hdd_err("Pdev delete failed");
 
-	qdf_status = hdd_release_and_destroy_psoc(hdd_ctx);
-	if (QDF_IS_STATUS_ERROR(qdf_status))
+	ret = hdd_release_and_destroy_psoc(hdd_ctx);
+	if (ret)
 		hdd_err("Psoc delete failed");
 
 	hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);

+ 3 - 5
core/hdd/src/wlan_hdd_object_manager.c

@@ -45,17 +45,15 @@ int hdd_create_and_store_psoc(hdd_context_t *hdd_ctx, uint8_t psoc_id)
 	return 0;
 }
 
-QDF_STATUS hdd_release_and_destroy_psoc(hdd_context_t *hdd_ctx)
+int hdd_release_and_destroy_psoc(hdd_context_t *hdd_ctx)
 {
 	struct wlan_objmgr_psoc *psoc = hdd_ctx->hdd_psoc;
 
 	hdd_ctx->hdd_psoc = NULL;
 	if (!psoc)
-		return QDF_STATUS_E_FAILURE;
-
-	wlan_objmgr_psoc_obj_delete(psoc);
+		return -EINVAL;
 
-	return QDF_STATUS_SUCCESS;
+	return qdf_status_to_os_return(wlan_objmgr_psoc_obj_delete(psoc));
 }
 
 QDF_STATUS hdd_create_and_store_pdev(hdd_context_t *hdd_ctx)

+ 2 - 2
core/hdd/src/wlan_hdd_object_manager.h

@@ -81,9 +81,9 @@ int hdd_create_and_store_psoc(hdd_context_t *hdd_ctx, uint8_t psoc_id);
  *
  * This API deletes psoc object and release its reference from hdd context
  *
- * Return: QDF_STATUS
+ * Return: 0 for success, negative error code for failure
  */
-QDF_STATUS hdd_release_and_destroy_psoc(hdd_context_t *hdd_ctx);
+int hdd_release_and_destroy_psoc(hdd_context_t *hdd_ctx);
 
 /**
  * hdd_create_and_store_pdev() - Create pdev object and store in hdd context