aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
diff options
context:
space:
mode:
authorMukesh Sisodiya <[email protected]>2023-10-04 09:36:32 +0000
committerJohannes Berg <[email protected]>2023-10-23 10:21:48 +0000
commit048449fc666d736a1a17d950fde0b5c5c8fd10cc (patch)
tree2e50692040448c32dc22b3f51357484f7cac3825 /drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
parentwifi: iwlwifi: mvm: advertise support for SCS traffic description (diff)
downloadkernel-048449fc666d736a1a17d950fde0b5c5c8fd10cc.tar.gz
kernel-048449fc666d736a1a17d950fde0b5c5c8fd10cc.zip
wifi: iwlwifi: fw: Fix debugfs command sending
During debugfs command handling transport function is used directly, this bypasses the locking used by runtime operation function and leads to a kernel warning when two commands are sent in parallel. Fix it by using runtime operations function when sending debugfs command. Signed-off-by: Mukesh Sisodiya <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20231004123422.4f80ac90658a.Ia1dfa1195c919f3002fe08db3eefbd2bfa921bbf@changeid Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/debugfs.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/debugfs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
index b8d4a4d571e7..751a125a1566 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
@@ -141,7 +141,11 @@ static int iwl_dbgfs_enabled_severities_write(struct iwl_fw_runtime *fwrt,
event_cfg.enabled_severities = cpu_to_le32(enabled_severities);
- ret = iwl_trans_send_cmd(fwrt->trans, &hcmd);
+ if (fwrt->ops && fwrt->ops->send_hcmd)
+ ret = fwrt->ops->send_hcmd(fwrt->ops_ctx, &hcmd);
+ else
+ ret = -EPERM;
+
IWL_INFO(fwrt,
"sent host event cfg with enabled_severities: %u, ret: %d\n",
enabled_severities, ret);