From 138ef917463df21b01dbab17e7b17cb92a3a587e Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Fri, 13 Jan 2017 15:19:48 -0800 Subject: [PATCH] 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 --- core/hdd/src/wlan_hdd_main.c | 4 ++-- core/hdd/src/wlan_hdd_object_manager.c | 6 +++--- core/hdd/src/wlan_hdd_object_manager.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index c0ad5f2fa7..94792bd81f 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/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; } diff --git a/core/hdd/src/wlan_hdd_object_manager.c b/core/hdd/src/wlan_hdd_object_manager.c index c9bbec7655..22959f155a 100644 --- a/core/hdd/src/wlan_hdd_object_manager.c +++ b/core/hdd/src/wlan_hdd_object_manager.c @@ -32,17 +32,17 @@ #include -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) diff --git a/core/hdd/src/wlan_hdd_object_manager.h b/core/hdd/src/wlan_hdd_object_manager.h index ee517ae4b1..6e26a4359a 100644 --- a/core/hdd/src/wlan_hdd_object_manager.h +++ b/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