aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/debugfs.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/debugfs.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
index 893b21fcaf87..e79fdb5fe387 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/*
- * Copyright (C) 2012-2014, 2018-2023 Intel Corporation
+ * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
* Copyright (C) 2016-2017 Intel Deutschland GmbH
*/
@@ -282,6 +282,26 @@ static ssize_t iwl_dbgfs_fw_dbg_domain_read(struct iwl_fw_runtime *fwrt,
FWRT_DEBUGFS_READ_FILE_OPS(fw_dbg_domain, 20);
+static ssize_t iwl_dbgfs_fw_ver_read(struct iwl_fw_runtime *fwrt,
+ size_t size, char *buf)
+{
+ char *pos = buf;
+ char *endpos = buf + size;
+
+ pos += scnprintf(pos, endpos - pos, "FW id: %s\n",
+ fwrt->fw->fw_version);
+ pos += scnprintf(pos, endpos - pos, "FW: %s\n",
+ fwrt->fw->human_readable);
+ pos += scnprintf(pos, endpos - pos, "Device: %s\n",
+ fwrt->trans->name);
+ pos += scnprintf(pos, endpos - pos, "Bus: %s\n",
+ fwrt->dev->bus->name);
+
+ return pos - buf;
+}
+
+FWRT_DEBUGFS_READ_FILE_OPS(fw_ver, 1024);
+
struct iwl_dbgfs_fw_info_priv {
struct iwl_fw_runtime *fwrt;
};
@@ -404,4 +424,5 @@ void iwl_fwrt_dbgfs_register(struct iwl_fw_runtime *fwrt,
FWRT_DEBUGFS_ADD_FILE(send_hcmd, dbgfs_dir, 0200);
FWRT_DEBUGFS_ADD_FILE(enabled_severities, dbgfs_dir, 0200);
FWRT_DEBUGFS_ADD_FILE(fw_dbg_domain, dbgfs_dir, 0400);
+ FWRT_DEBUGFS_ADD_FILE(fw_ver, dbgfs_dir, 0400);
}