diff --git a/components/ipa/dispatcher/inc/wlan_ipa_ucfg_api.h b/components/ipa/dispatcher/inc/wlan_ipa_ucfg_api.h index b03330dfecaa..61487bc3400a 100644 --- a/components/ipa/dispatcher/inc/wlan_ipa_ucfg_api.h +++ b/components/ipa/dispatcher/inc/wlan_ipa_ucfg_api.h @@ -42,6 +42,19 @@ */ bool ucfg_ipa_is_present(void); +/** + * ucfg_ipa_is_ready() - get IPA ready status + * + * After ipa_ready_cb() is registered and later invoked by IPA + * driver, ipa ready status flag is updated in wlan driver. + * Unless IPA ready callback is invoked and ready status is + * updated none of the IPA APIs should be invoked. + * + * Return: true - ipa is ready + * false - ipa is not ready + */ +bool ucfg_ipa_is_ready(void); + /** * ucfg_ipa_is_enabled() - get IPA enable status * @@ -397,6 +410,11 @@ static inline bool ucfg_ipa_is_present(void) return false; } +static inline bool ucfg_ipa_is_ready(void) +{ + return false; +} + static inline void ucfg_ipa_update_config(struct wlan_ipa_config *config) { } diff --git a/components/ipa/dispatcher/src/wlan_ipa_ucfg_api.c b/components/ipa/dispatcher/src/wlan_ipa_ucfg_api.c index 2ef3d1c2b726..30c2ef1dc548 100644 --- a/components/ipa/dispatcher/src/wlan_ipa_ucfg_api.c +++ b/components/ipa/dispatcher/src/wlan_ipa_ucfg_api.c @@ -29,6 +29,11 @@ bool ucfg_ipa_is_present(void) return ipa_is_hw_support(); } +bool ucfg_ipa_is_ready(void) +{ + return ipa_is_ready(); +} + bool ucfg_ipa_is_enabled(void) { return ipa_config_is_enabled(); diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 087cc256391d..6046872f285c 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -405,7 +405,7 @@ static int hdd_init_qdf_ctx(struct device *dev, void *bdev, qdf_dev->bus_type = bus_type; qdf_dev->bid = bid; - if (cds_smmu_mem_map_setup(qdf_dev, ucfg_ipa_is_present()) != + if (cds_smmu_mem_map_setup(qdf_dev, ucfg_ipa_is_ready()) != QDF_STATUS_SUCCESS) { hdd_err("cds_smmu_mem_map_setup() failed"); return -EFAULT;