Search Linux Wireless

Re: [PATCH] ath11k: add trace log support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/25/2023 2:24 AM, Wen Gong wrote:
On 11/9/2021 2:35 PM, Venkateswara Naralasetty wrote:
[...]
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 5ae2ef4..80f7760 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -249,6 +249,8 @@ static int ath11k_wmi_cmd_send_nowait(struct ath11k_pdev_wmi *wmi, struct sk_buf
      cmd_hdr = (struct wmi_cmd_hdr *)skb->data;
      cmd_hdr->cmd_id = cmd;
+    trace_ath11k_wmi_cmd(ab, cmd_id, skb->data, skb->len);
+
      memset(skb_cb, 0, sizeof(*skb_cb));
      ret = ath11k_htc_send(&ab->htc, wmi->eid, skb);

This will trace 3 times because ath11k_wmi_cmd_send()

calls ath11k_wmi_cmd_send_nowait() 3 times when the credit is not available.

Any one know how to change it with a good way?

my first thought is to have an iter = 0 variable in ath11k_wmi_cmd_send() and to add that as an additional param to ath11k_wmi_cmd_send_nowait():
ret = ath11k_wmi_cmd_send_nowait(wmi, skb, cmd_id, iter++);

then the trace logic would change to only trace on the first iteration:
if (!iter)
	trace_ath11k_wmi_cmd(ab, cmd_id, skb->data, skb->len);




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux