qcacld-3.0: Modify HDD pdev create API to return OS status
HDD APIs should return native OS return code hence modify hdd_create_and_store_pdev() to return native OS return code Change-Id: I430e148f9892024daa176c1dc2e2c00235654e77 CRs-Fixed: 1111425
This commit is contained in:
@@ -1313,15 +1313,15 @@ static void hdd_update_ra_rate_limit(hdd_context_t *hdd_ctx,
|
||||
|
||||
void hdd_update_tgt_cfg(void *context, void *param)
|
||||
{
|
||||
int ret;
|
||||
hdd_context_t *hdd_ctx = (hdd_context_t *) context;
|
||||
struct wma_tgt_cfg *cfg = param;
|
||||
uint8_t temp_band_cap;
|
||||
struct cds_config_info *cds_cfg = cds_get_ini_config();
|
||||
QDF_STATUS qdf_status;
|
||||
|
||||
qdf_status = hdd_create_and_store_pdev(hdd_ctx);
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
||||
hdd_err("Pdev creation fails!");
|
||||
ret = hdd_create_and_store_pdev(hdd_ctx);
|
||||
if (ret) {
|
||||
hdd_err("pdev creation fails!");
|
||||
QDF_BUG(0);
|
||||
}
|
||||
|
||||
|
@@ -56,24 +56,24 @@ int hdd_release_and_destroy_psoc(hdd_context_t *hdd_ctx)
|
||||
return qdf_status_to_os_return(wlan_objmgr_psoc_obj_delete(psoc));
|
||||
}
|
||||
|
||||
QDF_STATUS hdd_create_and_store_pdev(hdd_context_t *hdd_ctx)
|
||||
int hdd_create_and_store_pdev(hdd_context_t *hdd_ctx)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = hdd_ctx->hdd_psoc;
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
|
||||
if (!psoc) {
|
||||
hdd_err("Psoc NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pdev = wlan_objmgr_pdev_obj_create(psoc, NULL);
|
||||
if (!pdev) {
|
||||
hdd_err("pdev obj create failed");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
return -ENOMEM;
|
||||
}
|
||||
hdd_ctx->hdd_pdev = pdev;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
QDF_STATUS hdd_release_and_destroy_pdev(hdd_context_t *hdd_ctx)
|
||||
|
@@ -91,9 +91,9 @@ int hdd_release_and_destroy_psoc(hdd_context_t *hdd_ctx);
|
||||
*
|
||||
* This API creates the pdev object and store the pdev reference to hdd context
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
* Return: 0 for success, negative error code for failure
|
||||
*/
|
||||
QDF_STATUS hdd_create_and_store_pdev(hdd_context_t *hdd_ctx);
|
||||
int hdd_create_and_store_pdev(hdd_context_t *hdd_ctx);
|
||||
|
||||
/**
|
||||
* hdd_release_and_destroy_pdev() - Deletes the pdev object
|
||||
|
Reference in New Issue
Block a user