diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2009-11-13 14:56:31 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-18 17:09:05 -0500 |
commit | 98a7b43be19faa7b92576c62614c45e38517331c (patch) | |
tree | 014495339b74df0f0da9edf9ec1ddb015d5249b8 /drivers/net | |
parent | ae16fc3c3184bf27f0462e1951df918122498829 (diff) |
iwlwifi: align tx/rx statistics debugfs format
Align the format for tx_statistics and rx_statistics debugfs output for
better readability
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 45a5edd1b1a7..ba9c96ff27ca 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -131,21 +131,22 @@ static ssize_t iwl_dbgfs_tx_statistics_read(struct file *file, | |||
131 | 131 | ||
132 | int cnt; | 132 | int cnt; |
133 | ssize_t ret; | 133 | ssize_t ret; |
134 | const size_t bufsz = 100 + sizeof(char) * 24 * (MANAGEMENT_MAX + CONTROL_MAX); | 134 | const size_t bufsz = 100 + |
135 | sizeof(char) * 50 * (MANAGEMENT_MAX + CONTROL_MAX); | ||
135 | buf = kzalloc(bufsz, GFP_KERNEL); | 136 | buf = kzalloc(bufsz, GFP_KERNEL); |
136 | if (!buf) | 137 | if (!buf) |
137 | return -ENOMEM; | 138 | return -ENOMEM; |
138 | pos += scnprintf(buf + pos, bufsz - pos, "Management:\n"); | 139 | pos += scnprintf(buf + pos, bufsz - pos, "Management:\n"); |
139 | for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) { | 140 | for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) { |
140 | pos += scnprintf(buf + pos, bufsz - pos, | 141 | pos += scnprintf(buf + pos, bufsz - pos, |
141 | "\t%s\t\t: %u\n", | 142 | "\t%25s\t\t: %u\n", |
142 | get_mgmt_string(cnt), | 143 | get_mgmt_string(cnt), |
143 | priv->tx_stats.mgmt[cnt]); | 144 | priv->tx_stats.mgmt[cnt]); |
144 | } | 145 | } |
145 | pos += scnprintf(buf + pos, bufsz - pos, "Control\n"); | 146 | pos += scnprintf(buf + pos, bufsz - pos, "Control\n"); |
146 | for (cnt = 0; cnt < CONTROL_MAX; cnt++) { | 147 | for (cnt = 0; cnt < CONTROL_MAX; cnt++) { |
147 | pos += scnprintf(buf + pos, bufsz - pos, | 148 | pos += scnprintf(buf + pos, bufsz - pos, |
148 | "\t%s\t\t: %u\n", | 149 | "\t%25s\t\t: %u\n", |
149 | get_ctrl_string(cnt), | 150 | get_ctrl_string(cnt), |
150 | priv->tx_stats.ctrl[cnt]); | 151 | priv->tx_stats.ctrl[cnt]); |
151 | } | 152 | } |
@@ -190,7 +191,7 @@ static ssize_t iwl_dbgfs_rx_statistics_read(struct file *file, | |||
190 | int cnt; | 191 | int cnt; |
191 | ssize_t ret; | 192 | ssize_t ret; |
192 | const size_t bufsz = 100 + | 193 | const size_t bufsz = 100 + |
193 | sizeof(char) * 24 * (MANAGEMENT_MAX + CONTROL_MAX); | 194 | sizeof(char) * 50 * (MANAGEMENT_MAX + CONTROL_MAX); |
194 | buf = kzalloc(bufsz, GFP_KERNEL); | 195 | buf = kzalloc(bufsz, GFP_KERNEL); |
195 | if (!buf) | 196 | if (!buf) |
196 | return -ENOMEM; | 197 | return -ENOMEM; |
@@ -198,14 +199,14 @@ static ssize_t iwl_dbgfs_rx_statistics_read(struct file *file, | |||
198 | pos += scnprintf(buf + pos, bufsz - pos, "Management:\n"); | 199 | pos += scnprintf(buf + pos, bufsz - pos, "Management:\n"); |
199 | for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) { | 200 | for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) { |
200 | pos += scnprintf(buf + pos, bufsz - pos, | 201 | pos += scnprintf(buf + pos, bufsz - pos, |
201 | "\t%s\t\t: %u\n", | 202 | "\t%25s\t\t: %u\n", |
202 | get_mgmt_string(cnt), | 203 | get_mgmt_string(cnt), |
203 | priv->rx_stats.mgmt[cnt]); | 204 | priv->rx_stats.mgmt[cnt]); |
204 | } | 205 | } |
205 | pos += scnprintf(buf + pos, bufsz - pos, "Control:\n"); | 206 | pos += scnprintf(buf + pos, bufsz - pos, "Control:\n"); |
206 | for (cnt = 0; cnt < CONTROL_MAX; cnt++) { | 207 | for (cnt = 0; cnt < CONTROL_MAX; cnt++) { |
207 | pos += scnprintf(buf + pos, bufsz - pos, | 208 | pos += scnprintf(buf + pos, bufsz - pos, |
208 | "\t%s\t\t: %u\n", | 209 | "\t%25s\t\t: %u\n", |
209 | get_ctrl_string(cnt), | 210 | get_ctrl_string(cnt), |
210 | priv->rx_stats.ctrl[cnt]); | 211 | priv->rx_stats.ctrl[cnt]); |
211 | } | 212 | } |