535489185f466127950e966216ec91a699d339b0
[openwrt.git] / package / mac80211 / patches / 319-rt2x00-Export-all-register-stats-through-debugfs.patch
1 From d64551dfc4c7fba6a94f7245393d173199ac9e07 Mon Sep 17 00:00:00 2001
2 From: Ivo van Doorn <IvDoorn@gmail.com>
3 Date: Sun, 8 Feb 2009 17:39:35 +0100
4 Subject: [PATCH] rt2x00: Export all register stats through debugfs
5
6 By exporting the register base, and word size to userspace
7 through debugfs it will be easier to create scripts which
8 parse the register information. This makes debugging and
9 register dumps information easier.
10 This will unfortunately not be backward compatible with
11 the previous approach, but that is not important in this case
12 since manually fixing the layout of the dumpfile to match the
13 new style then interpreting the data without a script.
14
15 Also be more consistent with using tabs to seperate different
16 fields.
17
18 Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
19 ---
20 drivers/net/wireless/rt2x00/rt2x00debug.c | 33 ++++++++++++++++++++--------
21 1 files changed, 23 insertions(+), 10 deletions(-)
22
23 --- a/drivers/net/wireless/rt2x00/rt2x00debug.c
24 +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c
25 @@ -547,9 +547,9 @@ static struct dentry *rt2x00debug_create
26 return NULL;
27
28 blob->data = data;
29 - data += sprintf(data, "driver: %s\n", intf->rt2x00dev->ops->name);
30 - data += sprintf(data, "version: %s\n", DRV_VERSION);
31 - data += sprintf(data, "compiled: %s %s\n", __DATE__, __TIME__);
32 + data += sprintf(data, "driver:\t%s\n", intf->rt2x00dev->ops->name);
33 + data += sprintf(data, "version:\t%s\n", DRV_VERSION);
34 + data += sprintf(data, "compiled:\t%s %s\n", __DATE__, __TIME__);
35 blob->size = strlen(blob->data);
36
37 return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob);
38 @@ -570,14 +570,27 @@ static struct dentry *rt2x00debug_create
39 return NULL;
40
41 blob->data = data;
42 - data += sprintf(data, "rt chip: %04x\n", intf->rt2x00dev->chip.rt);
43 - data += sprintf(data, "rf chip: %04x\n", intf->rt2x00dev->chip.rf);
44 - data += sprintf(data, "revision:%08x\n", intf->rt2x00dev->chip.rev);
45 + data += sprintf(data, "rt chip:\t%04x\n", intf->rt2x00dev->chip.rt);
46 + data += sprintf(data, "rf chip:\t%04x\n", intf->rt2x00dev->chip.rf);
47 + data += sprintf(data, "revision:\t%08x\n", intf->rt2x00dev->chip.rev);
48 data += sprintf(data, "\n");
49 - data += sprintf(data, "csr length: %d\n", debug->csr.word_count);
50 - data += sprintf(data, "eeprom length: %d\n", debug->eeprom.word_count);
51 - data += sprintf(data, "bbp length: %d\n", debug->bbp.word_count);
52 - data += sprintf(data, "rf length: %d\n", debug->rf.word_count);
53 + data += sprintf(data, "register\tbase\twords\twordsize\n");
54 + data += sprintf(data, "csr\t%d\t%d\t%d\n",
55 + debug->csr.word_base,
56 + debug->csr.word_count,
57 + debug->csr.word_size);
58 + data += sprintf(data, "eeprom\t%d\t%d\t%d\n",
59 + debug->eeprom.word_base,
60 + debug->eeprom.word_count,
61 + debug->eeprom.word_size);
62 + data += sprintf(data, "bbp\t%d\t%d\t%d\n",
63 + debug->bbp.word_base,
64 + debug->bbp.word_count,
65 + debug->bbp.word_size);
66 + data += sprintf(data, "rf\t%d\t%d\t%d\n",
67 + debug->rf.word_base,
68 + debug->rf.word_count,
69 + debug->rf.word_size);
70 blob->size = strlen(blob->data);
71
72 return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob);
This page took 0.056275 seconds and 3 git commands to generate.