diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-04-07 03:53:45 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-04-07 10:09:51 -0400 |
commit | 18f85e38fb0687daa44d9c696c0df97edbab239f (patch) | |
tree | 3a569c891106ea9621d7cf5298814f9f01c5bdf7 | |
parent | e3e4e76fce3671d9f002f99454d9776cb1659b13 (diff) |
mac80211 plugin: fix flag parsing error
This fixes an error in the mac80211 plugin
when it parses flags, seems we never noticed
because I ordered the flags properly.
Also add the new QOS flag.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | plugin_mac80211.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugin_mac80211.c b/plugin_mac80211.c index 7c14de4..6aeb256 100644 --- a/plugin_mac80211.c +++ b/plugin_mac80211.c | |||
@@ -145,14 +145,14 @@ static void _print_flag(struct trace_seq *s, struct event_format *event, | |||
145 | 145 | ||
146 | found = 0; | 146 | found = 0; |
147 | for (j = 0; j < n_names; j++) { | 147 | for (j = 0; j < n_names; j++) { |
148 | if (j == names[i].value) { | 148 | if (i == names[j].value) { |
149 | trace_seq_puts(s, names[i].name); | 149 | trace_seq_puts(s, names[j].name); |
150 | found = 1; | 150 | found = 1; |
151 | break; | 151 | break; |
152 | } | 152 | } |
153 | } | 153 | } |
154 | if (!found) | 154 | if (!found) |
155 | trace_seq_printf(s, "b%d", i); | 155 | trace_seq_printf(s, "flag_%d", i); |
156 | } | 156 | } |
157 | } | 157 | } |
158 | 158 | ||
@@ -203,7 +203,9 @@ static int drv_config(struct trace_seq *s, struct record *record, | |||
203 | print_flag(s, event, "flags", data, | 203 | print_flag(s, event, "flags", data, |
204 | { 0, "MONITOR" }, | 204 | { 0, "MONITOR" }, |
205 | { 1, "PS" }, | 205 | { 1, "PS" }, |
206 | { 2, "IDLE" }); | 206 | { 2, "IDLE" }, |
207 | { 3, "QOS"}, | ||
208 | ); | ||
207 | print_field(s, " chan:%d/", event, "center_freq", data); | 209 | print_field(s, " chan:%d/", event, "center_freq", data); |
208 | print_enum(s, event, "channel_type", data, | 210 | print_enum(s, event, "channel_type", data, |
209 | { 0, "noht" }, | 211 | { 0, "noht" }, |