]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
iwlwifi: enable reading the value of delay in timestamp_marker cmd
authorMordechay Goodstein <mordechay.goodstein@intel.com>
Mon, 9 Apr 2018 12:52:16 +0000 (15:52 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 31 Aug 2018 08:38:23 +0000 (11:38 +0300)
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>
drivers/net/wireless/intel/iwlwifi/fw/debugfs.c

index 2dd534b474b802b661dd1ad82a18f7c482dc46a7..c1f087c50cc9df19de08814781ce9cb7499624aa 100644 (file)
@@ -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)