aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
diff options
context:
space:
mode:
authorMordechay Goodstein <mordechay.goodstein@intel.com>2018-04-09 15:52:16 +0300
committerLuca Coelho <luciano.coelho@intel.com>2018-08-31 11:38:23 +0300
commit75e9947ea42de92ab330a9761bc6f5862720260d (patch)
treea7c78aeac8f53d136b8924e69f56a68a4e3a1137 /drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
parentiwlwifi: mvm: move he RX handling to a separate function (diff)
downloadlinux-dev-75e9947ea42de92ab330a9761bc6f5862720260d.tar.xz
linux-dev-75e9947ea42de92ab330a9761bc6f5862720260d.zip
iwlwifi: enable reading the value of delay in timestamp_marker cmd
The user can validate what was written to the file by reading it, and check what is the default value before changing it. Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/debugfs.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/debugfs.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
index 2dd534b474b8..c1f087c50cc9 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
@@ -251,7 +251,15 @@ static ssize_t iwl_dbgfs_timestamp_marker_write(struct iwl_fw_runtime *fwrt,
return count;
}
-FWRT_DEBUGFS_WRITE_FILE_OPS(timestamp_marker, 10);
+static ssize_t iwl_dbgfs_timestamp_marker_read(struct iwl_fw_runtime *fwrt,
+ size_t size, char *buf)
+{
+ u32 delay_secs = jiffies_to_msecs(fwrt->timestamp.delay) / 1000;
+
+ return scnprintf(buf, size, "%d\n", delay_secs);
+}
+
+FWRT_DEBUGFS_READ_WRITE_FILE_OPS(timestamp_marker, 16);
int iwl_fwrt_dbgfs_register(struct iwl_fw_runtime *fwrt,
struct dentry *dbgfs_dir)