Commit 98a7b43b authored by Wey-Yi Guy's avatar Wey-Yi Guy Committed by John W. Linville

iwlwifi: align tx/rx statistics debugfs format

Align the format for tx_statistics and rx_statistics debugfs output for
better readability
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ae16fc3c
...@@ -131,21 +131,22 @@ static ssize_t iwl_dbgfs_tx_statistics_read(struct file *file, ...@@ -131,21 +131,22 @@ static ssize_t iwl_dbgfs_tx_statistics_read(struct file *file,
int cnt; int cnt;
ssize_t ret; ssize_t ret;
const size_t bufsz = 100 + sizeof(char) * 24 * (MANAGEMENT_MAX + CONTROL_MAX); const size_t bufsz = 100 +
sizeof(char) * 50 * (MANAGEMENT_MAX + CONTROL_MAX);
buf = kzalloc(bufsz, GFP_KERNEL); buf = kzalloc(bufsz, GFP_KERNEL);
if (!buf) if (!buf)
return -ENOMEM; return -ENOMEM;
pos += scnprintf(buf + pos, bufsz - pos, "Management:\n"); pos += scnprintf(buf + pos, bufsz - pos, "Management:\n");
for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) { for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) {
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
"\t%s\t\t: %u\n", "\t%25s\t\t: %u\n",
get_mgmt_string(cnt), get_mgmt_string(cnt),
priv->tx_stats.mgmt[cnt]); priv->tx_stats.mgmt[cnt]);
} }
pos += scnprintf(buf + pos, bufsz - pos, "Control\n"); pos += scnprintf(buf + pos, bufsz - pos, "Control\n");
for (cnt = 0; cnt < CONTROL_MAX; cnt++) { for (cnt = 0; cnt < CONTROL_MAX; cnt++) {
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
"\t%s\t\t: %u\n", "\t%25s\t\t: %u\n",
get_ctrl_string(cnt), get_ctrl_string(cnt),
priv->tx_stats.ctrl[cnt]); priv->tx_stats.ctrl[cnt]);
} }
...@@ -190,7 +191,7 @@ static ssize_t iwl_dbgfs_rx_statistics_read(struct file *file, ...@@ -190,7 +191,7 @@ static ssize_t iwl_dbgfs_rx_statistics_read(struct file *file,
int cnt; int cnt;
ssize_t ret; ssize_t ret;
const size_t bufsz = 100 + const size_t bufsz = 100 +
sizeof(char) * 24 * (MANAGEMENT_MAX + CONTROL_MAX); sizeof(char) * 50 * (MANAGEMENT_MAX + CONTROL_MAX);
buf = kzalloc(bufsz, GFP_KERNEL); buf = kzalloc(bufsz, GFP_KERNEL);
if (!buf) if (!buf)
return -ENOMEM; return -ENOMEM;
...@@ -198,14 +199,14 @@ static ssize_t iwl_dbgfs_rx_statistics_read(struct file *file, ...@@ -198,14 +199,14 @@ static ssize_t iwl_dbgfs_rx_statistics_read(struct file *file,
pos += scnprintf(buf + pos, bufsz - pos, "Management:\n"); pos += scnprintf(buf + pos, bufsz - pos, "Management:\n");
for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) { for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) {
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
"\t%s\t\t: %u\n", "\t%25s\t\t: %u\n",
get_mgmt_string(cnt), get_mgmt_string(cnt),
priv->rx_stats.mgmt[cnt]); priv->rx_stats.mgmt[cnt]);
} }
pos += scnprintf(buf + pos, bufsz - pos, "Control:\n"); pos += scnprintf(buf + pos, bufsz - pos, "Control:\n");
for (cnt = 0; cnt < CONTROL_MAX; cnt++) { for (cnt = 0; cnt < CONTROL_MAX; cnt++) {
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
"\t%s\t\t: %u\n", "\t%25s\t\t: %u\n",
get_ctrl_string(cnt), get_ctrl_string(cnt),
priv->rx_stats.ctrl[cnt]); priv->rx_stats.ctrl[cnt]);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment