qcacld-3.0: Handle FW rejuvenate scenario

Upon driver reinitialize after a FW rejuvenate,
data packets are not going through IPA path.

Check for FW rejuvenate scenario during driver
recovery and send appropriate message to IPA
driver.

Change-Id: I8c1d7ba78227684cd5653a5927aa4d4c2ce5d354
Crs-Fixed: 2287293
This commit is contained in:
jitiphil
2018-07-24 18:43:50 +05:30
committed by nshrivas
parent b1ba1f5304
commit 17d6f6a529
6 changed files with 76 additions and 0 deletions

View File

@@ -650,5 +650,14 @@ void wlan_ipa_cleanup_dev_iface(struct wlan_ipa_priv *ipa_ctx,
* Return: None * Return: None
*/ */
void wlan_ipa_uc_ssr_cleanup(struct wlan_ipa_priv *ipa_ctx); void wlan_ipa_uc_ssr_cleanup(struct wlan_ipa_priv *ipa_ctx);
/**
* wlan_ipa_fw_rejuvenate_send_msg() - send fw rejuvenate message to IPA driver
* @ipa_ctx: IPA context
*
* Return: void
*/
void wlan_ipa_fw_rejuvenate_send_msg(struct wlan_ipa_priv *ipa_ctx);
#endif /* IPA_OFFLOAD */ #endif /* IPA_OFFLOAD */
#endif /* _WLAN_IPA_CORE_H_ */ #endif /* _WLAN_IPA_CORE_H_ */

View File

@@ -413,5 +413,14 @@ void ipa_cleanup_dev_iface(struct wlan_objmgr_pdev *pdev,
* Return: None * Return: None
*/ */
void ipa_uc_ssr_cleanup(struct wlan_objmgr_pdev *pdev); void ipa_uc_ssr_cleanup(struct wlan_objmgr_pdev *pdev);
/**
* ipa_fw_rejuvenate_send_msg() - send fw rejuvenate message to IPA driver
* @pdev: pdev obj
*
* Return: None
*/
void ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev);
#endif /* IPA_OFFLOAD */ #endif /* IPA_OFFLOAD */
#endif /* end of _WLAN_IPA_MAIN_H_ */ #endif /* end of _WLAN_IPA_MAIN_H_ */

View File

@@ -3004,3 +3004,29 @@ void wlan_ipa_uc_ssr_cleanup(struct wlan_ipa_priv *ipa_ctx)
} }
} }
} }
void wlan_ipa_fw_rejuvenate_send_msg(struct wlan_ipa_priv *ipa_ctx)
{
qdf_ipa_msg_meta_t meta;
qdf_ipa_wlan_msg_t *msg;
int ret;
meta.msg_len = sizeof(*msg);
msg = qdf_mem_malloc(meta.msg_len);
if (!msg) {
ipa_debug("msg allocation failed");
return;
}
QDF_IPA_SET_META_MSG_TYPE(&meta, QDF_FWR_SSR_BEFORE_SHUTDOWN);
ipa_debug("ipa_send_msg(Evt:%d)",
meta.msg_type);
ret = qdf_ipa_send_msg(&meta, msg, wlan_ipa_msg_free_fn);
if (ret) {
ipa_err("ipa_send_msg(Evt:%d)-fail=%d",
meta.msg_type, ret);
qdf_mem_free(msg);
}
ipa_ctx->stats.num_send_msg++;
}

View File

@@ -589,3 +589,16 @@ void ipa_uc_ssr_cleanup(struct wlan_objmgr_pdev *pdev)
return wlan_ipa_uc_ssr_cleanup(ipa_obj); return wlan_ipa_uc_ssr_cleanup(ipa_obj);
} }
void ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev)
{
struct wlan_ipa_priv *ipa_obj;
ipa_obj = ipa_pdev_get_priv_obj(pdev);
if (!ipa_obj) {
ipa_err("IPA object is NULL");
return;
}
return wlan_ipa_fw_rejuvenate_send_msg(ipa_obj);
}

View File

@@ -323,6 +323,15 @@ void ucfg_ipa_cleanup_dev_iface(struct wlan_objmgr_pdev *pdev,
* Return: None * Return: None
*/ */
void ucfg_ipa_uc_ssr_cleanup(struct wlan_objmgr_pdev *pdev); void ucfg_ipa_uc_ssr_cleanup(struct wlan_objmgr_pdev *pdev);
/**
* ucfg_ipa_fw_rejuvenate_send_msg() - Send msg to IPA driver in FW rejuvenate
* @pdev: pdev obj
*
* Return: None
*/
void ucfg_ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev);
#else #else
static inline bool ucfg_ipa_is_present(void) static inline bool ucfg_ipa_is_present(void)
@@ -503,5 +512,10 @@ static inline
void ucfg_ipa_uc_ssr_cleanup(struct wlan_objmgr_pdev *pdev) void ucfg_ipa_uc_ssr_cleanup(struct wlan_objmgr_pdev *pdev)
{ {
} }
static inline
void ucfg_ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev)
{
}
#endif /* IPA_OFFLOAD */ #endif /* IPA_OFFLOAD */
#endif /* _WLAN_IPA_UCFG_API_H_ */ #endif /* _WLAN_IPA_UCFG_API_H_ */

View File

@@ -191,3 +191,8 @@ void ucfg_ipa_uc_ssr_cleanup(struct wlan_objmgr_pdev *pdev)
{ {
return ipa_uc_ssr_cleanup(pdev); return ipa_uc_ssr_cleanup(pdev);
} }
void ucfg_ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev)
{
return ipa_fw_rejuvenate_send_msg(pdev);
}