diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-04-23 17:25:51 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2012-04-23 17:27:56 -0400 |
commit | 56322f5e0d08476f72981f84dd0c784a830163a2 (patch) | |
tree | 8a6b430ad767ff7e47c333e4cd71b05e80b35747 /drivers/net/wireless/iwlwifi/iwl-debugfs.c | |
parent | 063c51667f4f1f17e277add5cefb4cbe97108d40 (diff) |
iwlwifi: remove TX/RX frame statistics
Keeping statistics per frame type really isn't
very useful, and needs a huge amount of code
so remove it. Since that is the only thing in
iwl-core.{c,h} now, those files can be killed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debugfs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index eb93fddfa149..f612ce8fdffe 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | #include "iwl-dev.h" | 38 | #include "iwl-dev.h" |
39 | #include "iwl-debug.h" | 39 | #include "iwl-debug.h" |
40 | #include "iwl-core.h" | ||
41 | #include "iwl-io.h" | 40 | #include "iwl-io.h" |
42 | #include "iwl-agn.h" | 41 | #include "iwl-agn.h" |
43 | 42 | ||
@@ -111,85 +110,6 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \ | |||
111 | .llseek = generic_file_llseek, \ | 110 | .llseek = generic_file_llseek, \ |
112 | }; | 111 | }; |
113 | 112 | ||
114 | static ssize_t iwl_dbgfs_tx_statistics_read(struct file *file, | ||
115 | char __user *user_buf, | ||
116 | size_t count, loff_t *ppos) { | ||
117 | |||
118 | struct iwl_priv *priv = file->private_data; | ||
119 | char *buf; | ||
120 | int pos = 0; | ||
121 | |||
122 | int cnt; | ||
123 | ssize_t ret; | ||
124 | const size_t bufsz = 100 + | ||
125 | sizeof(char) * 50 * (MANAGEMENT_MAX + CONTROL_MAX); | ||
126 | buf = kzalloc(bufsz, GFP_KERNEL); | ||
127 | if (!buf) | ||
128 | return -ENOMEM; | ||
129 | pos += scnprintf(buf + pos, bufsz - pos, "Management:\n"); | ||
130 | for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) { | ||
131 | pos += scnprintf(buf + pos, bufsz - pos, | ||
132 | "\t%25s\t\t: %u\n", | ||
133 | get_mgmt_string(cnt), | ||
134 | priv->tx_stats.mgmt[cnt]); | ||
135 | } | ||
136 | pos += scnprintf(buf + pos, bufsz - pos, "Control\n"); | ||
137 | for (cnt = 0; cnt < CONTROL_MAX; cnt++) { | ||
138 | pos += scnprintf(buf + pos, bufsz - pos, | ||
139 | "\t%25s\t\t: %u\n", | ||
140 | get_ctrl_string(cnt), | ||
141 | priv->tx_stats.ctrl[cnt]); | ||
142 | } | ||
143 | pos += scnprintf(buf + pos, bufsz - pos, "Data:\n"); | ||
144 | pos += scnprintf(buf + pos, bufsz - pos, "\tcnt: %u\n", | ||
145 | priv->tx_stats.data_cnt); | ||
146 | pos += scnprintf(buf + pos, bufsz - pos, "\tbytes: %llu\n", | ||
147 | priv->tx_stats.data_bytes); | ||
148 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); | ||
149 | kfree(buf); | ||
150 | return ret; | ||
151 | } | ||
152 | |||
153 | static ssize_t iwl_dbgfs_rx_statistics_read(struct file *file, | ||
154 | char __user *user_buf, | ||
155 | size_t count, loff_t *ppos) { | ||
156 | |||
157 | struct iwl_priv *priv = file->private_data; | ||
158 | char *buf; | ||
159 | int pos = 0; | ||
160 | int cnt; | ||
161 | ssize_t ret; | ||
162 | const size_t bufsz = 100 + | ||
163 | sizeof(char) * 50 * (MANAGEMENT_MAX + CONTROL_MAX); | ||
164 | buf = kzalloc(bufsz, GFP_KERNEL); | ||
165 | if (!buf) | ||
166 | return -ENOMEM; | ||
167 | |||
168 | pos += scnprintf(buf + pos, bufsz - pos, "Management:\n"); | ||
169 | for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) { | ||
170 | pos += scnprintf(buf + pos, bufsz - pos, | ||
171 | "\t%25s\t\t: %u\n", | ||
172 | get_mgmt_string(cnt), | ||
173 | priv->rx_stats.mgmt[cnt]); | ||
174 | } | ||
175 | pos += scnprintf(buf + pos, bufsz - pos, "Control:\n"); | ||
176 | for (cnt = 0; cnt < CONTROL_MAX; cnt++) { | ||
177 | pos += scnprintf(buf + pos, bufsz - pos, | ||
178 | "\t%25s\t\t: %u\n", | ||
179 | get_ctrl_string(cnt), | ||
180 | priv->rx_stats.ctrl[cnt]); | ||
181 | } | ||
182 | pos += scnprintf(buf + pos, bufsz - pos, "Data:\n"); | ||
183 | pos += scnprintf(buf + pos, bufsz - pos, "\tcnt: %u\n", | ||
184 | priv->rx_stats.data_cnt); | ||
185 | pos += scnprintf(buf + pos, bufsz - pos, "\tbytes: %llu\n", | ||
186 | priv->rx_stats.data_bytes); | ||
187 | |||
188 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); | ||
189 | kfree(buf); | ||
190 | return ret; | ||
191 | } | ||
192 | |||
193 | static ssize_t iwl_dbgfs_sram_read(struct file *file, | 113 | static ssize_t iwl_dbgfs_sram_read(struct file *file, |
194 | char __user *user_buf, | 114 | char __user *user_buf, |
195 | size_t count, loff_t *ppos) | 115 | size_t count, loff_t *ppos) |
@@ -2405,8 +2325,6 @@ static ssize_t iwl_dbgfs_calib_disabled_write(struct file *file, | |||
2405 | return count; | 2325 | return count; |
2406 | } | 2326 | } |
2407 | 2327 | ||
2408 | DEBUGFS_READ_FILE_OPS(rx_statistics); | ||
2409 | DEBUGFS_READ_FILE_OPS(tx_statistics); | ||
2410 | DEBUGFS_READ_FILE_OPS(ucode_rx_stats); | 2328 | DEBUGFS_READ_FILE_OPS(ucode_rx_stats); |
2411 | DEBUGFS_READ_FILE_OPS(ucode_tx_stats); | 2329 | DEBUGFS_READ_FILE_OPS(ucode_tx_stats); |
2412 | DEBUGFS_READ_FILE_OPS(ucode_general_stats); | 2330 | DEBUGFS_READ_FILE_OPS(ucode_general_stats); |
@@ -2468,8 +2386,6 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
2468 | DEBUGFS_ADD_FILE(disable_ht40, dir_data, S_IWUSR | S_IRUSR); | 2386 | DEBUGFS_ADD_FILE(disable_ht40, dir_data, S_IWUSR | S_IRUSR); |
2469 | DEBUGFS_ADD_FILE(temperature, dir_data, S_IRUSR); | 2387 | DEBUGFS_ADD_FILE(temperature, dir_data, S_IRUSR); |
2470 | 2388 | ||
2471 | DEBUGFS_ADD_FILE(rx_statistics, dir_debug, S_IRUSR); | ||
2472 | DEBUGFS_ADD_FILE(tx_statistics, dir_debug, S_IRUSR); | ||
2473 | DEBUGFS_ADD_FILE(power_save_status, dir_debug, S_IRUSR); | 2389 | DEBUGFS_ADD_FILE(power_save_status, dir_debug, S_IRUSR); |
2474 | DEBUGFS_ADD_FILE(clear_ucode_statistics, dir_debug, S_IWUSR); | 2390 | DEBUGFS_ADD_FILE(clear_ucode_statistics, dir_debug, S_IWUSR); |
2475 | DEBUGFS_ADD_FILE(missed_beacon, dir_debug, S_IWUSR); | 2391 | DEBUGFS_ADD_FILE(missed_beacon, dir_debug, S_IWUSR); |