summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShahar S Matityahu <shahar.s.matityahu@intel.com>2019-01-13 09:02:15 +0100
committerLuca Coelho <luciano.coelho@intel.com>2019-02-14 10:29:50 +0100
commit159133c8247295750320292ac7749e79603ef2e9 (patch)
treed5c30e35b8f85f0f5bf52253df74e48fdddb2509
parentiwlwifi: start using B-step for some 9000 devices (diff)
downloadlinux-159133c8247295750320292ac7749e79603ef2e9.tar.xz
linux-159133c8247295750320292ac7749e79603ef2e9.zip
iwlwifi: properly use delay option in dump trigger flow
Fix several issues related to dump delay: 1. In legacy dump trigger, use stop_delay field instead of trig_dis_ms. 2. ini delay is messured in usec so align both ini and legacy to usec. 3. schedule_delayed_work receives the delay value in jiffies so translate the dump delay to jiffies. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Fixes: ea7cb8293874 ("iwlwifi: dbg: make trigger functions type agnostic") Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/dbg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index 3b3692473702..8d1416e8a203 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -1621,7 +1621,7 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,
fwrt->dump.desc = desc;
fwrt->dump.monitor_only = monitor_only;
- schedule_delayed_work(&fwrt->dump.wk, delay);
+ schedule_delayed_work(&fwrt->dump.wk, usecs_to_jiffies(delay));
return 0;
}
@@ -1677,8 +1677,10 @@ int _iwl_fw_dbg_collect(struct iwl_fw_runtime *fwrt,
}
trigger->occurrences = cpu_to_le16(occurrences);
- delay = le16_to_cpu(trigger->trig_dis_ms);
monitor_only = trigger->mode & IWL_FW_DBG_TRIGGER_MONITOR_ONLY;
+
+ /* convert msec to usec */
+ delay = le32_to_cpu(trigger->stop_delay) * USEC_PER_MSEC;
}
desc = kzalloc(sizeof(*desc) + len, GFP_ATOMIC);