qcacld-3.0: Remove IPA uC stat log when IPA pipe is suspended

There's an excessive log for IPA uC stat request reason even when
WDI pipe is suspended.
Enable IPA uC stat request reason log only when IPA pipe is resumed.

Change-Id: I35d98e02a9180738bc9cdb25f59e31d572df9e0e
CRs-Fixed: 2181952
This commit is contained in:
Yun Park
2018-04-09 12:05:49 -07:00
committed by nshrivas
parent b49124f486
commit 8e09a112d4
6 changed files with 75 additions and 8 deletions

View File

@@ -587,5 +587,12 @@ QDF_STATUS wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode,
*/
int wlan_ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr);
/**
* wlan_ipa_is_fw_wdi_activated() - Is FW WDI actived?
* @ipa_ctx: IPA contex
*
* Return: true if FW WDI actived, false otherwise
*/
bool wlan_ipa_is_fw_wdi_activated(struct wlan_ipa_priv *ipa_ctx);
#endif /* IPA_OFFLOAD */
#endif /* _WLAN_IPA_CORE_H_ */

View File

@@ -360,5 +360,12 @@ QDF_STATUS ipa_wlan_evt(struct wlan_objmgr_pdev *pdev, qdf_netdev_t net_dev,
*/
int ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr);
/**
* ipa_is_fw_wdi_activated - Is FW WDI activated?
* @pdev: pdev obj
*
* Return: true if FW WDI activated, false otherwise
*/
bool ipa_is_fw_wdi_activated(struct wlan_objmgr_pdev *pdev);
#endif /* IPA_OFFLOAD */
#endif /* end of _WLAN_IPA_MAIN_H_ */

View File

@@ -1462,8 +1462,7 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode,
} else {
/* Disable IPA UC TX PIPE when STA disconnected */
if ((ipa_ctx->num_iface == 1) &&
(ipa_ctx->activated_fw_pipe ==
WLAN_IPA_UC_NUM_WDI_PIPE) &&
wlan_ipa_is_fw_wdi_activated(ipa_ctx) &&
!ipa_ctx->ipa_pipes_down)
wlan_ipa_uc_handle_last_discon(ipa_ctx);
}
@@ -1496,7 +1495,7 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode,
qdf_mutex_acquire(&ipa_ctx->event_lock);
if ((ipa_ctx->num_iface == 1) &&
(ipa_ctx->activated_fw_pipe == WLAN_IPA_UC_NUM_WDI_PIPE) &&
wlan_ipa_is_fw_wdi_activated(ipa_ctx) &&
!ipa_ctx->ipa_pipes_down) {
if (cds_is_driver_unloading()) {
/*
@@ -1664,9 +1663,8 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode,
/* Disable IPA UC TX PIPE when last STA disconnected */
if (!ipa_ctx->sap_num_connected_sta &&
ipa_ctx->uc_loaded == true) {
if ((false == ipa_ctx->resource_unloading)
&& (WLAN_IPA_UC_NUM_WDI_PIPE ==
ipa_ctx->activated_fw_pipe) &&
if ((false == ipa_ctx->resource_unloading) &&
wlan_ipa_is_fw_wdi_activated(ipa_ctx) &&
!ipa_ctx->ipa_pipes_down) {
wlan_ipa_uc_handle_last_discon(ipa_ctx);
}
@@ -2401,7 +2399,7 @@ static void wlan_ipa_uc_op_cb(struct op_msg_type *op_msg,
(msg->op_code == WLAN_IPA_UC_OPCODE_RX_RESUME)) {
qdf_mutex_acquire(&ipa_ctx->ipa_lock);
ipa_ctx->activated_fw_pipe++;
if (ipa_ctx->activated_fw_pipe == WLAN_IPA_UC_NUM_WDI_PIPE) {
if (wlan_ipa_is_fw_wdi_activated(ipa_ctx)) {
ipa_ctx->resource_loading = false;
qdf_event_set(&ipa_ctx->ipa_resource_comp);
if (ipa_ctx->wdi_enabled == false) {
@@ -2658,3 +2656,15 @@ int wlan_ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr)
else
return qdf_ipa_release_wdi_mapping(num_buf, buf_arr);
}
/**
* wlan_ipa_is_fw_wdi_activated() - Is FW WDI actived?
* @ipa_ctx: IPA contex
*
* Return: true if FW WDI actived, false otherwise
*/
bool wlan_ipa_is_fw_wdi_activated(struct wlan_ipa_priv *ipa_ctx)
{
return (WLAN_IPA_UC_NUM_WDI_PIPE == ipa_ctx->activated_fw_pipe);
}

View File

@@ -530,3 +530,27 @@ int ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr)
{
return wlan_ipa_uc_smmu_map(map, num_buf, buf_arr);
}
/**
* ipa_is_fw_wdi_activated - Is FW WDI activated?
* @pdev: pdev obj
*
* Return: true if FW WDI activated, false otherwise
*/
bool ipa_is_fw_wdi_activated(struct wlan_objmgr_pdev *pdev)
{
struct wlan_ipa_priv *ipa_obj;
if (!ipa_config_is_enabled()) {
ipa_info("ipa is disabled");
return false;
}
ipa_obj = ipa_pdev_get_priv_obj(pdev);
if (!ipa_obj) {
ipa_err("IPA object is NULL");
return false;
}
return wlan_ipa_is_fw_wdi_activated(ipa_obj);
}

View File

@@ -282,6 +282,14 @@ QDF_STATUS ucfg_ipa_wlan_evt(struct wlan_objmgr_pdev *pdev,
*/
int ucfg_ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr);
/**
* ucfg_ipa_is_fw_wdi_activated - Is FW WDI activated?
* @pdev: pdev obj
*
* Return: true if FW WDI activated, false otherwise
*/
bool ucfg_ipa_is_fw_wdi_activated(struct wlan_objmgr_pdev *pdev);
#else
static inline bool ucfg_ipa_is_present(void)
@@ -438,5 +446,11 @@ int ucfg_ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr)
{
return 0;
}
static inline
bool ucfg_ipa_is_fw_wdi_activated(struct wlan_objmgr_pdev *pdev)
{
return false;
}
#endif /* IPA_OFFLOAD */
#endif /* _WLAN_IPA_UCFG_API_H_ */

View File

@@ -169,3 +169,8 @@ int ucfg_ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr)
{
return ipa_uc_smmu_map(map, num_buf, buf_arr);
}
bool ucfg_ipa_is_fw_wdi_activated(struct wlan_objmgr_pdev *pdev)
{
return ipa_is_fw_wdi_activated(pdev);
}