|
@@ -43,6 +43,9 @@ QDF_STATUS ipa_config_mem_alloc(void)
|
|
|
{
|
|
|
struct wlan_ipa_config *ipa_cfg;
|
|
|
|
|
|
+ if (g_ipa_config)
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
ipa_cfg = qdf_mem_malloc(sizeof(*ipa_cfg));
|
|
|
if (!ipa_cfg) {
|
|
|
ipa_err("Failed to allocate memory for ipa config");
|
|
@@ -164,6 +167,9 @@ QDF_STATUS ipa_rm_set_perf_level(struct wlan_objmgr_pdev *pdev,
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -182,6 +188,9 @@ void ipa_uc_info(struct wlan_objmgr_pdev *pdev)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -200,6 +209,9 @@ void ipa_uc_stat(struct wlan_objmgr_pdev *pdev)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -218,6 +230,9 @@ void ipa_uc_rt_debug_host_dump(struct wlan_objmgr_pdev *pdev)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -236,6 +251,9 @@ void ipa_dump_info(struct wlan_objmgr_pdev *pdev)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -254,6 +272,9 @@ void ipa_uc_stat_request(struct wlan_objmgr_pdev *pdev, uint8_t reason)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -273,6 +294,9 @@ void ipa_uc_stat_query(struct wlan_objmgr_pdev *pdev,
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -291,6 +315,9 @@ void ipa_reg_sap_xmit_cb(struct wlan_objmgr_pdev *pdev, wlan_ipa_softap_xmit cb)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -310,6 +337,9 @@ void ipa_reg_send_to_nw_cb(struct wlan_objmgr_pdev *pdev,
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -328,6 +358,9 @@ void ipa_set_mcc_mode(struct wlan_objmgr_pdev *pdev, bool mcc_mode)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -346,6 +379,9 @@ void ipa_set_dfs_cac_tx(struct wlan_objmgr_pdev *pdev, bool tx_block)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -365,6 +401,9 @@ void ipa_set_ap_ibss_fwd(struct wlan_objmgr_pdev *pdev, uint8_t session_id,
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -388,6 +427,9 @@ void ipa_uc_force_pipe_shutdown(struct wlan_objmgr_pdev *pdev)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -406,6 +448,9 @@ void ipa_flush(struct wlan_objmgr_pdev *pdev)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -424,6 +469,9 @@ QDF_STATUS ipa_suspend(struct wlan_objmgr_pdev *pdev)
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -442,6 +490,9 @@ QDF_STATUS ipa_resume(struct wlan_objmgr_pdev *pdev)
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -461,6 +512,9 @@ QDF_STATUS ipa_uc_ol_init(struct wlan_objmgr_pdev *pdev,
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -479,6 +533,9 @@ bool ipa_is_tx_pending(struct wlan_objmgr_pdev *pdev)
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
|
|
|
return wlan_ipa_is_tx_pending(ipa_obj);
|
|
@@ -493,6 +550,11 @@ QDF_STATUS ipa_uc_ol_deinit(struct wlan_objmgr_pdev *pdev)
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready()) {
|
|
|
+ ipa_debug("ipa is not ready");
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+ }
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -512,6 +574,9 @@ QDF_STATUS ipa_send_mcc_scc_msg(struct wlan_objmgr_pdev *pdev,
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -528,6 +593,9 @@ QDF_STATUS ipa_wlan_evt(struct wlan_objmgr_pdev *pdev, qdf_netdev_t net_dev,
|
|
|
{
|
|
|
struct wlan_ipa_priv *ipa_obj;
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -552,6 +620,11 @@ bool ipa_is_fw_wdi_activated(struct wlan_objmgr_pdev *pdev)
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ if (!ipa_is_ready()) {
|
|
|
+ ipa_debug("ipa is not ready");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err_rl("IPA object is NULL");
|
|
@@ -566,6 +639,11 @@ void ipa_uc_cleanup_sta(struct wlan_objmgr_pdev *pdev,
|
|
|
{
|
|
|
struct wlan_ipa_priv *ipa_obj;
|
|
|
|
|
|
+ if (!ipa_is_ready()) {
|
|
|
+ ipa_debug("ipa is not ready");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -580,6 +658,9 @@ QDF_STATUS ipa_uc_disconnect_ap(struct wlan_objmgr_pdev *pdev,
|
|
|
{
|
|
|
struct wlan_ipa_priv *ipa_obj;
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -594,6 +675,9 @@ void ipa_cleanup_dev_iface(struct wlan_objmgr_pdev *pdev,
|
|
|
{
|
|
|
struct wlan_ipa_priv *ipa_obj;
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -607,6 +691,9 @@ void ipa_uc_ssr_cleanup(struct wlan_objmgr_pdev *pdev)
|
|
|
{
|
|
|
struct wlan_ipa_priv *ipa_obj;
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -636,8 +723,11 @@ void ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev)
|
|
|
|
|
|
void ipa_component_config_update(struct wlan_objmgr_psoc *psoc)
|
|
|
{
|
|
|
- if (!g_ipa_config) {
|
|
|
- ipa_err("g_ipa_config is NULL");
|
|
|
+ QDF_STATUS status;
|
|
|
+
|
|
|
+ status = ipa_config_mem_alloc();
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ ipa_err("Failed to alloc g_ipa_config");
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -664,6 +754,12 @@ void ipa_component_config_update(struct wlan_objmgr_psoc *psoc)
|
|
|
cfg_get(psoc, CFG_DP_IPA_ENABLE_FORCE_VOTING);
|
|
|
}
|
|
|
|
|
|
+void ipa_component_config_free(void)
|
|
|
+{
|
|
|
+ ipa_info("Free the IPA config memory");
|
|
|
+ ipa_config_mem_free();
|
|
|
+}
|
|
|
+
|
|
|
uint32_t ipa_get_tx_buf_count(void)
|
|
|
{
|
|
|
return g_ipa_config ? g_ipa_config->txbuf_count : 0;
|
|
@@ -694,6 +790,9 @@ void ipa_flush_pending_vdev_events(struct wlan_objmgr_pdev *pdev,
|
|
|
if (!ipa_config_is_enabled())
|
|
|
return;
|
|
|
|
|
|
+ if (!ipa_is_ready())
|
|
|
+ return;
|
|
|
+
|
|
|
ipa_obj = ipa_pdev_get_priv_obj(pdev);
|
|
|
if (!ipa_obj) {
|
|
|
ipa_err("IPA object is NULL");
|
|
@@ -702,3 +801,4 @@ void ipa_flush_pending_vdev_events(struct wlan_objmgr_pdev *pdev,
|
|
|
|
|
|
wlan_ipa_flush_pending_vdev_events(ipa_obj, vdev_id);
|
|
|
}
|
|
|
+
|