]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlwifi: properly use delay option in dump trigger flow
authorShahar S Matityahu <shahar.s.matityahu@intel.com>
Sun, 13 Jan 2019 08:02:15 +0000 (10:02 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 14 Feb 2019 09:29:50 +0000 (11:29 +0200)
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>
drivers/net/wireless/intel/iwlwifi/fw/dbg.c

index 3b369247370222090b25263b038909b09515b941..8d1416e8a2030c9fb8ce0f81f7847fa80a3649f3 100644 (file)
@@ -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);