Revert "qcacmn: Hex dump generation for WMI events and cmds"
This reverts Change-Id: I18e46f683e35912cad717ca3b9cc3d1885315362 Change-Id: I2fffecdee294f08e694b12a744d35cf18d3fd66b
This commit is contained in:
@@ -176,7 +176,6 @@ void qdf_debugfs_hexdump(qdf_debugfs_file_t file, const uint8_t *buf,
|
|||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
qdf_export_symbol(qdf_debugfs_hexdump);
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
void qdf_debugfs_hexdump(qdf_debugfs_file_t file, const uint8_t *buf,
|
void qdf_debugfs_hexdump(qdf_debugfs_file_t file, const uint8_t *buf,
|
||||||
@@ -204,7 +203,6 @@ void qdf_debugfs_hexdump(qdf_debugfs_file_t file, const uint8_t *buf,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qdf_export_symbol(qdf_debugfs_hexdump);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool qdf_debugfs_overflow(qdf_debugfs_file_t file)
|
bool qdf_debugfs_overflow(qdf_debugfs_file_t file)
|
||||||
@@ -212,8 +210,6 @@ bool qdf_debugfs_overflow(qdf_debugfs_file_t file)
|
|||||||
return seq_has_overflowed(file);
|
return seq_has_overflowed(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
qdf_export_symbol(qdf_debugfs_overflow);
|
|
||||||
|
|
||||||
void qdf_debugfs_write(qdf_debugfs_file_t file, const uint8_t *buf,
|
void qdf_debugfs_write(qdf_debugfs_file_t file, const uint8_t *buf,
|
||||||
qdf_size_t len)
|
qdf_size_t len)
|
||||||
{
|
{
|
||||||
|
@@ -2939,6 +2939,33 @@ static inline void wmi_ext_dbg_msg_put(struct wmi_ext_dbg_msg *msg)
|
|||||||
qdf_mem_free(msg);
|
qdf_mem_free(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
static inline QDF_STATUS wmi_ext_dbg_msg_cmd_record(struct wmi_unified
|
||||||
|
*wmi_handle,
|
||||||
|
uint8_t *buf, uint32_t len)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS wmi_ext_dbg_msg_event_record(struct wmi_unified
|
||||||
|
*wmi_handle,
|
||||||
|
uint8_t *buf,
|
||||||
|
uint32_t len)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS wmi_ext_dbgfs_init(struct wmi_unified *wmi_handle)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS wmi_ext_dbgfs_deinit(struct wmi_unified *wmi_handle)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /*WMI_EXT_DBG */
|
#endif /*WMI_EXT_DBG */
|
||||||
|
|
||||||
#ifdef WLAN_CFR_ENABLE
|
#ifdef WLAN_CFR_ENABLE
|
||||||
|
@@ -534,45 +534,33 @@ static QDF_STATUS wmi_ext_dbg_msg_write(void *priv, const char *buf,
|
|||||||
return QDF_STATUS_E_NOSUPPORT;
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct qdf_debugfs_fops wmi_ext_dbgfs_ops[WMI_MAX_RADIOS];
|
static struct qdf_debugfs_fops wmi_ext_dbgfs_ops = {
|
||||||
|
.show = wmi_ext_dbg_msg_show,
|
||||||
|
.write = wmi_ext_dbg_msg_write,
|
||||||
|
.priv = NULL,
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wmi_ext_debugfs_init() - init debugfs items for extended wmi dump.
|
* wmi_ext_debugfs_init() - init debugfs items for extended wmi dump.
|
||||||
*
|
*
|
||||||
* @wmi_handle: wmi handler
|
* @wmi_handle: wmi handler
|
||||||
* @pdev_idx: pdev index
|
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS_SUCCESS if debugfs is initialized else
|
* Return: QDF_STATUS_SUCCESS if debugfs is initialized else
|
||||||
* QDF_STATUS_E_FAILURE
|
* QDF_STATUS_E_FAILURE
|
||||||
*/
|
*/
|
||||||
static QDF_STATUS wmi_ext_dbgfs_init(struct wmi_unified *wmi_handle,
|
static QDF_STATUS wmi_ext_dbgfs_init(struct wmi_unified *wmi_handle)
|
||||||
uint32_t pdev_idx)
|
|
||||||
{
|
{
|
||||||
qdf_dentry_t dentry;
|
qdf_dentry_t dentry;
|
||||||
char buf[32];
|
|
||||||
|
|
||||||
/* To maintain backward compatibility, naming convention for PDEV 0
|
|
||||||
* dentry is kept same as before. For more than 1 PDEV, dentry
|
|
||||||
* names will be appended with PDEVx.
|
|
||||||
*/
|
|
||||||
if (wmi_handle->soc->soc_idx == 0 && pdev_idx == 0) {
|
|
||||||
dentry = qdf_debugfs_create_dir(WMI_EXT_DBG_DIR, NULL);
|
|
||||||
} else {
|
|
||||||
snprintf(buf, sizeof(buf), "WMI_EXT_DBG_SOC%u_PDEV%u",
|
|
||||||
wmi_handle->soc->soc_idx, pdev_idx);
|
|
||||||
dentry = qdf_debugfs_create_dir(buf, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
dentry = qdf_debugfs_create_dir(WMI_EXT_DBG_DIR, NULL);
|
||||||
if (!dentry) {
|
if (!dentry) {
|
||||||
WMI_LOGE("error while creating extended wmi debugfs dir");
|
WMI_LOGE("error while creating extended wmi debugfs dir");
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wmi_ext_dbgfs_ops[pdev_idx].show = wmi_ext_dbg_msg_show;
|
wmi_ext_dbgfs_ops.priv = wmi_handle;
|
||||||
wmi_ext_dbgfs_ops[pdev_idx].write = wmi_ext_dbg_msg_write;
|
|
||||||
wmi_ext_dbgfs_ops[pdev_idx].priv = wmi_handle;
|
|
||||||
if (!qdf_debugfs_create_file(WMI_EXT_DBG_FILE, WMI_EXT_DBG_FILE_PERM,
|
if (!qdf_debugfs_create_file(WMI_EXT_DBG_FILE, WMI_EXT_DBG_FILE_PERM,
|
||||||
dentry, &wmi_ext_dbgfs_ops[pdev_idx])) {
|
dentry, &wmi_ext_dbgfs_ops)) {
|
||||||
qdf_debugfs_remove_dir(dentry);
|
qdf_debugfs_remove_dir(dentry);
|
||||||
WMI_LOGE("error while creating extended wmi debugfs file");
|
WMI_LOGE("error while creating extended wmi debugfs file");
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
@@ -605,34 +593,6 @@ static QDF_STATUS wmi_ext_dbgfs_deinit(struct wmi_unified *wmi_handle)
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
static inline QDF_STATUS wmi_ext_dbg_msg_cmd_record(struct wmi_unified
|
|
||||||
*wmi_handle,
|
|
||||||
uint8_t *buf, uint32_t len)
|
|
||||||
{
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline QDF_STATUS wmi_ext_dbg_msg_event_record(struct wmi_unified
|
|
||||||
*wmi_handle,
|
|
||||||
uint8_t *buf,
|
|
||||||
uint32_t len)
|
|
||||||
{
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline QDF_STATUS wmi_ext_dbgfs_init(struct wmi_unified *wmi_handle,
|
|
||||||
uint32_t pdev_idx)
|
|
||||||
{
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline QDF_STATUS wmi_ext_dbgfs_deinit(struct wmi_unified *wmi_handle)
|
|
||||||
{
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /*WMI_EXT_DBG */
|
#endif /*WMI_EXT_DBG */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2692,10 +2652,6 @@ void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx)
|
|||||||
wmi_handle->target_type = soc->target_type;
|
wmi_handle->target_type = soc->target_type;
|
||||||
wmi_handle->wmi_max_cmds = soc->wmi_max_cmds;
|
wmi_handle->wmi_max_cmds = soc->wmi_max_cmds;
|
||||||
|
|
||||||
if (wmi_ext_dbgfs_init(wmi_handle, pdev_idx) !=
|
|
||||||
QDF_STATUS_SUCCESS)
|
|
||||||
WMI_LOGE("failed to initialize wmi extended debugfs");
|
|
||||||
|
|
||||||
soc->wmi_pdev[pdev_idx] = wmi_handle;
|
soc->wmi_pdev[pdev_idx] = wmi_handle;
|
||||||
} else
|
} else
|
||||||
wmi_handle = soc->wmi_pdev[pdev_idx];
|
wmi_handle = soc->wmi_pdev[pdev_idx];
|
||||||
@@ -2843,7 +2799,7 @@ void *wmi_unified_attach(void *scn_handle,
|
|||||||
|
|
||||||
soc->ops = wmi_handle->ops;
|
soc->ops = wmi_handle->ops;
|
||||||
soc->wmi_pdev[0] = wmi_handle;
|
soc->wmi_pdev[0] = wmi_handle;
|
||||||
if (wmi_ext_dbgfs_init(wmi_handle, 0) != QDF_STATUS_SUCCESS)
|
if (wmi_ext_dbgfs_init(wmi_handle) != QDF_STATUS_SUCCESS)
|
||||||
WMI_LOGE("failed to initialize wmi extended debugfs");
|
WMI_LOGE("failed to initialize wmi extended debugfs");
|
||||||
|
|
||||||
wmi_wbuff_register(wmi_handle);
|
wmi_wbuff_register(wmi_handle);
|
||||||
@@ -2876,6 +2832,8 @@ void wmi_unified_detach(struct wmi_unified *wmi_handle)
|
|||||||
|
|
||||||
wmi_wbuff_deregister(wmi_handle);
|
wmi_wbuff_deregister(wmi_handle);
|
||||||
|
|
||||||
|
wmi_ext_dbgfs_deinit(wmi_handle);
|
||||||
|
|
||||||
soc = wmi_handle->soc;
|
soc = wmi_handle->soc;
|
||||||
for (i = 0; i < WMI_MAX_RADIOS; i++) {
|
for (i = 0; i < WMI_MAX_RADIOS; i++) {
|
||||||
if (soc->wmi_pdev[i]) {
|
if (soc->wmi_pdev[i]) {
|
||||||
@@ -2900,9 +2858,6 @@ void wmi_unified_detach(struct wmi_unified *wmi_handle)
|
|||||||
soc->wmi_pdev[i]->events_logs_list);
|
soc->wmi_pdev[i]->events_logs_list);
|
||||||
|
|
||||||
qdf_spinlock_destroy(&soc->wmi_pdev[i]->eventq_lock);
|
qdf_spinlock_destroy(&soc->wmi_pdev[i]->eventq_lock);
|
||||||
|
|
||||||
wmi_ext_dbgfs_deinit(soc->wmi_pdev[i]);
|
|
||||||
|
|
||||||
qdf_mem_free(soc->wmi_pdev[i]);
|
qdf_mem_free(soc->wmi_pdev[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user