Skip to content

Commit 0bef1b8

Browse files
matt680209lucacoelho
authored andcommitted
iwlwifi: mvm: don't send CTDP commands via debugfs if not supported
Fix this issue if it is not supported by the firmware. Fixes: 00f481b ("iwlwifi: mvm: add ctdp operations to debugfs") Signed-off-by: Matt Chen <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
1 parent 6ca33f8 commit 0bef1b8

File tree

1 file changed

+6
-0
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+6
-0
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ static ssize_t iwl_dbgfs_ctdp_budget_read(struct file *file,
8282
char buf[16];
8383
int pos, budget;
8484

85+
if (!iwl_mvm_is_ctdp_supported(mvm))
86+
return -EOPNOTSUPP;
87+
8588
if (!iwl_mvm_firmware_running(mvm) ||
8689
mvm->fwrt.cur_fw_img != IWL_UCODE_REGULAR)
8790
return -EIO;
@@ -103,6 +106,9 @@ static ssize_t iwl_dbgfs_stop_ctdp_write(struct iwl_mvm *mvm, char *buf,
103106
{
104107
int ret;
105108

109+
if (!iwl_mvm_is_ctdp_supported(mvm))
110+
return -EOPNOTSUPP;
111+
106112
if (!iwl_mvm_firmware_running(mvm) ||
107113
mvm->fwrt.cur_fw_img != IWL_UCODE_REGULAR)
108114
return -EIO;

0 commit comments

Comments
 (0)