From cc14ff656c51f8f115d72bef4ff565c04ec9b0a2 Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Mon, 19 Apr 2021 16:05:37 -0700 Subject: [PATCH] qcacmn: Add debug logs in cp_stats event path In the issue reported, the clear stats request from the user space is timing out because event id from firmware is not received. From the logs it is not clear whether host driver received it or dropped it in the error path. Add debug logs, to make sure cp_stats event id is received in the host driver and also in error cases. Change-Id: I634714281db4a82826791725ec38fd589334cde8 CRs-Fixed: 2926978 --- target_if/cp_stats/src/target_if_cp_stats.c | 2 ++ wmi/src/wmi_unified_cp_stats_tlv.c | 4 +++- wmi/src/wmi_unified_tlv.c | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/target_if/cp_stats/src/target_if_cp_stats.c b/target_if/cp_stats/src/target_if_cp_stats.c index 2ebdfbf2e2d5..97f94bbf2403 100644 --- a/target_if/cp_stats/src/target_if_cp_stats.c +++ b/target_if/cp_stats/src/target_if_cp_stats.c @@ -168,6 +168,8 @@ int target_if_infra_cp_stats_event_handler(ol_scn_t scn, uint8_t *data, struct wmi_unified *wmi_handle; struct wlan_lmac_if_cp_stats_rx_ops *rx_ops; + cp_stats_debug("Enter"); + if (!scn || !data) { cp_stats_err("scn: 0x%pK, data: 0x%pK", scn, data); return -EINVAL; diff --git a/wmi/src/wmi_unified_cp_stats_tlv.c b/wmi/src/wmi_unified_cp_stats_tlv.c index 8569f96f95a2..a8fbd45aa18e 100644 --- a/wmi/src/wmi_unified_cp_stats_tlv.c +++ b/wmi/src/wmi_unified_cp_stats_tlv.c @@ -135,8 +135,10 @@ QDF_STATUS wmi_stats_handler(void *buff, int32_t len, uint8_t *tag_start_ptr; param_buf = (WMI_CTRL_PATH_STATS_EVENTID_param_tlvs *)buff; - if (!param_buf) + if (!param_buf) { + wmi_err_rl("param_buf is NULL"); return QDF_STATUS_E_FAILURE; + } ev = (wmi_ctrl_path_stats_event_fixed_param *)param_buf->fixed_param; curr_tlv_tag = WMITLV_GET_TLVTAG(ev->tlv_header); diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 9b08472e02a7..d98fd0b5a3c8 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -4803,8 +4803,10 @@ extract_cp_stats_more_pending_tlv(wmi_unified_t wmi, void *evt_buf, wmi_ctrl_path_stats_event_fixed_param *ev; param_buf = (WMI_CTRL_PATH_STATS_EVENTID_param_tlvs *)evt_buf; - if (!param_buf) + if (!param_buf) { + wmi_err_rl("param_buf is NULL"); return QDF_STATUS_E_FAILURE; + } ev = (wmi_ctrl_path_stats_event_fixed_param *)param_buf->fixed_param; *more_flag = ev->more;