aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJay Sternberg <jay.e.sternberg@intel.com>2010-09-08 12:42:35 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-09-17 16:18:30 -0400
commit0b7e5e85b0317f06d92704a5be42cc101a552ab5 (patch)
tree11b4194bb740ef580be1d30d768faa86c7a2b861 /drivers/net
parent95b49ed013c9a8856ce768d8d4a62acfc410f73d (diff)
iwlwifi: corrections to debug output of ucode statistics
remove duplicate header and clean up format so it is defined once making changes consolicated ensuring consistancy of output. no function change to date displayed. Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c357
1 files changed, 135 insertions, 222 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
index 52e98691ddfd..33862ff56d0d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
@@ -28,6 +28,12 @@
28#include "iwl-agn.h" 28#include "iwl-agn.h"
29#include "iwl-agn-debugfs.h" 29#include "iwl-agn-debugfs.h"
30 30
31static const char *fmt_value = " %-30s %10u\n";
32static const char *fmt_hex = " %-30s 0x%02X\n";
33static const char *fmt_table = " %-30s %10u %10u %10u %10u\n";
34static const char *fmt_header =
35 "%-32s current cumulative delta max\n";
36
31static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz) 37static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz)
32{ 38{
33 int p = 0; 39 int p = 0;
@@ -121,436 +127,380 @@ ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf,
121 } 127 }
122 128
123 pos += iwl_statistics_flag(priv, buf, bufsz); 129 pos += iwl_statistics_flag(priv, buf, bufsz);
124 pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
125 "acumulative delta max\n",
126 "Statistics_Rx - OFDM:");
127 pos += scnprintf(buf + pos, bufsz - pos, 130 pos += scnprintf(buf + pos, bufsz - pos,
128 " %-30s %10u %10u %10u %10u\n", 131 fmt_header, "Statistics_Rx - OFDM:");
129 "ina_cnt:", le32_to_cpu(ofdm->ina_cnt), 132 pos += scnprintf(buf + pos, bufsz - pos,
133 fmt_table, "ina_cnt:",
134 le32_to_cpu(ofdm->ina_cnt),
130 accum_ofdm->ina_cnt, 135 accum_ofdm->ina_cnt,
131 delta_ofdm->ina_cnt, max_ofdm->ina_cnt); 136 delta_ofdm->ina_cnt, max_ofdm->ina_cnt);
132 pos += scnprintf(buf + pos, bufsz - pos, 137 pos += scnprintf(buf + pos, bufsz - pos,
133 " %-30s %10u %10u %10u %10u\n", 138 fmt_table, "fina_cnt:",
134 "fina_cnt:",
135 le32_to_cpu(ofdm->fina_cnt), accum_ofdm->fina_cnt, 139 le32_to_cpu(ofdm->fina_cnt), accum_ofdm->fina_cnt,
136 delta_ofdm->fina_cnt, max_ofdm->fina_cnt); 140 delta_ofdm->fina_cnt, max_ofdm->fina_cnt);
137 pos += scnprintf(buf + pos, bufsz - pos, 141 pos += scnprintf(buf + pos, bufsz - pos,
138 " %-30s %10u %10u %10u %10u\n", 142 fmt_table, "plcp_err:",
139 "plcp_err:",
140 le32_to_cpu(ofdm->plcp_err), accum_ofdm->plcp_err, 143 le32_to_cpu(ofdm->plcp_err), accum_ofdm->plcp_err,
141 delta_ofdm->plcp_err, max_ofdm->plcp_err); 144 delta_ofdm->plcp_err, max_ofdm->plcp_err);
142 pos += scnprintf(buf + pos, bufsz - pos, 145 pos += scnprintf(buf + pos, bufsz - pos,
143 " %-30s %10u %10u %10u %10u\n", "crc32_err:", 146 fmt_table, "crc32_err:",
144 le32_to_cpu(ofdm->crc32_err), accum_ofdm->crc32_err, 147 le32_to_cpu(ofdm->crc32_err), accum_ofdm->crc32_err,
145 delta_ofdm->crc32_err, max_ofdm->crc32_err); 148 delta_ofdm->crc32_err, max_ofdm->crc32_err);
146 pos += scnprintf(buf + pos, bufsz - pos, 149 pos += scnprintf(buf + pos, bufsz - pos,
147 " %-30s %10u %10u %10u %10u\n", "overrun_err:", 150 fmt_table, "overrun_err:",
148 le32_to_cpu(ofdm->overrun_err), 151 le32_to_cpu(ofdm->overrun_err),
149 accum_ofdm->overrun_err, delta_ofdm->overrun_err, 152 accum_ofdm->overrun_err, delta_ofdm->overrun_err,
150 max_ofdm->overrun_err); 153 max_ofdm->overrun_err);
151 pos += scnprintf(buf + pos, bufsz - pos, 154 pos += scnprintf(buf + pos, bufsz - pos,
152 " %-30s %10u %10u %10u %10u\n", 155 fmt_table, "early_overrun_err:",
153 "early_overrun_err:",
154 le32_to_cpu(ofdm->early_overrun_err), 156 le32_to_cpu(ofdm->early_overrun_err),
155 accum_ofdm->early_overrun_err, 157 accum_ofdm->early_overrun_err,
156 delta_ofdm->early_overrun_err, 158 delta_ofdm->early_overrun_err,
157 max_ofdm->early_overrun_err); 159 max_ofdm->early_overrun_err);
158 pos += scnprintf(buf + pos, bufsz - pos, 160 pos += scnprintf(buf + pos, bufsz - pos,
159 " %-30s %10u %10u %10u %10u\n", 161 fmt_table, "crc32_good:",
160 "crc32_good:", le32_to_cpu(ofdm->crc32_good), 162 le32_to_cpu(ofdm->crc32_good),
161 accum_ofdm->crc32_good, delta_ofdm->crc32_good, 163 accum_ofdm->crc32_good, delta_ofdm->crc32_good,
162 max_ofdm->crc32_good); 164 max_ofdm->crc32_good);
163 pos += scnprintf(buf + pos, bufsz - pos, 165 pos += scnprintf(buf + pos, bufsz - pos,
164 " %-30s %10u %10u %10u %10u\n", "false_alarm_cnt:", 166 fmt_table, "false_alarm_cnt:",
165 le32_to_cpu(ofdm->false_alarm_cnt), 167 le32_to_cpu(ofdm->false_alarm_cnt),
166 accum_ofdm->false_alarm_cnt, 168 accum_ofdm->false_alarm_cnt,
167 delta_ofdm->false_alarm_cnt, 169 delta_ofdm->false_alarm_cnt,
168 max_ofdm->false_alarm_cnt); 170 max_ofdm->false_alarm_cnt);
169 pos += scnprintf(buf + pos, bufsz - pos, 171 pos += scnprintf(buf + pos, bufsz - pos,
170 " %-30s %10u %10u %10u %10u\n", 172 fmt_table, "fina_sync_err_cnt:",
171 "fina_sync_err_cnt:",
172 le32_to_cpu(ofdm->fina_sync_err_cnt), 173 le32_to_cpu(ofdm->fina_sync_err_cnt),
173 accum_ofdm->fina_sync_err_cnt, 174 accum_ofdm->fina_sync_err_cnt,
174 delta_ofdm->fina_sync_err_cnt, 175 delta_ofdm->fina_sync_err_cnt,
175 max_ofdm->fina_sync_err_cnt); 176 max_ofdm->fina_sync_err_cnt);
176 pos += scnprintf(buf + pos, bufsz - pos, 177 pos += scnprintf(buf + pos, bufsz - pos,
177 " %-30s %10u %10u %10u %10u\n", "sfd_timeout:", 178 fmt_table, "sfd_timeout:",
178 le32_to_cpu(ofdm->sfd_timeout), 179 le32_to_cpu(ofdm->sfd_timeout),
179 accum_ofdm->sfd_timeout, delta_ofdm->sfd_timeout, 180 accum_ofdm->sfd_timeout, delta_ofdm->sfd_timeout,
180 max_ofdm->sfd_timeout); 181 max_ofdm->sfd_timeout);
181 pos += scnprintf(buf + pos, bufsz - pos, 182 pos += scnprintf(buf + pos, bufsz - pos,
182 " %-30s %10u %10u %10u %10u\n", "fina_timeout:", 183 fmt_table, "fina_timeout:",
183 le32_to_cpu(ofdm->fina_timeout), 184 le32_to_cpu(ofdm->fina_timeout),
184 accum_ofdm->fina_timeout, delta_ofdm->fina_timeout, 185 accum_ofdm->fina_timeout, delta_ofdm->fina_timeout,
185 max_ofdm->fina_timeout); 186 max_ofdm->fina_timeout);
186 pos += scnprintf(buf + pos, bufsz - pos, 187 pos += scnprintf(buf + pos, bufsz - pos,
187 " %-30s %10u %10u %10u %10u\n", 188 fmt_table, "unresponded_rts:",
188 "unresponded_rts:",
189 le32_to_cpu(ofdm->unresponded_rts), 189 le32_to_cpu(ofdm->unresponded_rts),
190 accum_ofdm->unresponded_rts, 190 accum_ofdm->unresponded_rts,
191 delta_ofdm->unresponded_rts, 191 delta_ofdm->unresponded_rts,
192 max_ofdm->unresponded_rts); 192 max_ofdm->unresponded_rts);
193 pos += scnprintf(buf + pos, bufsz - pos, 193 pos += scnprintf(buf + pos, bufsz - pos,
194 " %-30s %10u %10u %10u %10u\n", 194 fmt_table, "rxe_frame_lmt_ovrun:",
195 "rxe_frame_lmt_ovrun:",
196 le32_to_cpu(ofdm->rxe_frame_limit_overrun), 195 le32_to_cpu(ofdm->rxe_frame_limit_overrun),
197 accum_ofdm->rxe_frame_limit_overrun, 196 accum_ofdm->rxe_frame_limit_overrun,
198 delta_ofdm->rxe_frame_limit_overrun, 197 delta_ofdm->rxe_frame_limit_overrun,
199 max_ofdm->rxe_frame_limit_overrun); 198 max_ofdm->rxe_frame_limit_overrun);
200 pos += scnprintf(buf + pos, bufsz - pos, 199 pos += scnprintf(buf + pos, bufsz - pos,
201 " %-30s %10u %10u %10u %10u\n", "sent_ack_cnt:", 200 fmt_table, "sent_ack_cnt:",
202 le32_to_cpu(ofdm->sent_ack_cnt), 201 le32_to_cpu(ofdm->sent_ack_cnt),
203 accum_ofdm->sent_ack_cnt, delta_ofdm->sent_ack_cnt, 202 accum_ofdm->sent_ack_cnt, delta_ofdm->sent_ack_cnt,
204 max_ofdm->sent_ack_cnt); 203 max_ofdm->sent_ack_cnt);
205 pos += scnprintf(buf + pos, bufsz - pos, 204 pos += scnprintf(buf + pos, bufsz - pos,
206 " %-30s %10u %10u %10u %10u\n", "sent_cts_cnt:", 205 fmt_table, "sent_cts_cnt:",
207 le32_to_cpu(ofdm->sent_cts_cnt), 206 le32_to_cpu(ofdm->sent_cts_cnt),
208 accum_ofdm->sent_cts_cnt, delta_ofdm->sent_cts_cnt, 207 accum_ofdm->sent_cts_cnt, delta_ofdm->sent_cts_cnt,
209 max_ofdm->sent_cts_cnt); 208 max_ofdm->sent_cts_cnt);
210 pos += scnprintf(buf + pos, bufsz - pos, 209 pos += scnprintf(buf + pos, bufsz - pos,
211 " %-30s %10u %10u %10u %10u\n", 210 fmt_table, "sent_ba_rsp_cnt:",
212 "sent_ba_rsp_cnt:",
213 le32_to_cpu(ofdm->sent_ba_rsp_cnt), 211 le32_to_cpu(ofdm->sent_ba_rsp_cnt),
214 accum_ofdm->sent_ba_rsp_cnt, 212 accum_ofdm->sent_ba_rsp_cnt,
215 delta_ofdm->sent_ba_rsp_cnt, 213 delta_ofdm->sent_ba_rsp_cnt,
216 max_ofdm->sent_ba_rsp_cnt); 214 max_ofdm->sent_ba_rsp_cnt);
217 pos += scnprintf(buf + pos, bufsz - pos, 215 pos += scnprintf(buf + pos, bufsz - pos,
218 " %-30s %10u %10u %10u %10u\n", "dsp_self_kill:", 216 fmt_table, "dsp_self_kill:",
219 le32_to_cpu(ofdm->dsp_self_kill), 217 le32_to_cpu(ofdm->dsp_self_kill),
220 accum_ofdm->dsp_self_kill, 218 accum_ofdm->dsp_self_kill,
221 delta_ofdm->dsp_self_kill, 219 delta_ofdm->dsp_self_kill,
222 max_ofdm->dsp_self_kill); 220 max_ofdm->dsp_self_kill);
223 pos += scnprintf(buf + pos, bufsz - pos, 221 pos += scnprintf(buf + pos, bufsz - pos,
224 " %-30s %10u %10u %10u %10u\n", 222 fmt_table, "mh_format_err:",
225 "mh_format_err:",
226 le32_to_cpu(ofdm->mh_format_err), 223 le32_to_cpu(ofdm->mh_format_err),
227 accum_ofdm->mh_format_err, 224 accum_ofdm->mh_format_err,
228 delta_ofdm->mh_format_err, 225 delta_ofdm->mh_format_err,
229 max_ofdm->mh_format_err); 226 max_ofdm->mh_format_err);
230 pos += scnprintf(buf + pos, bufsz - pos, 227 pos += scnprintf(buf + pos, bufsz - pos,
231 " %-30s %10u %10u %10u %10u\n", 228 fmt_table, "re_acq_main_rssi_sum:",
232 "re_acq_main_rssi_sum:",
233 le32_to_cpu(ofdm->re_acq_main_rssi_sum), 229 le32_to_cpu(ofdm->re_acq_main_rssi_sum),
234 accum_ofdm->re_acq_main_rssi_sum, 230 accum_ofdm->re_acq_main_rssi_sum,
235 delta_ofdm->re_acq_main_rssi_sum, 231 delta_ofdm->re_acq_main_rssi_sum,
236 max_ofdm->re_acq_main_rssi_sum); 232 max_ofdm->re_acq_main_rssi_sum);
237 233
238 pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
239 "acumulative delta max\n",
240 "Statistics_Rx - CCK:");
241 pos += scnprintf(buf + pos, bufsz - pos, 234 pos += scnprintf(buf + pos, bufsz - pos,
242 " %-30s %10u %10u %10u %10u\n", 235 fmt_header, "Statistics_Rx - CCK:");
243 "ina_cnt:", 236 pos += scnprintf(buf + pos, bufsz - pos,
237 fmt_table, "ina_cnt:",
244 le32_to_cpu(cck->ina_cnt), accum_cck->ina_cnt, 238 le32_to_cpu(cck->ina_cnt), accum_cck->ina_cnt,
245 delta_cck->ina_cnt, max_cck->ina_cnt); 239 delta_cck->ina_cnt, max_cck->ina_cnt);
246 pos += scnprintf(buf + pos, bufsz - pos, 240 pos += scnprintf(buf + pos, bufsz - pos,
247 " %-30s %10u %10u %10u %10u\n", 241 fmt_table, "fina_cnt:",
248 "fina_cnt:",
249 le32_to_cpu(cck->fina_cnt), accum_cck->fina_cnt, 242 le32_to_cpu(cck->fina_cnt), accum_cck->fina_cnt,
250 delta_cck->fina_cnt, max_cck->fina_cnt); 243 delta_cck->fina_cnt, max_cck->fina_cnt);
251 pos += scnprintf(buf + pos, bufsz - pos, 244 pos += scnprintf(buf + pos, bufsz - pos,
252 " %-30s %10u %10u %10u %10u\n", 245 fmt_table, "plcp_err:",
253 "plcp_err:",
254 le32_to_cpu(cck->plcp_err), accum_cck->plcp_err, 246 le32_to_cpu(cck->plcp_err), accum_cck->plcp_err,
255 delta_cck->plcp_err, max_cck->plcp_err); 247 delta_cck->plcp_err, max_cck->plcp_err);
256 pos += scnprintf(buf + pos, bufsz - pos, 248 pos += scnprintf(buf + pos, bufsz - pos,
257 " %-30s %10u %10u %10u %10u\n", 249 fmt_table, "crc32_err:",
258 "crc32_err:",
259 le32_to_cpu(cck->crc32_err), accum_cck->crc32_err, 250 le32_to_cpu(cck->crc32_err), accum_cck->crc32_err,
260 delta_cck->crc32_err, max_cck->crc32_err); 251 delta_cck->crc32_err, max_cck->crc32_err);
261 pos += scnprintf(buf + pos, bufsz - pos, 252 pos += scnprintf(buf + pos, bufsz - pos,
262 " %-30s %10u %10u %10u %10u\n", 253 fmt_table, "overrun_err:",
263 "overrun_err:",
264 le32_to_cpu(cck->overrun_err), 254 le32_to_cpu(cck->overrun_err),
265 accum_cck->overrun_err, delta_cck->overrun_err, 255 accum_cck->overrun_err, delta_cck->overrun_err,
266 max_cck->overrun_err); 256 max_cck->overrun_err);
267 pos += scnprintf(buf + pos, bufsz - pos, 257 pos += scnprintf(buf + pos, bufsz - pos,
268 " %-30s %10u %10u %10u %10u\n", 258 fmt_table, "early_overrun_err:",
269 "early_overrun_err:",
270 le32_to_cpu(cck->early_overrun_err), 259 le32_to_cpu(cck->early_overrun_err),
271 accum_cck->early_overrun_err, 260 accum_cck->early_overrun_err,
272 delta_cck->early_overrun_err, 261 delta_cck->early_overrun_err,
273 max_cck->early_overrun_err); 262 max_cck->early_overrun_err);
274 pos += scnprintf(buf + pos, bufsz - pos, 263 pos += scnprintf(buf + pos, bufsz - pos,
275 " %-30s %10u %10u %10u %10u\n", 264 fmt_table, "crc32_good:",
276 "crc32_good:",
277 le32_to_cpu(cck->crc32_good), accum_cck->crc32_good, 265 le32_to_cpu(cck->crc32_good), accum_cck->crc32_good,
278 delta_cck->crc32_good, max_cck->crc32_good); 266 delta_cck->crc32_good, max_cck->crc32_good);
279 pos += scnprintf(buf + pos, bufsz - pos, 267 pos += scnprintf(buf + pos, bufsz - pos,
280 " %-30s %10u %10u %10u %10u\n", 268 fmt_table, "false_alarm_cnt:",
281 "false_alarm_cnt:",
282 le32_to_cpu(cck->false_alarm_cnt), 269 le32_to_cpu(cck->false_alarm_cnt),
283 accum_cck->false_alarm_cnt, 270 accum_cck->false_alarm_cnt,
284 delta_cck->false_alarm_cnt, max_cck->false_alarm_cnt); 271 delta_cck->false_alarm_cnt, max_cck->false_alarm_cnt);
285 pos += scnprintf(buf + pos, bufsz - pos, 272 pos += scnprintf(buf + pos, bufsz - pos,
286 " %-30s %10u %10u %10u %10u\n", 273 fmt_table, "fina_sync_err_cnt:",
287 "fina_sync_err_cnt:",
288 le32_to_cpu(cck->fina_sync_err_cnt), 274 le32_to_cpu(cck->fina_sync_err_cnt),
289 accum_cck->fina_sync_err_cnt, 275 accum_cck->fina_sync_err_cnt,
290 delta_cck->fina_sync_err_cnt, 276 delta_cck->fina_sync_err_cnt,
291 max_cck->fina_sync_err_cnt); 277 max_cck->fina_sync_err_cnt);
292 pos += scnprintf(buf + pos, bufsz - pos, 278 pos += scnprintf(buf + pos, bufsz - pos,
293 " %-30s %10u %10u %10u %10u\n", 279 fmt_table, "sfd_timeout:",
294 "sfd_timeout:",
295 le32_to_cpu(cck->sfd_timeout), 280 le32_to_cpu(cck->sfd_timeout),
296 accum_cck->sfd_timeout, delta_cck->sfd_timeout, 281 accum_cck->sfd_timeout, delta_cck->sfd_timeout,
297 max_cck->sfd_timeout); 282 max_cck->sfd_timeout);
298 pos += scnprintf(buf + pos, bufsz - pos, 283 pos += scnprintf(buf + pos, bufsz - pos,
299 " %-30s %10u %10u %10u %10u\n", "fina_timeout:", 284 fmt_table, "fina_timeout:",
300 le32_to_cpu(cck->fina_timeout), 285 le32_to_cpu(cck->fina_timeout),
301 accum_cck->fina_timeout, delta_cck->fina_timeout, 286 accum_cck->fina_timeout, delta_cck->fina_timeout,
302 max_cck->fina_timeout); 287 max_cck->fina_timeout);
303 pos += scnprintf(buf + pos, bufsz - pos, 288 pos += scnprintf(buf + pos, bufsz - pos,
304 " %-30s %10u %10u %10u %10u\n", 289 fmt_table, "unresponded_rts:",
305 "unresponded_rts:",
306 le32_to_cpu(cck->unresponded_rts), 290 le32_to_cpu(cck->unresponded_rts),
307 accum_cck->unresponded_rts, delta_cck->unresponded_rts, 291 accum_cck->unresponded_rts, delta_cck->unresponded_rts,
308 max_cck->unresponded_rts); 292 max_cck->unresponded_rts);
309 pos += scnprintf(buf + pos, bufsz - pos, 293 pos += scnprintf(buf + pos, bufsz - pos,
310 " %-30s %10u %10u %10u %10u\n", 294 fmt_table, "rxe_frame_lmt_ovrun:",
311 "rxe_frame_lmt_ovrun:",
312 le32_to_cpu(cck->rxe_frame_limit_overrun), 295 le32_to_cpu(cck->rxe_frame_limit_overrun),
313 accum_cck->rxe_frame_limit_overrun, 296 accum_cck->rxe_frame_limit_overrun,
314 delta_cck->rxe_frame_limit_overrun, 297 delta_cck->rxe_frame_limit_overrun,
315 max_cck->rxe_frame_limit_overrun); 298 max_cck->rxe_frame_limit_overrun);
316 pos += scnprintf(buf + pos, bufsz - pos, 299 pos += scnprintf(buf + pos, bufsz - pos,
317 " %-30s %10u %10u %10u %10u\n", "sent_ack_cnt:", 300 fmt_table, "sent_ack_cnt:",
318 le32_to_cpu(cck->sent_ack_cnt), 301 le32_to_cpu(cck->sent_ack_cnt),
319 accum_cck->sent_ack_cnt, delta_cck->sent_ack_cnt, 302 accum_cck->sent_ack_cnt, delta_cck->sent_ack_cnt,
320 max_cck->sent_ack_cnt); 303 max_cck->sent_ack_cnt);
321 pos += scnprintf(buf + pos, bufsz - pos, 304 pos += scnprintf(buf + pos, bufsz - pos,
322 " %-30s %10u %10u %10u %10u\n", "sent_cts_cnt:", 305 fmt_table, "sent_cts_cnt:",
323 le32_to_cpu(cck->sent_cts_cnt), 306 le32_to_cpu(cck->sent_cts_cnt),
324 accum_cck->sent_cts_cnt, delta_cck->sent_cts_cnt, 307 accum_cck->sent_cts_cnt, delta_cck->sent_cts_cnt,
325 max_cck->sent_cts_cnt); 308 max_cck->sent_cts_cnt);
326 pos += scnprintf(buf + pos, bufsz - pos, 309 pos += scnprintf(buf + pos, bufsz - pos,
327 " %-30s %10u %10u %10u %10u\n", "sent_ba_rsp_cnt:", 310 fmt_table, "sent_ba_rsp_cnt:",
328 le32_to_cpu(cck->sent_ba_rsp_cnt), 311 le32_to_cpu(cck->sent_ba_rsp_cnt),
329 accum_cck->sent_ba_rsp_cnt, 312 accum_cck->sent_ba_rsp_cnt,
330 delta_cck->sent_ba_rsp_cnt, 313 delta_cck->sent_ba_rsp_cnt,
331 max_cck->sent_ba_rsp_cnt); 314 max_cck->sent_ba_rsp_cnt);
332 pos += scnprintf(buf + pos, bufsz - pos, 315 pos += scnprintf(buf + pos, bufsz - pos,
333 " %-30s %10u %10u %10u %10u\n", "dsp_self_kill:", 316 fmt_table, "dsp_self_kill:",
334 le32_to_cpu(cck->dsp_self_kill), 317 le32_to_cpu(cck->dsp_self_kill),
335 accum_cck->dsp_self_kill, delta_cck->dsp_self_kill, 318 accum_cck->dsp_self_kill, delta_cck->dsp_self_kill,
336 max_cck->dsp_self_kill); 319 max_cck->dsp_self_kill);
337 pos += scnprintf(buf + pos, bufsz - pos, 320 pos += scnprintf(buf + pos, bufsz - pos,
338 " %-30s %10u %10u %10u %10u\n", "mh_format_err:", 321 fmt_table, "mh_format_err:",
339 le32_to_cpu(cck->mh_format_err), 322 le32_to_cpu(cck->mh_format_err),
340 accum_cck->mh_format_err, delta_cck->mh_format_err, 323 accum_cck->mh_format_err, delta_cck->mh_format_err,
341 max_cck->mh_format_err); 324 max_cck->mh_format_err);
342 pos += scnprintf(buf + pos, bufsz - pos, 325 pos += scnprintf(buf + pos, bufsz - pos,
343 " %-30s %10u %10u %10u %10u\n", 326 fmt_table, "re_acq_main_rssi_sum:",
344 "re_acq_main_rssi_sum:",
345 le32_to_cpu(cck->re_acq_main_rssi_sum), 327 le32_to_cpu(cck->re_acq_main_rssi_sum),
346 accum_cck->re_acq_main_rssi_sum, 328 accum_cck->re_acq_main_rssi_sum,
347 delta_cck->re_acq_main_rssi_sum, 329 delta_cck->re_acq_main_rssi_sum,
348 max_cck->re_acq_main_rssi_sum); 330 max_cck->re_acq_main_rssi_sum);
349 331
350 pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
351 "acumulative delta max\n",
352 "Statistics_Rx - GENERAL:");
353 pos += scnprintf(buf + pos, bufsz - pos, 332 pos += scnprintf(buf + pos, bufsz - pos,
354 " %-30s %10u %10u %10u %10u\n", "bogus_cts:", 333 fmt_header, "Statistics_Rx - GENERAL:");
334 pos += scnprintf(buf + pos, bufsz - pos,
335 fmt_table, "bogus_cts:",
355 le32_to_cpu(general->bogus_cts), 336 le32_to_cpu(general->bogus_cts),
356 accum_general->bogus_cts, delta_general->bogus_cts, 337 accum_general->bogus_cts, delta_general->bogus_cts,
357 max_general->bogus_cts); 338 max_general->bogus_cts);
358 pos += scnprintf(buf + pos, bufsz - pos, 339 pos += scnprintf(buf + pos, bufsz - pos,
359 " %-30s %10u %10u %10u %10u\n", "bogus_ack:", 340 fmt_table, "bogus_ack:",
360 le32_to_cpu(general->bogus_ack), 341 le32_to_cpu(general->bogus_ack),
361 accum_general->bogus_ack, delta_general->bogus_ack, 342 accum_general->bogus_ack, delta_general->bogus_ack,
362 max_general->bogus_ack); 343 max_general->bogus_ack);
363 pos += scnprintf(buf + pos, bufsz - pos, 344 pos += scnprintf(buf + pos, bufsz - pos,
364 " %-30s %10u %10u %10u %10u\n", 345 fmt_table, "non_bssid_frames:",
365 "non_bssid_frames:",
366 le32_to_cpu(general->non_bssid_frames), 346 le32_to_cpu(general->non_bssid_frames),
367 accum_general->non_bssid_frames, 347 accum_general->non_bssid_frames,
368 delta_general->non_bssid_frames, 348 delta_general->non_bssid_frames,
369 max_general->non_bssid_frames); 349 max_general->non_bssid_frames);
370 pos += scnprintf(buf + pos, bufsz - pos, 350 pos += scnprintf(buf + pos, bufsz - pos,
371 " %-30s %10u %10u %10u %10u\n", 351 fmt_table, "filtered_frames:",
372 "filtered_frames:",
373 le32_to_cpu(general->filtered_frames), 352 le32_to_cpu(general->filtered_frames),
374 accum_general->filtered_frames, 353 accum_general->filtered_frames,
375 delta_general->filtered_frames, 354 delta_general->filtered_frames,
376 max_general->filtered_frames); 355 max_general->filtered_frames);
377 pos += scnprintf(buf + pos, bufsz - pos, 356 pos += scnprintf(buf + pos, bufsz - pos,
378 " %-30s %10u %10u %10u %10u\n", 357 fmt_table, "non_channel_beacons:",
379 "non_channel_beacons:",
380 le32_to_cpu(general->non_channel_beacons), 358 le32_to_cpu(general->non_channel_beacons),
381 accum_general->non_channel_beacons, 359 accum_general->non_channel_beacons,
382 delta_general->non_channel_beacons, 360 delta_general->non_channel_beacons,
383 max_general->non_channel_beacons); 361 max_general->non_channel_beacons);
384 pos += scnprintf(buf + pos, bufsz - pos, 362 pos += scnprintf(buf + pos, bufsz - pos,
385 " %-30s %10u %10u %10u %10u\n", 363 fmt_table, "channel_beacons:",
386 "channel_beacons:",
387 le32_to_cpu(general->channel_beacons), 364 le32_to_cpu(general->channel_beacons),
388 accum_general->channel_beacons, 365 accum_general->channel_beacons,
389 delta_general->channel_beacons, 366 delta_general->channel_beacons,
390 max_general->channel_beacons); 367 max_general->channel_beacons);
391 pos += scnprintf(buf + pos, bufsz - pos, 368 pos += scnprintf(buf + pos, bufsz - pos,
392 " %-30s %10u %10u %10u %10u\n", 369 fmt_table, "num_missed_bcon:",
393 "num_missed_bcon:",
394 le32_to_cpu(general->num_missed_bcon), 370 le32_to_cpu(general->num_missed_bcon),
395 accum_general->num_missed_bcon, 371 accum_general->num_missed_bcon,
396 delta_general->num_missed_bcon, 372 delta_general->num_missed_bcon,
397 max_general->num_missed_bcon); 373 max_general->num_missed_bcon);
398 pos += scnprintf(buf + pos, bufsz - pos, 374 pos += scnprintf(buf + pos, bufsz - pos,
399 " %-30s %10u %10u %10u %10u\n", 375 fmt_table, "adc_rx_saturation_time:",
400 "adc_rx_saturation_time:",
401 le32_to_cpu(general->adc_rx_saturation_time), 376 le32_to_cpu(general->adc_rx_saturation_time),
402 accum_general->adc_rx_saturation_time, 377 accum_general->adc_rx_saturation_time,
403 delta_general->adc_rx_saturation_time, 378 delta_general->adc_rx_saturation_time,
404 max_general->adc_rx_saturation_time); 379 max_general->adc_rx_saturation_time);
405 pos += scnprintf(buf + pos, bufsz - pos, 380 pos += scnprintf(buf + pos, bufsz - pos,
406 " %-30s %10u %10u %10u %10u\n", 381 fmt_table, "ina_detect_search_tm:",
407 "ina_detect_search_tm:",
408 le32_to_cpu(general->ina_detection_search_time), 382 le32_to_cpu(general->ina_detection_search_time),
409 accum_general->ina_detection_search_time, 383 accum_general->ina_detection_search_time,
410 delta_general->ina_detection_search_time, 384 delta_general->ina_detection_search_time,
411 max_general->ina_detection_search_time); 385 max_general->ina_detection_search_time);
412 pos += scnprintf(buf + pos, bufsz - pos, 386 pos += scnprintf(buf + pos, bufsz - pos,
413 " %-30s %10u %10u %10u %10u\n", 387 fmt_table, "beacon_silence_rssi_a:",
414 "beacon_silence_rssi_a:",
415 le32_to_cpu(general->beacon_silence_rssi_a), 388 le32_to_cpu(general->beacon_silence_rssi_a),
416 accum_general->beacon_silence_rssi_a, 389 accum_general->beacon_silence_rssi_a,
417 delta_general->beacon_silence_rssi_a, 390 delta_general->beacon_silence_rssi_a,
418 max_general->beacon_silence_rssi_a); 391 max_general->beacon_silence_rssi_a);
419 pos += scnprintf(buf + pos, bufsz - pos, 392 pos += scnprintf(buf + pos, bufsz - pos,
420 " %-30s %10u %10u %10u %10u\n", 393 fmt_table, "beacon_silence_rssi_b:",
421 "beacon_silence_rssi_b:",
422 le32_to_cpu(general->beacon_silence_rssi_b), 394 le32_to_cpu(general->beacon_silence_rssi_b),
423 accum_general->beacon_silence_rssi_b, 395 accum_general->beacon_silence_rssi_b,
424 delta_general->beacon_silence_rssi_b, 396 delta_general->beacon_silence_rssi_b,
425 max_general->beacon_silence_rssi_b); 397 max_general->beacon_silence_rssi_b);
426 pos += scnprintf(buf + pos, bufsz - pos, 398 pos += scnprintf(buf + pos, bufsz - pos,
427 " %-30s %10u %10u %10u %10u\n", 399 fmt_table, "beacon_silence_rssi_c:",
428 "beacon_silence_rssi_c:",
429 le32_to_cpu(general->beacon_silence_rssi_c), 400 le32_to_cpu(general->beacon_silence_rssi_c),
430 accum_general->beacon_silence_rssi_c, 401 accum_general->beacon_silence_rssi_c,
431 delta_general->beacon_silence_rssi_c, 402 delta_general->beacon_silence_rssi_c,
432 max_general->beacon_silence_rssi_c); 403 max_general->beacon_silence_rssi_c);
433 pos += scnprintf(buf + pos, bufsz - pos, 404 pos += scnprintf(buf + pos, bufsz - pos,
434 " %-30s %10u %10u %10u %10u\n", 405 fmt_table, "interference_data_flag:",
435 "interference_data_flag:",
436 le32_to_cpu(general->interference_data_flag), 406 le32_to_cpu(general->interference_data_flag),
437 accum_general->interference_data_flag, 407 accum_general->interference_data_flag,
438 delta_general->interference_data_flag, 408 delta_general->interference_data_flag,
439 max_general->interference_data_flag); 409 max_general->interference_data_flag);
440 pos += scnprintf(buf + pos, bufsz - pos, 410 pos += scnprintf(buf + pos, bufsz - pos,
441 " %-30s %10u %10u %10u %10u\n", 411 fmt_table, "channel_load:",
442 "channel_load:",
443 le32_to_cpu(general->channel_load), 412 le32_to_cpu(general->channel_load),
444 accum_general->channel_load, 413 accum_general->channel_load,
445 delta_general->channel_load, 414 delta_general->channel_load,
446 max_general->channel_load); 415 max_general->channel_load);
447 pos += scnprintf(buf + pos, bufsz - pos, 416 pos += scnprintf(buf + pos, bufsz - pos,
448 " %-30s %10u %10u %10u %10u\n", 417 fmt_table, "dsp_false_alarms:",
449 "dsp_false_alarms:",
450 le32_to_cpu(general->dsp_false_alarms), 418 le32_to_cpu(general->dsp_false_alarms),
451 accum_general->dsp_false_alarms, 419 accum_general->dsp_false_alarms,
452 delta_general->dsp_false_alarms, 420 delta_general->dsp_false_alarms,
453 max_general->dsp_false_alarms); 421 max_general->dsp_false_alarms);
454 pos += scnprintf(buf + pos, bufsz - pos, 422 pos += scnprintf(buf + pos, bufsz - pos,
455 " %-30s %10u %10u %10u %10u\n", 423 fmt_table, "beacon_rssi_a:",
456 "beacon_rssi_a:",
457 le32_to_cpu(general->beacon_rssi_a), 424 le32_to_cpu(general->beacon_rssi_a),
458 accum_general->beacon_rssi_a, 425 accum_general->beacon_rssi_a,
459 delta_general->beacon_rssi_a, 426 delta_general->beacon_rssi_a,
460 max_general->beacon_rssi_a); 427 max_general->beacon_rssi_a);
461 pos += scnprintf(buf + pos, bufsz - pos, 428 pos += scnprintf(buf + pos, bufsz - pos,
462 " %-30s %10u %10u %10u %10u\n", 429 fmt_table, "beacon_rssi_b:",
463 "beacon_rssi_b:",
464 le32_to_cpu(general->beacon_rssi_b), 430 le32_to_cpu(general->beacon_rssi_b),
465 accum_general->beacon_rssi_b, 431 accum_general->beacon_rssi_b,
466 delta_general->beacon_rssi_b, 432 delta_general->beacon_rssi_b,
467 max_general->beacon_rssi_b); 433 max_general->beacon_rssi_b);
468 pos += scnprintf(buf + pos, bufsz - pos, 434 pos += scnprintf(buf + pos, bufsz - pos,
469 " %-30s %10u %10u %10u %10u\n", 435 fmt_table, "beacon_rssi_c:",
470 "beacon_rssi_c:",
471 le32_to_cpu(general->beacon_rssi_c), 436 le32_to_cpu(general->beacon_rssi_c),
472 accum_general->beacon_rssi_c, 437 accum_general->beacon_rssi_c,
473 delta_general->beacon_rssi_c, 438 delta_general->beacon_rssi_c,
474 max_general->beacon_rssi_c); 439 max_general->beacon_rssi_c);
475 pos += scnprintf(buf + pos, bufsz - pos, 440 pos += scnprintf(buf + pos, bufsz - pos,
476 " %-30s %10u %10u %10u %10u\n", 441 fmt_table, "beacon_energy_a:",
477 "beacon_energy_a:",
478 le32_to_cpu(general->beacon_energy_a), 442 le32_to_cpu(general->beacon_energy_a),
479 accum_general->beacon_energy_a, 443 accum_general->beacon_energy_a,
480 delta_general->beacon_energy_a, 444 delta_general->beacon_energy_a,
481 max_general->beacon_energy_a); 445 max_general->beacon_energy_a);
482 pos += scnprintf(buf + pos, bufsz - pos, 446 pos += scnprintf(buf + pos, bufsz - pos,
483 " %-30s %10u %10u %10u %10u\n", 447 fmt_table, "beacon_energy_b:",
484 "beacon_energy_b:",
485 le32_to_cpu(general->beacon_energy_b), 448 le32_to_cpu(general->beacon_energy_b),
486 accum_general->beacon_energy_b, 449 accum_general->beacon_energy_b,
487 delta_general->beacon_energy_b, 450 delta_general->beacon_energy_b,
488 max_general->beacon_energy_b); 451 max_general->beacon_energy_b);
489 pos += scnprintf(buf + pos, bufsz - pos, 452 pos += scnprintf(buf + pos, bufsz - pos,
490 " %-30s %10u %10u %10u %10u\n", 453 fmt_table, "beacon_energy_c:",
491 "beacon_energy_c:",
492 le32_to_cpu(general->beacon_energy_c), 454 le32_to_cpu(general->beacon_energy_c),
493 accum_general->beacon_energy_c, 455 accum_general->beacon_energy_c,
494 delta_general->beacon_energy_c, 456 delta_general->beacon_energy_c,
495 max_general->beacon_energy_c); 457 max_general->beacon_energy_c);
496 458
497 pos += scnprintf(buf + pos, bufsz - pos, "Statistics_Rx - OFDM_HT:\n");
498 pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
499 "acumulative delta max\n",
500 "Statistics_Rx - OFDM_HT:");
501 pos += scnprintf(buf + pos, bufsz - pos, 459 pos += scnprintf(buf + pos, bufsz - pos,
502 " %-30s %10u %10u %10u %10u\n", 460 fmt_header, "Statistics_Rx - OFDM_HT:");
503 "plcp_err:", 461 pos += scnprintf(buf + pos, bufsz - pos,
462 fmt_table, "plcp_err:",
504 le32_to_cpu(ht->plcp_err), accum_ht->plcp_err, 463 le32_to_cpu(ht->plcp_err), accum_ht->plcp_err,
505 delta_ht->plcp_err, max_ht->plcp_err); 464 delta_ht->plcp_err, max_ht->plcp_err);
506 pos += scnprintf(buf + pos, bufsz - pos, 465 pos += scnprintf(buf + pos, bufsz - pos,
507 " %-30s %10u %10u %10u %10u\n", 466 fmt_table, "overrun_err:",
508 "overrun_err:",
509 le32_to_cpu(ht->overrun_err), accum_ht->overrun_err, 467 le32_to_cpu(ht->overrun_err), accum_ht->overrun_err,
510 delta_ht->overrun_err, max_ht->overrun_err); 468 delta_ht->overrun_err, max_ht->overrun_err);
511 pos += scnprintf(buf + pos, bufsz - pos, 469 pos += scnprintf(buf + pos, bufsz - pos,
512 " %-30s %10u %10u %10u %10u\n", 470 fmt_table, "early_overrun_err:",
513 "early_overrun_err:",
514 le32_to_cpu(ht->early_overrun_err), 471 le32_to_cpu(ht->early_overrun_err),
515 accum_ht->early_overrun_err, 472 accum_ht->early_overrun_err,
516 delta_ht->early_overrun_err, 473 delta_ht->early_overrun_err,
517 max_ht->early_overrun_err); 474 max_ht->early_overrun_err);
518 pos += scnprintf(buf + pos, bufsz - pos, 475 pos += scnprintf(buf + pos, bufsz - pos,
519 " %-30s %10u %10u %10u %10u\n", 476 fmt_table, "crc32_good:",
520 "crc32_good:",
521 le32_to_cpu(ht->crc32_good), accum_ht->crc32_good, 477 le32_to_cpu(ht->crc32_good), accum_ht->crc32_good,
522 delta_ht->crc32_good, max_ht->crc32_good); 478 delta_ht->crc32_good, max_ht->crc32_good);
523 pos += scnprintf(buf + pos, bufsz - pos, 479 pos += scnprintf(buf + pos, bufsz - pos,
524 " %-30s %10u %10u %10u %10u\n", 480 fmt_table, "crc32_err:",
525 "crc32_err:",
526 le32_to_cpu(ht->crc32_err), accum_ht->crc32_err, 481 le32_to_cpu(ht->crc32_err), accum_ht->crc32_err,
527 delta_ht->crc32_err, max_ht->crc32_err); 482 delta_ht->crc32_err, max_ht->crc32_err);
528 pos += scnprintf(buf + pos, bufsz - pos, 483 pos += scnprintf(buf + pos, bufsz - pos,
529 " %-30s %10u %10u %10u %10u\n", 484 fmt_table, "mh_format_err:",
530 "mh_format_err:",
531 le32_to_cpu(ht->mh_format_err), 485 le32_to_cpu(ht->mh_format_err),
532 accum_ht->mh_format_err, 486 accum_ht->mh_format_err,
533 delta_ht->mh_format_err, max_ht->mh_format_err); 487 delta_ht->mh_format_err, max_ht->mh_format_err);
534 pos += scnprintf(buf + pos, bufsz - pos, 488 pos += scnprintf(buf + pos, bufsz - pos,
535 " %-30s %10u %10u %10u %10u\n", 489 fmt_table, "agg_crc32_good:",
536 "agg_crc32_good:",
537 le32_to_cpu(ht->agg_crc32_good), 490 le32_to_cpu(ht->agg_crc32_good),
538 accum_ht->agg_crc32_good, 491 accum_ht->agg_crc32_good,
539 delta_ht->agg_crc32_good, max_ht->agg_crc32_good); 492 delta_ht->agg_crc32_good, max_ht->agg_crc32_good);
540 pos += scnprintf(buf + pos, bufsz - pos, 493 pos += scnprintf(buf + pos, bufsz - pos,
541 " %-30s %10u %10u %10u %10u\n", 494 fmt_table, "agg_mpdu_cnt:",
542 "agg_mpdu_cnt:",
543 le32_to_cpu(ht->agg_mpdu_cnt), 495 le32_to_cpu(ht->agg_mpdu_cnt),
544 accum_ht->agg_mpdu_cnt, 496 accum_ht->agg_mpdu_cnt,
545 delta_ht->agg_mpdu_cnt, max_ht->agg_mpdu_cnt); 497 delta_ht->agg_mpdu_cnt, max_ht->agg_mpdu_cnt);
546 pos += scnprintf(buf + pos, bufsz - pos, 498 pos += scnprintf(buf + pos, bufsz - pos,
547 " %-30s %10u %10u %10u %10u\n", 499 fmt_table, "agg_cnt:",
548 "agg_cnt:",
549 le32_to_cpu(ht->agg_cnt), accum_ht->agg_cnt, 500 le32_to_cpu(ht->agg_cnt), accum_ht->agg_cnt,
550 delta_ht->agg_cnt, max_ht->agg_cnt); 501 delta_ht->agg_cnt, max_ht->agg_cnt);
551 pos += scnprintf(buf + pos, bufsz - pos, 502 pos += scnprintf(buf + pos, bufsz - pos,
552 " %-30s %10u %10u %10u %10u\n", 503 fmt_table, "unsupport_mcs:",
553 "unsupport_mcs:",
554 le32_to_cpu(ht->unsupport_mcs), 504 le32_to_cpu(ht->unsupport_mcs),
555 accum_ht->unsupport_mcs, 505 accum_ht->unsupport_mcs,
556 delta_ht->unsupport_mcs, max_ht->unsupport_mcs); 506 delta_ht->unsupport_mcs, max_ht->unsupport_mcs);
@@ -597,166 +547,141 @@ ssize_t iwl_ucode_tx_stats_read(struct file *file,
597 } 547 }
598 548
599 pos += iwl_statistics_flag(priv, buf, bufsz); 549 pos += iwl_statistics_flag(priv, buf, bufsz);
600 pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
601 "acumulative delta max\n",
602 "Statistics_Tx:");
603 pos += scnprintf(buf + pos, bufsz - pos, 550 pos += scnprintf(buf + pos, bufsz - pos,
604 " %-30s %10u %10u %10u %10u\n", 551 fmt_header, "Statistics_Tx:");
605 "preamble:", 552 pos += scnprintf(buf + pos, bufsz - pos,
553 fmt_table, "preamble:",
606 le32_to_cpu(tx->preamble_cnt), 554 le32_to_cpu(tx->preamble_cnt),
607 accum_tx->preamble_cnt, 555 accum_tx->preamble_cnt,
608 delta_tx->preamble_cnt, max_tx->preamble_cnt); 556 delta_tx->preamble_cnt, max_tx->preamble_cnt);
609 pos += scnprintf(buf + pos, bufsz - pos, 557 pos += scnprintf(buf + pos, bufsz - pos,
610 " %-30s %10u %10u %10u %10u\n", 558 fmt_table, "rx_detected_cnt:",
611 "rx_detected_cnt:",
612 le32_to_cpu(tx->rx_detected_cnt), 559 le32_to_cpu(tx->rx_detected_cnt),
613 accum_tx->rx_detected_cnt, 560 accum_tx->rx_detected_cnt,
614 delta_tx->rx_detected_cnt, max_tx->rx_detected_cnt); 561 delta_tx->rx_detected_cnt, max_tx->rx_detected_cnt);
615 pos += scnprintf(buf + pos, bufsz - pos, 562 pos += scnprintf(buf + pos, bufsz - pos,
616 " %-30s %10u %10u %10u %10u\n", 563 fmt_table, "bt_prio_defer_cnt:",
617 "bt_prio_defer_cnt:",
618 le32_to_cpu(tx->bt_prio_defer_cnt), 564 le32_to_cpu(tx->bt_prio_defer_cnt),
619 accum_tx->bt_prio_defer_cnt, 565 accum_tx->bt_prio_defer_cnt,
620 delta_tx->bt_prio_defer_cnt, 566 delta_tx->bt_prio_defer_cnt,
621 max_tx->bt_prio_defer_cnt); 567 max_tx->bt_prio_defer_cnt);
622 pos += scnprintf(buf + pos, bufsz - pos, 568 pos += scnprintf(buf + pos, bufsz - pos,
623 " %-30s %10u %10u %10u %10u\n", 569 fmt_table, "bt_prio_kill_cnt:",
624 "bt_prio_kill_cnt:",
625 le32_to_cpu(tx->bt_prio_kill_cnt), 570 le32_to_cpu(tx->bt_prio_kill_cnt),
626 accum_tx->bt_prio_kill_cnt, 571 accum_tx->bt_prio_kill_cnt,
627 delta_tx->bt_prio_kill_cnt, 572 delta_tx->bt_prio_kill_cnt,
628 max_tx->bt_prio_kill_cnt); 573 max_tx->bt_prio_kill_cnt);
629 pos += scnprintf(buf + pos, bufsz - pos, 574 pos += scnprintf(buf + pos, bufsz - pos,
630 " %-30s %10u %10u %10u %10u\n", 575 fmt_table, "few_bytes_cnt:",
631 "few_bytes_cnt:",
632 le32_to_cpu(tx->few_bytes_cnt), 576 le32_to_cpu(tx->few_bytes_cnt),
633 accum_tx->few_bytes_cnt, 577 accum_tx->few_bytes_cnt,
634 delta_tx->few_bytes_cnt, max_tx->few_bytes_cnt); 578 delta_tx->few_bytes_cnt, max_tx->few_bytes_cnt);
635 pos += scnprintf(buf + pos, bufsz - pos, 579 pos += scnprintf(buf + pos, bufsz - pos,
636 " %-30s %10u %10u %10u %10u\n", 580 fmt_table, "cts_timeout:",
637 "cts_timeout:",
638 le32_to_cpu(tx->cts_timeout), accum_tx->cts_timeout, 581 le32_to_cpu(tx->cts_timeout), accum_tx->cts_timeout,
639 delta_tx->cts_timeout, max_tx->cts_timeout); 582 delta_tx->cts_timeout, max_tx->cts_timeout);
640 pos += scnprintf(buf + pos, bufsz - pos, 583 pos += scnprintf(buf + pos, bufsz - pos,
641 " %-30s %10u %10u %10u %10u\n", 584 fmt_table, "ack_timeout:",
642 "ack_timeout:",
643 le32_to_cpu(tx->ack_timeout), 585 le32_to_cpu(tx->ack_timeout),
644 accum_tx->ack_timeout, 586 accum_tx->ack_timeout,
645 delta_tx->ack_timeout, max_tx->ack_timeout); 587 delta_tx->ack_timeout, max_tx->ack_timeout);
646 pos += scnprintf(buf + pos, bufsz - pos, 588 pos += scnprintf(buf + pos, bufsz - pos,
647 " %-30s %10u %10u %10u %10u\n", 589 fmt_table, "expected_ack_cnt:",
648 "expected_ack_cnt:",
649 le32_to_cpu(tx->expected_ack_cnt), 590 le32_to_cpu(tx->expected_ack_cnt),
650 accum_tx->expected_ack_cnt, 591 accum_tx->expected_ack_cnt,
651 delta_tx->expected_ack_cnt, 592 delta_tx->expected_ack_cnt,
652 max_tx->expected_ack_cnt); 593 max_tx->expected_ack_cnt);
653 pos += scnprintf(buf + pos, bufsz - pos, 594 pos += scnprintf(buf + pos, bufsz - pos,
654 " %-30s %10u %10u %10u %10u\n", 595 fmt_table, "actual_ack_cnt:",
655 "actual_ack_cnt:",
656 le32_to_cpu(tx->actual_ack_cnt), 596 le32_to_cpu(tx->actual_ack_cnt),
657 accum_tx->actual_ack_cnt, 597 accum_tx->actual_ack_cnt,
658 delta_tx->actual_ack_cnt, 598 delta_tx->actual_ack_cnt,
659 max_tx->actual_ack_cnt); 599 max_tx->actual_ack_cnt);
660 pos += scnprintf(buf + pos, bufsz - pos, 600 pos += scnprintf(buf + pos, bufsz - pos,
661 " %-30s %10u %10u %10u %10u\n", 601 fmt_table, "dump_msdu_cnt:",
662 "dump_msdu_cnt:",
663 le32_to_cpu(tx->dump_msdu_cnt), 602 le32_to_cpu(tx->dump_msdu_cnt),
664 accum_tx->dump_msdu_cnt, 603 accum_tx->dump_msdu_cnt,
665 delta_tx->dump_msdu_cnt, 604 delta_tx->dump_msdu_cnt,
666 max_tx->dump_msdu_cnt); 605 max_tx->dump_msdu_cnt);
667 pos += scnprintf(buf + pos, bufsz - pos, 606 pos += scnprintf(buf + pos, bufsz - pos,
668 " %-30s %10u %10u %10u %10u\n", 607 fmt_table, "abort_nxt_frame_mismatch:",
669 "abort_nxt_frame_mismatch:",
670 le32_to_cpu(tx->burst_abort_next_frame_mismatch_cnt), 608 le32_to_cpu(tx->burst_abort_next_frame_mismatch_cnt),
671 accum_tx->burst_abort_next_frame_mismatch_cnt, 609 accum_tx->burst_abort_next_frame_mismatch_cnt,
672 delta_tx->burst_abort_next_frame_mismatch_cnt, 610 delta_tx->burst_abort_next_frame_mismatch_cnt,
673 max_tx->burst_abort_next_frame_mismatch_cnt); 611 max_tx->burst_abort_next_frame_mismatch_cnt);
674 pos += scnprintf(buf + pos, bufsz - pos, 612 pos += scnprintf(buf + pos, bufsz - pos,
675 " %-30s %10u %10u %10u %10u\n", 613 fmt_table, "abort_missing_nxt_frame:",
676 "abort_missing_nxt_frame:",
677 le32_to_cpu(tx->burst_abort_missing_next_frame_cnt), 614 le32_to_cpu(tx->burst_abort_missing_next_frame_cnt),
678 accum_tx->burst_abort_missing_next_frame_cnt, 615 accum_tx->burst_abort_missing_next_frame_cnt,
679 delta_tx->burst_abort_missing_next_frame_cnt, 616 delta_tx->burst_abort_missing_next_frame_cnt,
680 max_tx->burst_abort_missing_next_frame_cnt); 617 max_tx->burst_abort_missing_next_frame_cnt);
681 pos += scnprintf(buf + pos, bufsz - pos, 618 pos += scnprintf(buf + pos, bufsz - pos,
682 " %-30s %10u %10u %10u %10u\n", 619 fmt_table, "cts_timeout_collision:",
683 "cts_timeout_collision:",
684 le32_to_cpu(tx->cts_timeout_collision), 620 le32_to_cpu(tx->cts_timeout_collision),
685 accum_tx->cts_timeout_collision, 621 accum_tx->cts_timeout_collision,
686 delta_tx->cts_timeout_collision, 622 delta_tx->cts_timeout_collision,
687 max_tx->cts_timeout_collision); 623 max_tx->cts_timeout_collision);
688 pos += scnprintf(buf + pos, bufsz - pos, 624 pos += scnprintf(buf + pos, bufsz - pos,
689 " %-30s %10u %10u %10u %10u\n", 625 fmt_table, "ack_ba_timeout_collision:",
690 "ack_ba_timeout_collision:",
691 le32_to_cpu(tx->ack_or_ba_timeout_collision), 626 le32_to_cpu(tx->ack_or_ba_timeout_collision),
692 accum_tx->ack_or_ba_timeout_collision, 627 accum_tx->ack_or_ba_timeout_collision,
693 delta_tx->ack_or_ba_timeout_collision, 628 delta_tx->ack_or_ba_timeout_collision,
694 max_tx->ack_or_ba_timeout_collision); 629 max_tx->ack_or_ba_timeout_collision);
695 pos += scnprintf(buf + pos, bufsz - pos, 630 pos += scnprintf(buf + pos, bufsz - pos,
696 " %-30s %10u %10u %10u %10u\n", 631 fmt_table, "agg ba_timeout:",
697 "agg ba_timeout:",
698 le32_to_cpu(tx->agg.ba_timeout), 632 le32_to_cpu(tx->agg.ba_timeout),
699 accum_tx->agg.ba_timeout, 633 accum_tx->agg.ba_timeout,
700 delta_tx->agg.ba_timeout, 634 delta_tx->agg.ba_timeout,
701 max_tx->agg.ba_timeout); 635 max_tx->agg.ba_timeout);
702 pos += scnprintf(buf + pos, bufsz - pos, 636 pos += scnprintf(buf + pos, bufsz - pos,
703 " %-30s %10u %10u %10u %10u\n", 637 fmt_table, "agg ba_resched_frames:",
704 "agg ba_resched_frames:",
705 le32_to_cpu(tx->agg.ba_reschedule_frames), 638 le32_to_cpu(tx->agg.ba_reschedule_frames),
706 accum_tx->agg.ba_reschedule_frames, 639 accum_tx->agg.ba_reschedule_frames,
707 delta_tx->agg.ba_reschedule_frames, 640 delta_tx->agg.ba_reschedule_frames,
708 max_tx->agg.ba_reschedule_frames); 641 max_tx->agg.ba_reschedule_frames);
709 pos += scnprintf(buf + pos, bufsz - pos, 642 pos += scnprintf(buf + pos, bufsz - pos,
710 " %-30s %10u %10u %10u %10u\n", 643 fmt_table, "agg scd_query_agg_frame:",
711 "agg scd_query_agg_frame:",
712 le32_to_cpu(tx->agg.scd_query_agg_frame_cnt), 644 le32_to_cpu(tx->agg.scd_query_agg_frame_cnt),
713 accum_tx->agg.scd_query_agg_frame_cnt, 645 accum_tx->agg.scd_query_agg_frame_cnt,
714 delta_tx->agg.scd_query_agg_frame_cnt, 646 delta_tx->agg.scd_query_agg_frame_cnt,
715 max_tx->agg.scd_query_agg_frame_cnt); 647 max_tx->agg.scd_query_agg_frame_cnt);
716 pos += scnprintf(buf + pos, bufsz - pos, 648 pos += scnprintf(buf + pos, bufsz - pos,
717 " %-30s %10u %10u %10u %10u\n", 649 fmt_table, "agg scd_query_no_agg:",
718 "agg scd_query_no_agg:",
719 le32_to_cpu(tx->agg.scd_query_no_agg), 650 le32_to_cpu(tx->agg.scd_query_no_agg),
720 accum_tx->agg.scd_query_no_agg, 651 accum_tx->agg.scd_query_no_agg,
721 delta_tx->agg.scd_query_no_agg, 652 delta_tx->agg.scd_query_no_agg,
722 max_tx->agg.scd_query_no_agg); 653 max_tx->agg.scd_query_no_agg);
723 pos += scnprintf(buf + pos, bufsz - pos, 654 pos += scnprintf(buf + pos, bufsz - pos,
724 " %-30s %10u %10u %10u %10u\n", 655 fmt_table, "agg scd_query_agg:",
725 "agg scd_query_agg:",
726 le32_to_cpu(tx->agg.scd_query_agg), 656 le32_to_cpu(tx->agg.scd_query_agg),
727 accum_tx->agg.scd_query_agg, 657 accum_tx->agg.scd_query_agg,
728 delta_tx->agg.scd_query_agg, 658 delta_tx->agg.scd_query_agg,
729 max_tx->agg.scd_query_agg); 659 max_tx->agg.scd_query_agg);
730 pos += scnprintf(buf + pos, bufsz - pos, 660 pos += scnprintf(buf + pos, bufsz - pos,
731 " %-30s %10u %10u %10u %10u\n", 661 fmt_table, "agg scd_query_mismatch:",
732 "agg scd_query_mismatch:",
733 le32_to_cpu(tx->agg.scd_query_mismatch), 662 le32_to_cpu(tx->agg.scd_query_mismatch),
734 accum_tx->agg.scd_query_mismatch, 663 accum_tx->agg.scd_query_mismatch,
735 delta_tx->agg.scd_query_mismatch, 664 delta_tx->agg.scd_query_mismatch,
736 max_tx->agg.scd_query_mismatch); 665 max_tx->agg.scd_query_mismatch);
737 pos += scnprintf(buf + pos, bufsz - pos, 666 pos += scnprintf(buf + pos, bufsz - pos,
738 " %-30s %10u %10u %10u %10u\n", 667 fmt_table, "agg frame_not_ready:",
739 "agg frame_not_ready:",
740 le32_to_cpu(tx->agg.frame_not_ready), 668 le32_to_cpu(tx->agg.frame_not_ready),
741 accum_tx->agg.frame_not_ready, 669 accum_tx->agg.frame_not_ready,
742 delta_tx->agg.frame_not_ready, 670 delta_tx->agg.frame_not_ready,
743 max_tx->agg.frame_not_ready); 671 max_tx->agg.frame_not_ready);
744 pos += scnprintf(buf + pos, bufsz - pos, 672 pos += scnprintf(buf + pos, bufsz - pos,
745 " %-30s %10u %10u %10u %10u\n", 673 fmt_table, "agg underrun:",
746 "agg underrun:",
747 le32_to_cpu(tx->agg.underrun), 674 le32_to_cpu(tx->agg.underrun),
748 accum_tx->agg.underrun, 675 accum_tx->agg.underrun,
749 delta_tx->agg.underrun, max_tx->agg.underrun); 676 delta_tx->agg.underrun, max_tx->agg.underrun);
750 pos += scnprintf(buf + pos, bufsz - pos, 677 pos += scnprintf(buf + pos, bufsz - pos,
751 " %-30s %10u %10u %10u %10u\n", 678 fmt_table, "agg bt_prio_kill:",
752 "agg bt_prio_kill:",
753 le32_to_cpu(tx->agg.bt_prio_kill), 679 le32_to_cpu(tx->agg.bt_prio_kill),
754 accum_tx->agg.bt_prio_kill, 680 accum_tx->agg.bt_prio_kill,
755 delta_tx->agg.bt_prio_kill, 681 delta_tx->agg.bt_prio_kill,
756 max_tx->agg.bt_prio_kill); 682 max_tx->agg.bt_prio_kill);
757 pos += scnprintf(buf + pos, bufsz - pos, 683 pos += scnprintf(buf + pos, bufsz - pos,
758 " %-30s %10u %10u %10u %10u\n", 684 fmt_table, "agg rx_ba_rsp_cnt:",
759 "agg rx_ba_rsp_cnt:",
760 le32_to_cpu(tx->agg.rx_ba_rsp_cnt), 685 le32_to_cpu(tx->agg.rx_ba_rsp_cnt),
761 accum_tx->agg.rx_ba_rsp_cnt, 686 accum_tx->agg.rx_ba_rsp_cnt,
762 delta_tx->agg.rx_ba_rsp_cnt, 687 delta_tx->agg.rx_ba_rsp_cnt,
@@ -767,15 +692,15 @@ ssize_t iwl_ucode_tx_stats_read(struct file *file,
767 "tx power: (1/2 dB step)\n"); 692 "tx power: (1/2 dB step)\n");
768 if ((priv->cfg->valid_tx_ant & ANT_A) && tx->tx_power.ant_a) 693 if ((priv->cfg->valid_tx_ant & ANT_A) && tx->tx_power.ant_a)
769 pos += scnprintf(buf + pos, bufsz - pos, 694 pos += scnprintf(buf + pos, bufsz - pos,
770 "\tantenna A: 0x%X\n", 695 fmt_hex, "antenna A:",
771 tx->tx_power.ant_a); 696 tx->tx_power.ant_a);
772 if ((priv->cfg->valid_tx_ant & ANT_B) && tx->tx_power.ant_b) 697 if ((priv->cfg->valid_tx_ant & ANT_B) && tx->tx_power.ant_b)
773 pos += scnprintf(buf + pos, bufsz - pos, 698 pos += scnprintf(buf + pos, bufsz - pos,
774 "\tantenna B: 0x%X\n", 699 fmt_hex, "antenna B:",
775 tx->tx_power.ant_b); 700 tx->tx_power.ant_b);
776 if ((priv->cfg->valid_tx_ant & ANT_C) && tx->tx_power.ant_c) 701 if ((priv->cfg->valid_tx_ant & ANT_C) && tx->tx_power.ant_c)
777 pos += scnprintf(buf + pos, bufsz - pos, 702 pos += scnprintf(buf + pos, bufsz - pos,
778 "\tantenna C: 0x%X\n", 703 fmt_hex, "antenna C:",
779 tx->tx_power.ant_c); 704 tx->tx_power.ant_c);
780 } 705 }
781 ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); 706 ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
@@ -838,84 +763,72 @@ ssize_t iwl_ucode_general_stats_read(struct file *file, char __user *user_buf,
838 } 763 }
839 764
840 pos += iwl_statistics_flag(priv, buf, bufsz); 765 pos += iwl_statistics_flag(priv, buf, bufsz);
841 pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" 766 pos += scnprintf(buf + pos, bufsz - pos,
842 "acumulative delta max\n", 767 fmt_header, "Statistics_General:");
843 "Statistics_General:"); 768 pos += scnprintf(buf + pos, bufsz - pos,
844 pos += scnprintf(buf + pos, bufsz - pos, " %-30s %10u\n", 769 fmt_value, "temperature:",
845 "temperature:",
846 le32_to_cpu(general->temperature)); 770 le32_to_cpu(general->temperature));
847 pos += scnprintf(buf + pos, bufsz - pos, " %-30s %10u\n", 771 pos += scnprintf(buf + pos, bufsz - pos,
848 "temperature_m:", 772 fmt_value, "temperature_m:",
849 le32_to_cpu(general->temperature_m)); 773 le32_to_cpu(general->temperature_m));
850 pos += scnprintf(buf + pos, bufsz - pos, 774 pos += scnprintf(buf + pos, bufsz - pos,
851 " %-30s %10u %10u %10u %10u\n", 775 fmt_value, "ttl_timestamp:",
852 "burst_check:", 776 le32_to_cpu(general->ttl_timestamp));
777 pos += scnprintf(buf + pos, bufsz - pos,
778 fmt_table, "burst_check:",
853 le32_to_cpu(dbg->burst_check), 779 le32_to_cpu(dbg->burst_check),
854 accum_dbg->burst_check, 780 accum_dbg->burst_check,
855 delta_dbg->burst_check, max_dbg->burst_check); 781 delta_dbg->burst_check, max_dbg->burst_check);
856 pos += scnprintf(buf + pos, bufsz - pos, 782 pos += scnprintf(buf + pos, bufsz - pos,
857 " %-30s %10u %10u %10u %10u\n", 783 fmt_table, "burst_count:",
858 "burst_count:",
859 le32_to_cpu(dbg->burst_count), 784 le32_to_cpu(dbg->burst_count),
860 accum_dbg->burst_count, 785 accum_dbg->burst_count,
861 delta_dbg->burst_count, max_dbg->burst_count); 786 delta_dbg->burst_count, max_dbg->burst_count);
862 pos += scnprintf(buf + pos, bufsz - pos, 787 pos += scnprintf(buf + pos, bufsz - pos,
863 " %-30s %10u %10u %10u %10u\n", 788 fmt_table, "wait_for_silence_timeout_count:",
864 "wait_for_silence_timeout_count:",
865 le32_to_cpu(dbg->wait_for_silence_timeout_cnt), 789 le32_to_cpu(dbg->wait_for_silence_timeout_cnt),
866 accum_dbg->wait_for_silence_timeout_cnt, 790 accum_dbg->wait_for_silence_timeout_cnt,
867 delta_dbg->wait_for_silence_timeout_cnt, 791 delta_dbg->wait_for_silence_timeout_cnt,
868 max_dbg->wait_for_silence_timeout_cnt); 792 max_dbg->wait_for_silence_timeout_cnt);
869 pos += scnprintf(buf + pos, bufsz - pos, 793 pos += scnprintf(buf + pos, bufsz - pos,
870 " %-30s %10u %10u %10u %10u\n", 794 fmt_table, "sleep_time:",
871 "sleep_time:",
872 le32_to_cpu(general->sleep_time), 795 le32_to_cpu(general->sleep_time),
873 accum_general->sleep_time, 796 accum_general->sleep_time,
874 delta_general->sleep_time, max_general->sleep_time); 797 delta_general->sleep_time, max_general->sleep_time);
875 pos += scnprintf(buf + pos, bufsz - pos, 798 pos += scnprintf(buf + pos, bufsz - pos,
876 " %-30s %10u %10u %10u %10u\n", 799 fmt_table, "slots_out:",
877 "slots_out:",
878 le32_to_cpu(general->slots_out), 800 le32_to_cpu(general->slots_out),
879 accum_general->slots_out, 801 accum_general->slots_out,
880 delta_general->slots_out, max_general->slots_out); 802 delta_general->slots_out, max_general->slots_out);
881 pos += scnprintf(buf + pos, bufsz - pos, 803 pos += scnprintf(buf + pos, bufsz - pos,
882 " %-30s %10u %10u %10u %10u\n", 804 fmt_table, "slots_idle:",
883 "slots_idle:",
884 le32_to_cpu(general->slots_idle), 805 le32_to_cpu(general->slots_idle),
885 accum_general->slots_idle, 806 accum_general->slots_idle,
886 delta_general->slots_idle, max_general->slots_idle); 807 delta_general->slots_idle, max_general->slots_idle);
887 pos += scnprintf(buf + pos, bufsz - pos, "ttl_timestamp:\t\t\t%u\n",
888 le32_to_cpu(general->ttl_timestamp));
889 pos += scnprintf(buf + pos, bufsz - pos, 808 pos += scnprintf(buf + pos, bufsz - pos,
890 " %-30s %10u %10u %10u %10u\n", 809 fmt_table, "tx_on_a:",
891 "tx_on_a:",
892 le32_to_cpu(div->tx_on_a), accum_div->tx_on_a, 810 le32_to_cpu(div->tx_on_a), accum_div->tx_on_a,
893 delta_div->tx_on_a, max_div->tx_on_a); 811 delta_div->tx_on_a, max_div->tx_on_a);
894 pos += scnprintf(buf + pos, bufsz - pos, 812 pos += scnprintf(buf + pos, bufsz - pos,
895 " %-30s %10u %10u %10u %10u\n", 813 fmt_table, "tx_on_b:",
896 "tx_on_b:",
897 le32_to_cpu(div->tx_on_b), accum_div->tx_on_b, 814 le32_to_cpu(div->tx_on_b), accum_div->tx_on_b,
898 delta_div->tx_on_b, max_div->tx_on_b); 815 delta_div->tx_on_b, max_div->tx_on_b);
899 pos += scnprintf(buf + pos, bufsz - pos, 816 pos += scnprintf(buf + pos, bufsz - pos,
900 " %-30s %10u %10u %10u %10u\n", 817 fmt_table, "exec_time:",
901 "exec_time:",
902 le32_to_cpu(div->exec_time), accum_div->exec_time, 818 le32_to_cpu(div->exec_time), accum_div->exec_time,
903 delta_div->exec_time, max_div->exec_time); 819 delta_div->exec_time, max_div->exec_time);
904 pos += scnprintf(buf + pos, bufsz - pos, 820 pos += scnprintf(buf + pos, bufsz - pos,
905 " %-30s %10u %10u %10u %10u\n", 821 fmt_table, "probe_time:",
906 "probe_time:",
907 le32_to_cpu(div->probe_time), accum_div->probe_time, 822 le32_to_cpu(div->probe_time), accum_div->probe_time,
908 delta_div->probe_time, max_div->probe_time); 823 delta_div->probe_time, max_div->probe_time);
909 pos += scnprintf(buf + pos, bufsz - pos, 824 pos += scnprintf(buf + pos, bufsz - pos,
910 " %-30s %10u %10u %10u %10u\n", 825 fmt_table, "rx_enable_counter:",
911 "rx_enable_counter:",
912 le32_to_cpu(general->rx_enable_counter), 826 le32_to_cpu(general->rx_enable_counter),
913 accum_general->rx_enable_counter, 827 accum_general->rx_enable_counter,
914 delta_general->rx_enable_counter, 828 delta_general->rx_enable_counter,
915 max_general->rx_enable_counter); 829 max_general->rx_enable_counter);
916 pos += scnprintf(buf + pos, bufsz - pos, 830 pos += scnprintf(buf + pos, bufsz - pos,
917 " %-30s %10u %10u %10u %10u\n", 831 fmt_table, "num_of_sos_states:",
918 "num_of_sos_states:",
919 le32_to_cpu(general->num_of_sos_states), 832 le32_to_cpu(general->num_of_sos_states),
920 accum_general->num_of_sos_states, 833 accum_general->num_of_sos_states,
921 delta_general->num_of_sos_states, 834 delta_general->num_of_sos_states,