|
@@ -748,6 +748,53 @@ wmi_print_cmd_log_buffer(struct wmi_log_buf_t *log_buffer, uint32_t count,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * wmi_dump_last_cmd_rec_info() - last wmi command tx completion time print
|
|
|
|
+ * @wmi_handle: wmi handle
|
|
|
|
+ *
|
|
|
|
+ * Return: None
|
|
|
|
+ */
|
|
|
|
+static void
|
|
|
|
+wmi_dump_last_cmd_rec_info(wmi_unified_t wmi_handle) {
|
|
|
|
+ uint32_t idx, idx_tx_cmp, cmd_tmp_log, cmd_tmp_tx_cmp;
|
|
|
|
+ uint64_t secs, secs_tx_cmp, usecs, usecs_tx_cmp;
|
|
|
|
+ struct wmi_command_debug *cmd_log;
|
|
|
|
+ struct wmi_command_debug *cmd_log_tx_cmp;
|
|
|
|
+ struct wmi_log_buf_t *log_buf =
|
|
|
|
+ &wmi_handle->log_info.wmi_command_log_buf_info;
|
|
|
|
+ struct wmi_log_buf_t *log_buf_tx_cmp =
|
|
|
|
+ &wmi_handle->log_info.wmi_command_tx_cmp_log_buf_info;
|
|
|
|
+
|
|
|
|
+ qdf_spin_lock_bh(&wmi_handle->log_info.wmi_record_lock);
|
|
|
|
+
|
|
|
|
+ (*log_buf->p_buf_tail_idx == 0) ? (idx = log_buf->size) :
|
|
|
|
+ (idx = *log_buf->p_buf_tail_idx - 1);
|
|
|
|
+ idx %= log_buf->size;
|
|
|
|
+
|
|
|
|
+ (*log_buf_tx_cmp->p_buf_tail_idx == 0) ? (idx_tx_cmp =
|
|
|
|
+ log_buf_tx_cmp->size) : (idx_tx_cmp =
|
|
|
|
+ *log_buf_tx_cmp->p_buf_tail_idx - 1);
|
|
|
|
+ idx_tx_cmp %= log_buf_tx_cmp->size;
|
|
|
|
+ cmd_log = &((struct wmi_command_debug *)log_buf->buf)[idx];
|
|
|
|
+ cmd_log_tx_cmp = &((struct wmi_command_debug *)log_buf_tx_cmp->buf)
|
|
|
|
+ [idx_tx_cmp];
|
|
|
|
+ cmd_tmp_log = cmd_log->command;
|
|
|
|
+ cmd_tmp_tx_cmp = cmd_log_tx_cmp->command;
|
|
|
|
+ qdf_log_timestamp_to_secs(cmd_log->time, &secs, &usecs);
|
|
|
|
+ qdf_log_timestamp_to_secs(cmd_log_tx_cmp->time, &secs_tx_cmp,
|
|
|
|
+ &usecs_tx_cmp);
|
|
|
|
+
|
|
|
|
+ qdf_spin_unlock_bh(&wmi_handle->log_info.wmi_record_lock);
|
|
|
|
+
|
|
|
|
+ wmi_nofl_err("Last wmi command Time (s) = % 8lld.%06lld ",
|
|
|
|
+ secs, usecs);
|
|
|
|
+ wmi_nofl_err("Last wmi Cmd_Id = (0x%06x) ", cmd_tmp_log);
|
|
|
|
+ wmi_nofl_err("Last wmi command tx completion Time (s) = % 8lld.%06lld",
|
|
|
|
+ secs_tx_cmp, usecs_tx_cmp);
|
|
|
|
+ wmi_nofl_err("Last wmi command tx completion Cmd_Id = (0x%06x) ",
|
|
|
|
+ cmd_tmp_tx_cmp);
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* wmi_print_cmd_cmp_log_buffer() - wmi command completion log printer
|
|
* wmi_print_cmd_cmp_log_buffer() - wmi command completion log printer
|
|
* @log_buffer: the command completion log buffer metadata of the buffer to print
|
|
* @log_buffer: the command completion log buffer metadata of the buffer to print
|
|
@@ -1394,6 +1441,7 @@ void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd,
|
|
static inline void wmi_log_buffer_free(struct wmi_unified *wmi_handle) { }
|
|
static inline void wmi_log_buffer_free(struct wmi_unified *wmi_handle) { }
|
|
static void wmi_minidump_detach(struct wmi_unified *wmi_handle) { }
|
|
static void wmi_minidump_detach(struct wmi_unified *wmi_handle) { }
|
|
static void wmi_minidump_attach(struct wmi_unified *wmi_handle) { }
|
|
static void wmi_minidump_attach(struct wmi_unified *wmi_handle) { }
|
|
|
|
+static void wmi_dump_last_cmd_rec_info(wmi_unified_t wmi_handle) { }
|
|
#endif /*WMI_INTERFACE_EVENT_LOGGING */
|
|
#endif /*WMI_INTERFACE_EVENT_LOGGING */
|
|
qdf_export_symbol(wmi_mgmt_cmd_record);
|
|
qdf_export_symbol(wmi_mgmt_cmd_record);
|
|
|
|
|
|
@@ -2077,6 +2125,7 @@ QDF_STATUS wmi_unified_cmd_send_fl(wmi_unified_t wmi_handle, wmi_buf_t buf,
|
|
qdf_atomic_inc(&wmi_handle->pending_cmds);
|
|
qdf_atomic_inc(&wmi_handle->pending_cmds);
|
|
if (qdf_atomic_read(&wmi_handle->pending_cmds) >=
|
|
if (qdf_atomic_read(&wmi_handle->pending_cmds) >=
|
|
wmi_handle->wmi_max_cmds) {
|
|
wmi_handle->wmi_max_cmds) {
|
|
|
|
+ wmi_dump_last_cmd_rec_info(wmi_handle);
|
|
wmi_nofl_err("hostcredits = %d",
|
|
wmi_nofl_err("hostcredits = %d",
|
|
wmi_get_host_credits(wmi_handle));
|
|
wmi_get_host_credits(wmi_handle));
|
|
htc_dump_counter_info(wmi_handle->htc_handle);
|
|
htc_dump_counter_info(wmi_handle->htc_handle);
|