iwlwifi: move firmware restart debugfs hook to op_mode
This allows to test fw restart flow. The hook in transport layer doesn't really make the fw assert. Moving this hook to the op_mode allows to use the fw API to actually send a host command that will make the fw assert. Change the restart_fw module parameter to be a boolean on the way. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committato da
Johannes Berg

parent
6bfcb7e88c
commit
490953ac34
@@ -1370,28 +1370,11 @@ static ssize_t iwl_dbgfs_fh_reg_read(struct file *file,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t iwl_dbgfs_fw_restart_write(struct file *file,
|
||||
const char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct iwl_trans *trans = file->private_data;
|
||||
|
||||
if (!trans->op_mode)
|
||||
return -EAGAIN;
|
||||
|
||||
local_bh_disable();
|
||||
iwl_op_mode_nic_error(trans->op_mode);
|
||||
local_bh_enable();
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
DEBUGFS_READ_WRITE_FILE_OPS(interrupt);
|
||||
DEBUGFS_READ_FILE_OPS(fh_reg);
|
||||
DEBUGFS_READ_FILE_OPS(rx_queue);
|
||||
DEBUGFS_READ_FILE_OPS(tx_queue);
|
||||
DEBUGFS_WRITE_FILE_OPS(csr);
|
||||
DEBUGFS_WRITE_FILE_OPS(fw_restart);
|
||||
|
||||
/*
|
||||
* Create the debugfs files and directories
|
||||
@@ -1405,7 +1388,6 @@ static int iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans,
|
||||
DEBUGFS_ADD_FILE(interrupt, dir, S_IWUSR | S_IRUSR);
|
||||
DEBUGFS_ADD_FILE(csr, dir, S_IWUSR);
|
||||
DEBUGFS_ADD_FILE(fh_reg, dir, S_IRUSR);
|
||||
DEBUGFS_ADD_FILE(fw_restart, dir, S_IWUSR);
|
||||
return 0;
|
||||
|
||||
err:
|
||||
|
Fai riferimento in un nuovo problema
Block a user