diff options
Diffstat (limited to 'drivers/net/wireless/ath5k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath5k/debug.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/ath5k/debug.c index d281b6e38629..413ed689cd5f 100644 --- a/drivers/net/wireless/ath5k/debug.c +++ b/drivers/net/wireless/ath5k/debug.c | |||
@@ -193,43 +193,6 @@ static const struct file_operations fops_registers = { | |||
193 | }; | 193 | }; |
194 | 194 | ||
195 | 195 | ||
196 | /* debugfs: TSF */ | ||
197 | |||
198 | static ssize_t read_file_tsf(struct file *file, char __user *user_buf, | ||
199 | size_t count, loff_t *ppos) | ||
200 | { | ||
201 | struct ath5k_softc *sc = file->private_data; | ||
202 | char buf[100]; | ||
203 | snprintf(buf, sizeof(buf), "0x%016llx\n", | ||
204 | (unsigned long long)ath5k_hw_get_tsf64(sc->ah)); | ||
205 | return simple_read_from_buffer(user_buf, count, ppos, buf, 19); | ||
206 | } | ||
207 | |||
208 | static ssize_t write_file_tsf(struct file *file, | ||
209 | const char __user *userbuf, | ||
210 | size_t count, loff_t *ppos) | ||
211 | { | ||
212 | struct ath5k_softc *sc = file->private_data; | ||
213 | char buf[20]; | ||
214 | |||
215 | if (copy_from_user(buf, userbuf, min(count, sizeof(buf)))) | ||
216 | return -EFAULT; | ||
217 | |||
218 | if (strncmp(buf, "reset", 5) == 0) { | ||
219 | ath5k_hw_reset_tsf(sc->ah); | ||
220 | printk(KERN_INFO "debugfs reset TSF\n"); | ||
221 | } | ||
222 | return count; | ||
223 | } | ||
224 | |||
225 | static const struct file_operations fops_tsf = { | ||
226 | .read = read_file_tsf, | ||
227 | .write = write_file_tsf, | ||
228 | .open = ath5k_debugfs_open, | ||
229 | .owner = THIS_MODULE, | ||
230 | }; | ||
231 | |||
232 | |||
233 | /* debugfs: beacons */ | 196 | /* debugfs: beacons */ |
234 | 197 | ||
235 | static ssize_t read_file_beacon(struct file *file, char __user *user_buf, | 198 | static ssize_t read_file_beacon(struct file *file, char __user *user_buf, |
@@ -423,9 +386,6 @@ ath5k_debug_init_device(struct ath5k_softc *sc) | |||
423 | sc->debug.debugfs_registers = debugfs_create_file("registers", S_IRUGO, | 386 | sc->debug.debugfs_registers = debugfs_create_file("registers", S_IRUGO, |
424 | sc->debug.debugfs_phydir, sc, &fops_registers); | 387 | sc->debug.debugfs_phydir, sc, &fops_registers); |
425 | 388 | ||
426 | sc->debug.debugfs_tsf = debugfs_create_file("tsf", S_IWUSR | S_IRUGO, | ||
427 | sc->debug.debugfs_phydir, sc, &fops_tsf); | ||
428 | |||
429 | sc->debug.debugfs_beacon = debugfs_create_file("beacon", S_IWUSR | S_IRUGO, | 389 | sc->debug.debugfs_beacon = debugfs_create_file("beacon", S_IWUSR | S_IRUGO, |
430 | sc->debug.debugfs_phydir, sc, &fops_beacon); | 390 | sc->debug.debugfs_phydir, sc, &fops_beacon); |
431 | 391 | ||
@@ -444,7 +404,6 @@ ath5k_debug_finish_device(struct ath5k_softc *sc) | |||
444 | { | 404 | { |
445 | debugfs_remove(sc->debug.debugfs_debug); | 405 | debugfs_remove(sc->debug.debugfs_debug); |
446 | debugfs_remove(sc->debug.debugfs_registers); | 406 | debugfs_remove(sc->debug.debugfs_registers); |
447 | debugfs_remove(sc->debug.debugfs_tsf); | ||
448 | debugfs_remove(sc->debug.debugfs_beacon); | 407 | debugfs_remove(sc->debug.debugfs_beacon); |
449 | debugfs_remove(sc->debug.debugfs_reset); | 408 | debugfs_remove(sc->debug.debugfs_reset); |
450 | debugfs_remove(sc->debug.debugfs_phydir); | 409 | debugfs_remove(sc->debug.debugfs_phydir); |