qcacmn: Log runtime PM resume source

It is very critical to know the source of who requests runtime
PM resume to debug all kinds of runtime PM related issues. Hence
log them accordingly.

Change-Id: I9551830b1cb567fd29e9d9bbec18705f9cc5e9ec
CRs-fixed: 2496481
This commit is contained in:
Yue Ma
2019-07-23 15:57:48 -07:00
committed by nshrivas
parent 41e3af09f7
commit 4986b2588b
4 changed files with 109 additions and 10 deletions

View File

@@ -2764,6 +2764,33 @@ static void wmi_htc_tx_complete(void *ctx, HTC_PACKET *htc_pkt)
qdf_atomic_dec(&wmi_handle->pending_cmds);
}
#ifdef FEATURE_RUNTIME_PM
/**
* wmi_htc_log_pkt() - Print information of WMI command from HTC packet
*
* @ctx: handle of WMI context
* @htc_pkt: handle of HTC packet
*
* @Return: none
*/
static void wmi_htc_log_pkt(void *ctx, HTC_PACKET *htc_pkt)
{
wmi_buf_t wmi_cmd_buf = GET_HTC_PACKET_NET_BUF_CONTEXT(htc_pkt);
uint32_t cmd_id;
ASSERT(wmi_cmd_buf);
cmd_id = WMI_GET_FIELD(qdf_nbuf_data(wmi_cmd_buf), WMI_CMD_HDR,
COMMANDID);
WMI_LOGI("WMI command from HTC packet: %s, ID: %d\n",
wmi_id_to_name(cmd_id), cmd_id);
}
#else
static void wmi_htc_log_pkt(void *ctx, HTC_PACKET *htc_pkt)
{
}
#endif
/**
* wmi_connect_pdev_htc_service() - WMI API to get connect to HTC service
*
@@ -2794,6 +2821,7 @@ static QDF_STATUS wmi_connect_pdev_htc_service(struct wmi_soc *soc,
connect.EpCallbacks.EpSendFull = NULL /* ar6000_tx_queue_full */;
connect.EpCallbacks.EpTxComplete =
wmi_htc_tx_complete /* ar6000_tx_queue_full */;
connect.EpCallbacks.ep_log_pkt = wmi_htc_log_pkt;
/* connect to control service */
connect.service_id = soc->svc_ids[pdev_idx];