summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshish Kumar Dhanotiya <adhanoti@codeaurora.org>2019-06-06 17:37:15 +0530
committernshrivas <nshrivas@codeaurora.org>2019-06-10 02:29:06 -0700
commit2d014776fed0d71033e73b321b4b4f13f1101fe9 (patch)
treec96333762487e28a0c1d333af04287e6b26563b5
parent6f7bb6f3fd25d2facdc87df9c8dbf7c1a1b8eac1 (diff)
qcacld-3.0: Return correct status in case of probe failure
In driver ipa init api's return value is QDF_STATUS which is getting invoked from start modules, start modules returns os error code as int value. Since QDF_STATUS is enum which will never have error code as negative value while probe is expecting os specific error code. If IPA init fails it will return QDF specific error code and in probe sequence driver is returning the same erorr code(QDF_STATUS) from start modules while platform driver is expecting OS specific error code because of which in case of probe failure also platform driver is considering it as probe success and in next iteration it is invoking re-init instead of probe. To resolve above issue convert QDF specific erorr code to OS specific error code before returning to platform driver. Change-Id: I563a591acf048d09ad9a3445b4413d83f1c01647 CRs-fixed: 2463077
-rw-r--r--core/hdd/src/wlan_hdd_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 8f472765401c..181b5f17799a 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -2420,9 +2420,11 @@ int hdd_wlan_start_modules(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
}
- ret = hdd_ipa_init(hdd_ctx);
- if (ret)
+ status = hdd_ipa_init(hdd_ctx);
+ if (status) {
+ ret = qdf_status_to_os_return(status);
goto err_post_disable;
+ }
hdd_sysfs_create_version_interface();