summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-03-30 17:51:54 -0700
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-05-28 18:01:35 -0700
commit44b849d11bf6801a642dd1aa9a70e470d046d273 (patch)
tree2e2e3f03f65868d94930ad4995da8db7494f33bb /drivers
parentfe442683853a2c0863b700acc4328b4d73090206 (diff)
downloadlinux-3.10-44b849d11bf6801a642dd1aa9a70e470d046d273.tar.gz
linux-3.10-44b849d11bf6801a642dd1aa9a70e470d046d273.tar.bz2
linux-3.10-44b849d11bf6801a642dd1aa9a70e470d046d273.zip
wimax/i2400m: trace commands sent from user space on the "echo" pipe
When commands are sent from user space, trace both the command sent and the answer received over the "echo" pipe instead of over the "trace" pipe when command tracing is enabled. As well, when the device sends a reports/indications, send it over the "echo" pipe. The "trace" pipe is used by the device to send firmware traces; gets confusing. Another named pipe makes it easier to split debug information. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wimax/i2400m/driver.c13
-rw-r--r--drivers/net/wimax/i2400m/rx.c3
2 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c
index a21318b34bf..d33389fd7bd 100644
--- a/drivers/net/wimax/i2400m/driver.c
+++ b/drivers/net/wimax/i2400m/driver.c
@@ -231,13 +231,20 @@ int i2400m_op_msg_from_user(struct wimax_dev *wimax_dev,
d_fnstart(4, dev, "(wimax_dev %p [i2400m %p] msg_buf %p "
"msg_len %zu genl_info %p)\n", wimax_dev, i2400m,
msg_buf, msg_len, genl_info);
+ if (unlikely(i2400m->trace_msg_from_user))
+ wimax_msg(&i2400m->wimax_dev, "echo",
+ msg_buf, msg_len, GFP_KERNEL);
ack_skb = i2400m_msg_to_dev(i2400m, msg_buf, msg_len);
result = PTR_ERR(ack_skb);
if (IS_ERR(ack_skb))
goto error_msg_to_dev;
- if (unlikely(i2400m->trace_msg_from_user))
- wimax_msg(&i2400m->wimax_dev, "trace",
- msg_buf, msg_len, GFP_KERNEL);
+ if (unlikely(i2400m->trace_msg_from_user)) {
+ const void *ack_data;
+ size_t ack_len;
+ ack_data = wimax_msg_data_len(ack_skb, &ack_len);
+ wimax_msg(&i2400m->wimax_dev, "echo",
+ ack_data, ack_len, GFP_KERNEL);
+ }
result = wimax_msg_send(&i2400m->wimax_dev, ack_skb);
error_msg_to_dev:
d_fnend(4, dev, "(wimax_dev %p [i2400m %p] msg_buf %p msg_len %zu "
diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c
index f9fc3890232..a4adc78102f 100644
--- a/drivers/net/wimax/i2400m/rx.c
+++ b/drivers/net/wimax/i2400m/rx.c
@@ -309,6 +309,9 @@ void i2400m_rx_ctl(struct i2400m *i2400m, struct sk_buff *skb_rx,
skb_get(skb_rx);
i2400m_queue_work(i2400m, i2400m_report_hook_work,
GFP_KERNEL, &args, sizeof(args));
+ if (unlikely(i2400m->trace_msg_from_user))
+ wimax_msg(&i2400m->wimax_dev, "echo",
+ l3l4_hdr, size, GFP_KERNEL);
result = wimax_msg(&i2400m->wimax_dev, NULL, l3l4_hdr, size,
GFP_KERNEL);
if (result < 0)