mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 18:46:44 +07:00
iwlwifi: set default timstamp marker cmd
In case debug configuration is started with LDBG cmd also start timestamp marker for syncing logs witn the FW. Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
b0c9835c88
commit
759931c79f
@ -68,6 +68,7 @@
|
||||
#include "iwl-drv.h"
|
||||
#include "runtime.h"
|
||||
#include "dbg.h"
|
||||
#include "debugfs.h"
|
||||
#include "iwl-io.h"
|
||||
#include "iwl-prph.h"
|
||||
#include "iwl-csr.h"
|
||||
@ -1080,6 +1081,9 @@ int iwl_fw_start_dbg_conf(struct iwl_fw_runtime *fwrt, u8 conf_id)
|
||||
IWL_WARN(fwrt, "FW already configured (%d) - re-configuring\n",
|
||||
fwrt->dump.conf);
|
||||
|
||||
/* start default config marker cmd for syncing logs */
|
||||
iwl_fw_trigger_timestamp(fwrt, 1);
|
||||
|
||||
/* Send all HCMDs for configuring the FW debug */
|
||||
ptr = (void *)&fwrt->fw->dbg_conf_tlv[conf_id]->hcmd;
|
||||
for (i = 0; i < fwrt->fw->dbg_conf_tlv[conf_id]->num_of_hcmds; i++) {
|
||||
|
@ -157,6 +157,20 @@ static void iwl_fw_timestamp_marker_wk(struct work_struct *work)
|
||||
ret, jiffies_to_msecs(delay) / 1000);
|
||||
}
|
||||
|
||||
void iwl_fw_trigger_timestamp(struct iwl_fw_runtime *fwrt, u32 delay)
|
||||
{
|
||||
IWL_INFO(fwrt,
|
||||
"starting timestamp_marker trigger with delay: %us\n",
|
||||
delay);
|
||||
|
||||
iwl_fw_cancel_timestamp(fwrt);
|
||||
|
||||
fwrt->timestamp.delay = msecs_to_jiffies(delay * 1000);
|
||||
|
||||
schedule_delayed_work(&fwrt->timestamp.wk,
|
||||
round_jiffies_relative(fwrt->timestamp.delay));
|
||||
}
|
||||
|
||||
static ssize_t iwl_dbgfs_timestamp_marker_write(struct iwl_fw_runtime *fwrt,
|
||||
char *buf, size_t count,
|
||||
loff_t *ppos)
|
||||
@ -168,16 +182,8 @@ static ssize_t iwl_dbgfs_timestamp_marker_write(struct iwl_fw_runtime *fwrt,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
IWL_INFO(fwrt,
|
||||
"starting timestamp_marker trigger with delay: %us\n",
|
||||
delay);
|
||||
iwl_fw_trigger_timestamp(fwrt, delay);
|
||||
|
||||
iwl_fw_cancel_timestamp(fwrt);
|
||||
|
||||
fwrt->timestamp.delay = msecs_to_jiffies(delay * 1000);
|
||||
|
||||
schedule_delayed_work(&fwrt->timestamp.wk,
|
||||
round_jiffies_relative(fwrt->timestamp.delay));
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -89,6 +89,8 @@ static inline void iwl_fw_resume_timestamp(struct iwl_fw_runtime *fwrt)
|
||||
round_jiffies_relative(fwrt->timestamp.delay));
|
||||
}
|
||||
|
||||
void iwl_fw_trigger_timestamp(struct iwl_fw_runtime *fwrt, u32 delay);
|
||||
|
||||
#else
|
||||
static inline int iwl_fwrt_dbgfs_register(struct iwl_fw_runtime *fwrt,
|
||||
struct dentry *dbgfs_dir)
|
||||
@ -102,4 +104,7 @@ static inline void iwl_fw_suspend_timestamp(struct iwl_fw_runtime *fwrt) {}
|
||||
|
||||
static inline void iwl_fw_resume_timestamp(struct iwl_fw_runtime *fwrt) {}
|
||||
|
||||
static inline void iwl_fw_trigger_timestamp(struct iwl_fw_runtime *fwrt,
|
||||
u32 delay) {}
|
||||
|
||||
#endif /* CONFIG_IWLWIFI_DEBUGFS */
|
||||
|
Loading…
Reference in New Issue
Block a user