iwlwifi: mvm: add debugfs hook to send ECHO_CMD to the firmware
ECHO_CMD is a simple command that can be sent to the firmware just to check that it is alive. This command is useful for debug purpose, provide a debugfs hook to send it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
62e004fe94
commit
e50460192e
@ -1361,11 +1361,25 @@ out:
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
iwl_dbgfs_send_echo_cmd_write(struct iwl_mvm *mvm, char *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
int ret;
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
ret = iwl_mvm_send_cmd_pdu(mvm, ECHO_CMD, 0, 0, NULL);
|
||||
mutex_unlock(&mvm->mutex);
|
||||
|
||||
return ret ?: count;
|
||||
}
|
||||
|
||||
MVM_DEBUGFS_READ_WRITE_FILE_OPS(prph_reg, 64);
|
||||
|
||||
/* Device wide debugfs entries */
|
||||
MVM_DEBUGFS_WRITE_FILE_OPS(tx_flush, 16);
|
||||
MVM_DEBUGFS_WRITE_FILE_OPS(sta_drain, 8);
|
||||
MVM_DEBUGFS_WRITE_FILE_OPS(send_echo_cmd, 8);
|
||||
MVM_DEBUGFS_READ_WRITE_FILE_OPS(sram, 64);
|
||||
MVM_DEBUGFS_READ_WRITE_FILE_OPS(set_nic_temperature, 64);
|
||||
MVM_DEBUGFS_READ_FILE_OPS(nic_temp);
|
||||
@ -1425,6 +1439,7 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir)
|
||||
MVM_DEBUGFS_ADD_FILE(d0i3_refs, mvm->debugfs_dir, S_IRUSR | S_IWUSR);
|
||||
MVM_DEBUGFS_ADD_FILE(fw_dbg_conf, mvm->debugfs_dir, S_IRUSR | S_IWUSR);
|
||||
MVM_DEBUGFS_ADD_FILE(fw_dbg_collect, mvm->debugfs_dir, S_IWUSR);
|
||||
MVM_DEBUGFS_ADD_FILE(send_echo_cmd, mvm->debugfs_dir, S_IWUSR);
|
||||
if (!debugfs_create_bool("enable_scan_iteration_notif",
|
||||
S_IRUSR | S_IWUSR,
|
||||
mvm->debugfs_dir,
|
||||
|
@ -100,6 +100,7 @@ enum iwl_mvm_tx_fifo {
|
||||
enum {
|
||||
MVM_ALIVE = 0x1,
|
||||
REPLY_ERROR = 0x2,
|
||||
ECHO_CMD = 0x3,
|
||||
|
||||
INIT_COMPLETE_NOTIF = 0x4,
|
||||
|
||||
|
@ -271,6 +271,7 @@ static const struct iwl_rx_handlers iwl_mvm_rx_handlers[] = {
|
||||
static const char *const iwl_mvm_cmd_strings[REPLY_MAX + 1] = {
|
||||
CMD(MVM_ALIVE),
|
||||
CMD(REPLY_ERROR),
|
||||
CMD(ECHO_CMD),
|
||||
CMD(INIT_COMPLETE_NOTIF),
|
||||
CMD(PHY_CONTEXT_CMD),
|
||||
CMD(MGMT_MCAST_KEY),
|
||||
|
Loading…
Reference in New Issue
Block a user