qcacmn: Add a qdf counter for qmi stats requests

Add a qdf counter to know number of qmi stats requests. Reset the
counter when WoW is exited.

Change-Id: Ie0c51fbd6eb2e7530dba01912443e7fc85726e52
CRs-Fixed: 2539999
This commit is contained in:
Alan Chen
2019-10-03 16:22:59 -07:00
committed by nshrivas
parent ddcff963a2
commit b2bc55909c
3 changed files with 8 additions and 0 deletions

View File

@@ -36,6 +36,7 @@
#include <linux/debugfs.h>
#ifdef WMI_EXT_DBG
#include "qdf_atomic.h"
/**
* wmi_ext_dbg_msg_enqueue() - enqueue wmi message
@@ -1688,6 +1689,7 @@ QDF_STATUS wmi_unified_cmd_send_over_qmi(struct wmi_unified *wmi_handle,
uint32_t cmd_id)
{
QDF_STATUS status;
int32_t ret;
if (!qdf_nbuf_push_head(buf, sizeof(WMI_CMD_HDR))) {
wmi_err("Failed to send cmd %x, no memory", cmd_id);
@@ -1705,6 +1707,8 @@ QDF_STATUS wmi_unified_cmd_send_over_qmi(struct wmi_unified *wmi_handle,
qdf_nbuf_pull_head(buf, sizeof(WMI_CMD_HDR));
wmi_warn("WMI send on QMI failed. Retrying WMI on HTC");
} else {
ret = qdf_atomic_inc_return(&wmi_handle->num_stats_over_qmi);
wmi_debug("num stats over qmi: %d", ret);
wmi_buf_free(buf);
}
@@ -2635,6 +2639,7 @@ void *wmi_unified_attach(void *scn_handle,
soc->scn_handle = scn_handle;
qdf_atomic_init(&wmi_handle->pending_cmds);
qdf_atomic_init(&wmi_handle->is_target_suspended);
qdf_atomic_init(&wmi_handle->num_stats_over_qmi);
wmi_runtime_pm_init(wmi_handle);
qdf_spinlock_create(&wmi_handle->eventq_lock);
qdf_nbuf_queue_init(&wmi_handle->event_queue);