370
/* wl->irq_lock is locked */
371
static ssize_t tsf_read_file(struct b43_wldev *dev,
372
char *buf, size_t bufsize)
377
b43_tsf_read(dev, &tsf);
378
fappend("0x%08x%08x\n",
379
(unsigned int)((tsf & 0xFFFFFFFF00000000ULL) >> 32),
380
(unsigned int)(tsf & 0xFFFFFFFFULL));
385
/* wl->irq_lock is locked */
386
static int tsf_write_file(struct b43_wldev *dev,
387
const char *buf, size_t count)
391
if (sscanf(buf, "%llu", (unsigned long long *)(&tsf)) != 1)
393
b43_tsf_write(dev, tsf);
398
370
static ssize_t txstat_read_file(struct b43_wldev *dev,
399
371
char *buf, size_t bufsize)
691
663
B43_DEBUGFS_FOPS(mmio16write, NULL, mmio16write__write_file, 1);
692
664
B43_DEBUGFS_FOPS(mmio32read, mmio32read__read_file, mmio32read__write_file, 1);
693
665
B43_DEBUGFS_FOPS(mmio32write, NULL, mmio32write__write_file, 1);
694
B43_DEBUGFS_FOPS(tsf, tsf_read_file, tsf_write_file, 1);
695
666
B43_DEBUGFS_FOPS(txstat, txstat_read_file, NULL, 0);
696
667
B43_DEBUGFS_FOPS(restart, NULL, restart_write_file, 1);
697
668
B43_DEBUGFS_FOPS(loctls, loctls_read_file, NULL, 0);
700
int b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)
671
bool b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)
702
return !!(dev->dfsentry && dev->dfsentry->dyn_debug[feature]);
675
enabled = (dev->dfsentry && dev->dfsentry->dyn_debug[feature]);
676
if (unlikely(enabled)) {
677
/* Force full debugging messages, if the user enabled
678
* some dynamic debugging feature. */
679
b43_modparam_verbose = B43_VERBOSITY_MAX;
705
685
static void b43_remove_dynamic_debug(struct b43_wldev *dev)
834
813
debugfs_remove(e->file_mmio16write.dentry);
835
814
debugfs_remove(e->file_mmio32read.dentry);
836
815
debugfs_remove(e->file_mmio32write.dentry);
837
debugfs_remove(e->file_tsf.dentry);
838
816
debugfs_remove(e->file_txstat.dentry);
839
817
debugfs_remove(e->file_restart.dentry);
840
818
debugfs_remove(e->file_loctls.dentry);