Pārlūkot izejas kodu

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

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

Change-Id: Ibc5a4f4aa5b9074d6924a8c5303d3adbeb4c8308
CRs-Fixed: 1111408
Rajeev Kumar 8 gadi atpakaļ
vecāks
revīzija
138ef91746

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

@@ -1779,8 +1779,8 @@ int hdd_wlan_start_modules(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
 			goto ol_cds_free;
 		}
 
-		status = hdd_create_and_store_psoc(hdd_ctx, DEFAULT_PSOC_ID);
-		if (QDF_IS_STATUS_ERROR(status)) {
+		ret = hdd_create_and_store_psoc(hdd_ctx, DEFAULT_PSOC_ID);
+		if (ret) {
 			hdd_err("Psoc creation fails!");
 			goto ol_cds_free;
 		}

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

@@ -32,17 +32,17 @@
 
 #include <wlan_hdd_object_manager.h>
 
-QDF_STATUS hdd_create_and_store_psoc(hdd_context_t *hdd_ctx, uint8_t psoc_id)
+int hdd_create_and_store_psoc(hdd_context_t *hdd_ctx, uint8_t psoc_id)
 {
 	struct wlan_objmgr_psoc *psoc;
 
 	psoc = wlan_objmgr_psoc_obj_create(psoc_id, WLAN_DEV_OL);
 	if (!psoc)
-		return QDF_STATUS_E_FAILURE;
+		return -ENOMEM;
 
 	hdd_ctx->hdd_psoc = psoc;
 
-	return QDF_STATUS_SUCCESS;
+	return 0;
 }
 
 QDF_STATUS hdd_release_and_destroy_psoc(hdd_context_t *hdd_ctx)

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

@@ -71,9 +71,9 @@
  * This API creates Psoc object with given @psoc_id and store the psoc reference
  * to hdd context
  *
- * Return: QDF_STATUS
+ * Return: 0 for success, negative error code for failure
  */
-QDF_STATUS hdd_create_and_store_psoc(hdd_context_t *hdd_ctx, uint8_t psoc_id);
+int hdd_create_and_store_psoc(hdd_context_t *hdd_ctx, uint8_t psoc_id);
 
 /**
  * hdd_release_and_destroy_psoc() - Deletes the psoc object