* [PATCH] ath10k: Log firmware debug prints and dbg logs.
@ 2013-10-23 22:31 greearb
2013-10-24 5:05 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: greearb @ 2013-10-23 22:31 UTC (permalink / raw)
To: ath10k; +Cc: kvalo, Ben Greear
From: Ben Greear <greearb@candelatech.com>
This should aid in debugging firmware issues on standard
NIC hardware that does not have a serial port.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
NOTE: This requires a previous patch sent privately to kvalo.
drivers/net/wireless/ath/ath10k/debug.h | 1 +
drivers/net/wireless/ath/ath10k/wmi.c | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h
index 845c661..807bf03 100644
--- a/drivers/net/wireless/ath/ath10k/debug.h
+++ b/drivers/net/wireless/ath/ath10k/debug.h
@@ -33,6 +33,7 @@ enum ath10k_debug_mask {
ATH10K_DBG_MGMT = 0x00000100,
ATH10K_DBG_DATA = 0x00000200,
ATH10K_DBG_BMI = 0x00000400,
+ ATH10K_DBG_FIRMWARE = 0x00000800,
ATH10K_DBG_ANY = 0xffffffff,
};
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index a796d0b..34cff8b 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1046,7 +1046,12 @@ static void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb)
static void ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb)
{
- ath10k_dbg(ATH10K_DBG_WMI, "WMI_DEBUG_MESG_EVENTID\n");
+ u32 *m = (u32 *)(skb->data);
+ ath10k_dbg(ATH10K_DBG_WMI, "WMI_DEBUG_MESG_EVENTID, dropped: %i\n",
+ m[0]);
+ /* Format is dropped-count(u32) [message buffer]. */
+ if (ath10k_debug_mask & ATH10K_DBG_FIRMWARE)
+ ath10k_dbg_print_fw_dbg_buffer((u8 *)(&(m[1])), skb->len - 4);
}
static void ath10k_wmi_event_update_stats(struct ath10k *ar,
@@ -1402,7 +1407,10 @@ static void ath10k_wmi_event_profile_match(struct ath10k *ar,
static void ath10k_wmi_event_debug_print(struct ath10k *ar,
struct sk_buff *skb)
{
+ struct wmi_debug_mesg_event *ev;
+ ev = (struct wmi_debug_mesg_event *)(skb->data);
ath10k_dbg(ATH10K_DBG_WMI, "WMI_DEBUG_PRINT_EVENTID\n");
+ ath10k_dbg(ATH10K_DBG_FIRMWARE, "%s\n", ev->bufp);
}
static void ath10k_wmi_event_pdev_qvit(struct ath10k *ar, struct sk_buff *skb)
--
1.7.11.7
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath10k: Log firmware debug prints and dbg logs.
2013-10-23 22:31 [PATCH] ath10k: Log firmware debug prints and dbg logs greearb
@ 2013-10-24 5:05 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2013-10-24 5:05 UTC (permalink / raw)
To: greearb; +Cc: ath10k
<greearb@candelatech.com> writes:
> From: Ben Greear <greearb@candelatech.com>
>
> This should aid in debugging firmware issues on standard
> NIC hardware that does not have a serial port.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
I have been working on using a tracepoint for this. That way we can do
this in user space.
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-24 5:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-23 22:31 [PATCH] ath10k: Log firmware debug prints and dbg logs greearb
2013-10-24 5:05 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox