diff --git a/components/ipa/dispatcher/inc/wlan_ipa_obj_mgmt_api.h b/components/ipa/dispatcher/inc/wlan_ipa_obj_mgmt_api.h index b53a6babc9..d3f899bf0b 100644 --- a/components/ipa/dispatcher/inc/wlan_ipa_obj_mgmt_api.h +++ b/components/ipa/dispatcher/inc/wlan_ipa_obj_mgmt_api.h @@ -49,6 +49,14 @@ QDF_STATUS ipa_deinit(void); */ QDF_STATUS ipa_register_is_ipa_ready(struct wlan_objmgr_pdev *pdev); +/** + * ipa_disable_register_cb() - Reset the IPA is ready flag + * + * Return: Set the ipa_is_ready flag to false when module is + * unloaded to indicate that ipa ready cb is not registered + */ +void ipa_disable_register_cb(void); + #else static inline QDF_STATUS ipa_init(void) @@ -66,6 +74,10 @@ static inline QDF_STATUS ipa_register_is_ipa_ready( { return QDF_STATUS_SUCCESS; } + +static inline void ipa_disable_register_cb(void) +{ +} #endif /* IPA_OFFLOAD */ #endif /* _WLAN_IPA_OBJ_MGMT_H_ */ diff --git a/components/ipa/dispatcher/src/wlan_ipa_obj_mgmt_api.c b/components/ipa/dispatcher/src/wlan_ipa_obj_mgmt_api.c index 305f5da1b9..7521a14c33 100644 --- a/components/ipa/dispatcher/src/wlan_ipa_obj_mgmt_api.c +++ b/components/ipa/dispatcher/src/wlan_ipa_obj_mgmt_api.c @@ -31,6 +31,12 @@ bool ipa_is_ready(void) return g_ipa_is_ready; } +void ipa_disable_register_cb(void) +{ + ipa_debug("Don't register ready cb with IPA driver"); + g_ipa_is_ready = false; +} + /** * ipa_pdev_obj_destroy_notification() - IPA pdev object destroy notification * @pdev: pdev handle @@ -65,6 +71,7 @@ ipa_pdev_obj_destroy_notification(struct wlan_objmgr_pdev *pdev, ipa_obj_cleanup(ipa_obj); qdf_mem_free(ipa_obj); + ipa_disable_register_cb(); return status; } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index e90a5feed3..c298f110e1 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -13724,10 +13724,14 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx) * observed otherwise. */ - status = ipa_register_is_ipa_ready(hdd_ctx->pdev); - if (!QDF_IS_STATUS_SUCCESS(status)) { - hdd_err("ipa_register_is_ipa_ready failed"); - goto out; + if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { + ipa_disable_register_cb(); + } else { + status = ipa_register_is_ipa_ready(hdd_ctx->pdev); + if (!QDF_IS_STATUS_SUCCESS(status)) { + hdd_err("ipa_register_is_ipa_ready failed"); + goto out; + } } /* @@ -13997,7 +14001,6 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) } /* pdev close and destroy use tx rx ops so call this here */ wlan_global_lmac_if_close(hdd_ctx->psoc); - ucfg_ipa_component_config_free(); } /* @@ -14026,6 +14029,7 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) epping_close(); } + ucfg_ipa_component_config_free(); hdd_hif_close(hdd_ctx, hif_ctx); ol_cds_free();