mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
iwlwifi: mvm: don't send CTDP commands via debugfs if not supported
Fix this issue if it is not supported by the firmware.
Fixes: 00f481bd89 ("iwlwifi: mvm: add ctdp operations to debugfs")
Signed-off-by: Matt Chen <matt.chen@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
6ca33f8bae
commit
0bef1b83d3
|
|
@ -82,6 +82,9 @@ static ssize_t iwl_dbgfs_ctdp_budget_read(struct file *file,
|
|||
char buf[16];
|
||||
int pos, budget;
|
||||
|
||||
if (!iwl_mvm_is_ctdp_supported(mvm))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!iwl_mvm_firmware_running(mvm) ||
|
||||
mvm->fwrt.cur_fw_img != IWL_UCODE_REGULAR)
|
||||
return -EIO;
|
||||
|
|
@ -103,6 +106,9 @@ static ssize_t iwl_dbgfs_stop_ctdp_write(struct iwl_mvm *mvm, char *buf,
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (!iwl_mvm_is_ctdp_supported(mvm))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!iwl_mvm_firmware_running(mvm) ||
|
||||
mvm->fwrt.cur_fw_img != IWL_UCODE_REGULAR)
|
||||
return -EIO;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user