summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2021-08-05 14:21:51 +0300
committerLuca Coelho <luciano.coelho@intel.com>2021-08-26 23:36:09 +0300
commit5bf7a9edddbb9d7c7deae58663aedd4dbc731a9e (patch)
treea31a97a522e199bc2dc684e6b8f3c8c79b0f7d19 /drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
parentde95c9288ae15b53be63e52097fe0d5b374e6a13 (diff)
downloadlinux-5bf7a9edddbb9d7c7deae58663aedd4dbc731a9e.tar.xz
iwlwifi: convert flat GEO profile table to a struct version
The GEO profiles have been stored in single-dimension arrays and the access has been done via a single index. We will soon need to support different revisions of this table, which will make the flat array even harder to handle. To prepare for that, convert the single-dimension array to a struct with substructures. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210805141826.56f3506411a2.I600ed3708d19f2263a5a8d143f6711d08499bbb0@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index 95f883aba148..5dc39fbb74d6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -305,7 +305,6 @@ static ssize_t iwl_dbgfs_sar_geo_profile_read(struct file *file,
int pos = 0;
int bufsz = sizeof(buf);
int tbl_idx;
- u8 *value;
if (!iwl_mvm_firmware_running(mvm))
return -EIO;
@@ -321,16 +320,18 @@ static ssize_t iwl_dbgfs_sar_geo_profile_read(struct file *file,
pos = scnprintf(buf, bufsz,
"SAR geographic profile disabled\n");
} else {
- value = &mvm->fwrt.geo_profiles[tbl_idx - 1].values[0];
-
pos += scnprintf(buf + pos, bufsz - pos,
"Use geographic profile %d\n", tbl_idx);
pos += scnprintf(buf + pos, bufsz - pos,
"2.4GHz:\n\tChain A offset: %hhu dBm\n\tChain B offset: %hhu dBm\n\tmax tx power: %hhu dBm\n",
- value[1], value[2], value[0]);
+ mvm->fwrt.geo_profiles[tbl_idx - 1].bands[0].chains[0],
+ mvm->fwrt.geo_profiles[tbl_idx - 1].bands[0].chains[1],
+ mvm->fwrt.geo_profiles[tbl_idx - 1].bands[0].max);
pos += scnprintf(buf + pos, bufsz - pos,
"5.2GHz:\n\tChain A offset: %hhu dBm\n\tChain B offset: %hhu dBm\n\tmax tx power: %hhu dBm\n",
- value[4], value[5], value[3]);
+ mvm->fwrt.geo_profiles[tbl_idx - 1].bands[1].chains[0],
+ mvm->fwrt.geo_profiles[tbl_idx - 1].bands[1].chains[1],
+ mvm->fwrt.geo_profiles[tbl_idx - 1].bands[1].max);
}
mutex_unlock(&mvm->mutex);