diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2009-03-03 12:14:18 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-05 14:39:44 -0500 |
commit | 860559fe686b44a533c83c79fe5d1ad41bf9e090 (patch) | |
tree | a3704272ed5522518cd7b89218289483e1249599 /drivers/net | |
parent | d216aaa674feb14a4aeb56bc3708f69d81c39d45 (diff) |
rt2x00: Export all register stats through debugfs
By exporting the register base, and word size to userspace
through debugfs it will be easier to create scripts which
parse the register information. This makes debugging and
register dumps information easier.
This will break my previous scripts which dumped and parsed
all information, but since this is only for debugging purposes
this change should not be a problem.
Dumpfiles created with the old version can be easily manually
edited to make them compatible with this new approach, which
means there will be no problems comparing dumps from the
different versions either.
Also be more consistent with using tabs to seperate different
fields.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00debug.c | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c index 8d47389d8874..07d378ef0b46 100644 --- a/drivers/net/wireless/rt2x00/rt2x00debug.c +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c | |||
@@ -547,9 +547,9 @@ static struct dentry *rt2x00debug_create_file_driver(const char *name, | |||
547 | return NULL; | 547 | return NULL; |
548 | 548 | ||
549 | blob->data = data; | 549 | blob->data = data; |
550 | data += sprintf(data, "driver: %s\n", intf->rt2x00dev->ops->name); | 550 | data += sprintf(data, "driver:\t%s\n", intf->rt2x00dev->ops->name); |
551 | data += sprintf(data, "version: %s\n", DRV_VERSION); | 551 | data += sprintf(data, "version:\t%s\n", DRV_VERSION); |
552 | data += sprintf(data, "compiled: %s %s\n", __DATE__, __TIME__); | 552 | data += sprintf(data, "compiled:\t%s %s\n", __DATE__, __TIME__); |
553 | blob->size = strlen(blob->data); | 553 | blob->size = strlen(blob->data); |
554 | 554 | ||
555 | return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob); | 555 | return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob); |
@@ -570,14 +570,27 @@ static struct dentry *rt2x00debug_create_file_chipset(const char *name, | |||
570 | return NULL; | 570 | return NULL; |
571 | 571 | ||
572 | blob->data = data; | 572 | blob->data = data; |
573 | data += sprintf(data, "rt chip: %04x\n", intf->rt2x00dev->chip.rt); | 573 | data += sprintf(data, "rt chip:\t%04x\n", intf->rt2x00dev->chip.rt); |
574 | data += sprintf(data, "rf chip: %04x\n", intf->rt2x00dev->chip.rf); | 574 | data += sprintf(data, "rf chip:\t%04x\n", intf->rt2x00dev->chip.rf); |
575 | data += sprintf(data, "revision:%08x\n", intf->rt2x00dev->chip.rev); | 575 | data += sprintf(data, "revision:\t%08x\n", intf->rt2x00dev->chip.rev); |
576 | data += sprintf(data, "\n"); | 576 | data += sprintf(data, "\n"); |
577 | data += sprintf(data, "csr length: %d\n", debug->csr.word_count); | 577 | data += sprintf(data, "register\tbase\twords\twordsize\n"); |
578 | data += sprintf(data, "eeprom length: %d\n", debug->eeprom.word_count); | 578 | data += sprintf(data, "csr\t%d\t%d\t%d\n", |
579 | data += sprintf(data, "bbp length: %d\n", debug->bbp.word_count); | 579 | debug->csr.word_base, |
580 | data += sprintf(data, "rf length: %d\n", debug->rf.word_count); | 580 | debug->csr.word_count, |
581 | debug->csr.word_size); | ||
582 | data += sprintf(data, "eeprom\t%d\t%d\t%d\n", | ||
583 | debug->eeprom.word_base, | ||
584 | debug->eeprom.word_count, | ||
585 | debug->eeprom.word_size); | ||
586 | data += sprintf(data, "bbp\t%d\t%d\t%d\n", | ||
587 | debug->bbp.word_base, | ||
588 | debug->bbp.word_count, | ||
589 | debug->bbp.word_size); | ||
590 | data += sprintf(data, "rf\t%d\t%d\t%d\n", | ||
591 | debug->rf.word_base, | ||
592 | debug->rf.word_count, | ||
593 | debug->rf.word_size); | ||
581 | blob->size = strlen(blob->data); | 594 | blob->size = strlen(blob->data); |
582 | 595 | ||
583 | return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob); | 596 | return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob); |