diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-06-02 15:36:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-02 15:36:51 -0400 |
commit | 1c62c72b1a3c4478fb9069503d20c41b1f385ca1 (patch) | |
tree | 939634bedbabfcd389ab7ad96ab7e161e25b2061 /drivers/net/wireless/iwlwifi/iwl-debugfs.c | |
parent | da1fdb02d9200ff28b6f3a380d21930335fe5429 (diff) | |
parent | 9f6e1bafac4f3c58c8a670496adcc4d313d3c7f7 (diff) |
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debugfs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 81 |
1 files changed, 25 insertions, 56 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 9659c5d01df9..d9f21bb9d75d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -106,27 +106,6 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \ | |||
106 | .open = iwl_dbgfs_open_file_generic, \ | 106 | .open = iwl_dbgfs_open_file_generic, \ |
107 | }; | 107 | }; |
108 | 108 | ||
109 | int iwl_dbgfs_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz) | ||
110 | { | ||
111 | int p = 0; | ||
112 | |||
113 | p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n", | ||
114 | le32_to_cpu(priv->statistics.flag)); | ||
115 | if (le32_to_cpu(priv->statistics.flag) & UCODE_STATISTICS_CLEAR_MSK) | ||
116 | p += scnprintf(buf + p, bufsz - p, | ||
117 | "\tStatistics have been cleared\n"); | ||
118 | p += scnprintf(buf + p, bufsz - p, "\tOperational Frequency: %s\n", | ||
119 | (le32_to_cpu(priv->statistics.flag) & | ||
120 | UCODE_STATISTICS_FREQUENCY_MSK) | ||
121 | ? "2.4 GHz" : "5.2 GHz"); | ||
122 | p += scnprintf(buf + p, bufsz - p, "\tTGj Narrow Band: %s\n", | ||
123 | (le32_to_cpu(priv->statistics.flag) & | ||
124 | UCODE_STATISTICS_NARROW_BAND_MSK) | ||
125 | ? "enabled" : "disabled"); | ||
126 | return p; | ||
127 | } | ||
128 | EXPORT_SYMBOL(iwl_dbgfs_statistics_flag); | ||
129 | |||
130 | static ssize_t iwl_dbgfs_tx_statistics_read(struct file *file, | 109 | static ssize_t iwl_dbgfs_tx_statistics_read(struct file *file, |
131 | char __user *user_buf, | 110 | char __user *user_buf, |
132 | size_t count, loff_t *ppos) { | 111 | size_t count, loff_t *ppos) { |
@@ -330,45 +309,35 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf, | |||
330 | 309 | ||
331 | for (i = 0; i < max_sta; i++) { | 310 | for (i = 0; i < max_sta; i++) { |
332 | station = &priv->stations[i]; | 311 | station = &priv->stations[i]; |
333 | if (station->used) { | 312 | if (!station->used) |
334 | pos += scnprintf(buf + pos, bufsz - pos, | 313 | continue; |
335 | "station %d:\ngeneral data:\n", i+1); | 314 | pos += scnprintf(buf + pos, bufsz - pos, |
336 | pos += scnprintf(buf + pos, bufsz - pos, "id: %u\n", | 315 | "station %d - addr: %pM, flags: %#x\n", |
337 | station->sta.sta.sta_id); | 316 | i, station->sta.sta.addr, |
338 | pos += scnprintf(buf + pos, bufsz - pos, "mode: %u\n", | 317 | station->sta.station_flags_msk); |
339 | station->sta.mode); | 318 | pos += scnprintf(buf + pos, bufsz - pos, |
340 | pos += scnprintf(buf + pos, bufsz - pos, | 319 | "TID\tseq_num\ttxq_id\tframes\ttfds\t"); |
341 | "flags: 0x%x\n", | 320 | pos += scnprintf(buf + pos, bufsz - pos, |
342 | station->sta.station_flags_msk); | 321 | "start_idx\tbitmap\t\t\trate_n_flags\n"); |
343 | pos += scnprintf(buf + pos, bufsz - pos, "tid data:\n"); | ||
344 | pos += scnprintf(buf + pos, bufsz - pos, | ||
345 | "seq_num\t\ttxq_id"); | ||
346 | pos += scnprintf(buf + pos, bufsz - pos, | ||
347 | "\tframe_count\twait_for_ba\t"); | ||
348 | pos += scnprintf(buf + pos, bufsz - pos, | ||
349 | "start_idx\tbitmap0\t"); | ||
350 | pos += scnprintf(buf + pos, bufsz - pos, | ||
351 | "bitmap1\trate_n_flags"); | ||
352 | pos += scnprintf(buf + pos, bufsz - pos, "\n"); | ||
353 | 322 | ||
354 | for (j = 0; j < MAX_TID_COUNT; j++) { | 323 | for (j = 0; j < MAX_TID_COUNT; j++) { |
355 | pos += scnprintf(buf + pos, bufsz - pos, | 324 | pos += scnprintf(buf + pos, bufsz - pos, |
356 | "[%d]:\t\t%u", j, | 325 | "%d:\t%#x\t%#x\t%u\t%u\t%u\t\t%#.16llx\t%#x", |
357 | station->tid[j].seq_number); | 326 | j, station->tid[j].seq_number, |
358 | pos += scnprintf(buf + pos, bufsz - pos, | 327 | station->tid[j].agg.txq_id, |
359 | "\t%u\t\t%u\t\t%u\t\t", | 328 | station->tid[j].agg.frame_count, |
360 | station->tid[j].agg.txq_id, | 329 | station->tid[j].tfds_in_queue, |
361 | station->tid[j].agg.frame_count, | 330 | station->tid[j].agg.start_idx, |
362 | station->tid[j].agg.wait_for_ba); | 331 | station->tid[j].agg.bitmap, |
332 | station->tid[j].agg.rate_n_flags); | ||
333 | |||
334 | if (station->tid[j].agg.wait_for_ba) | ||
363 | pos += scnprintf(buf + pos, bufsz - pos, | 335 | pos += scnprintf(buf + pos, bufsz - pos, |
364 | "%u\t%llu\t%u", | 336 | " - waitforba"); |
365 | station->tid[j].agg.start_idx, | ||
366 | (unsigned long long)station->tid[j].agg.bitmap, | ||
367 | station->tid[j].agg.rate_n_flags); | ||
368 | pos += scnprintf(buf + pos, bufsz - pos, "\n"); | ||
369 | } | ||
370 | pos += scnprintf(buf + pos, bufsz - pos, "\n"); | 337 | pos += scnprintf(buf + pos, bufsz - pos, "\n"); |
371 | } | 338 | } |
339 | |||
340 | pos += scnprintf(buf + pos, bufsz - pos, "\n"); | ||
372 | } | 341 | } |
373 | 342 | ||
374 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); | 343 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); |