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: ea7cb82938
("iwlwifi: dbg: make trigger functions type agnostic")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
81edb6ad93
commit
159133c824
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user