diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-06-05 11:47:43 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-06-10 13:27:54 -0400 |
commit | 2543a0c4c0fde46f9f206cec1e1cf951a2a63a66 (patch) | |
tree | a210cc5e152cb432acabf40efffe6344d9ccdb0b | |
parent | dacb6f1d8fa5200efc4e609fe63a750b960993b6 (diff) | |
download | op-kernel-dev-2543a0c4c0fde46f9f206cec1e1cf951a2a63a66.zip op-kernel-dev-2543a0c4c0fde46f9f206cec1e1cf951a2a63a66.tar.gz |
ar9170: interpret firmware debug commands
This adds new commands that the original firmware will not send
but we can use them to debug firmware.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ar9170/main.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index b104d7e..de57aa9 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c @@ -442,6 +442,38 @@ void ar9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len) /* retransmission issue / SIFS/EIFS collision ?! */ break; + /* firmware debug */ + case 0xca: + printk(KERN_DEBUG "ar9170 FW: %.*s\n", len - 4, (char *)buf + 4); + break; + case 0xcb: + len -= 4; + + switch (len) { + case 1: + printk(KERN_DEBUG "ar9170 FW: u8: %#.2x\n", + *((char *)buf + 4)); + break; + case 2: + printk(KERN_DEBUG "ar9170 FW: u8: %#.4x\n", + le16_to_cpup((__le16 *)((char *)buf + 4))); + break; + case 4: + printk(KERN_DEBUG "ar9170 FW: u8: %#.8x\n", + le32_to_cpup((__le32 *)((char *)buf + 4))); + break; + case 8: + printk(KERN_DEBUG "ar9170 FW: u8: %#.16lx\n", + (unsigned long)le64_to_cpup( + (__le64 *)((char *)buf + 4))); + break; + } + break; + case 0xcc: + print_hex_dump_bytes("ar9170 FW:", DUMP_PREFIX_NONE, + (char *)buf + 4, len - 4); + break; + default: printk(KERN_INFO "received unhandled event %x\n", cmd->type); print_hex_dump_bytes("dump:", DUMP_PREFIX_NONE, buf, len); |