ATH11K Archive mirror
 help / color / mirror / Atom feed
From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: Wen Gong <quic_wgong@quicinc.com>,
	Venkateswara Naralasetty <quic_vnaralas@quicinc.com>,
	<ath11k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath11k: add trace log support
Date: Mon, 25 Sep 2023 08:05:44 -0700	[thread overview]
Message-ID: <7cb8dae5-81b6-4a01-84d3-cb60484a8bb5@quicinc.com> (raw)
In-Reply-To: <e1594171-6859-6b93-e865-3216975e6135@quicinc.com>

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);


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

      reply	other threads:[~2023-09-25 15:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09  6:35 [PATCH] ath11k: add trace log support Venkateswara Naralasetty
2021-11-17  7:29 ` Kalle Valo
2023-09-25  9:24 ` Wen Gong
2023-09-25 15:05   ` Jeff Johnson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7cb8dae5-81b6-4a01-84d3-cb60484a8bb5@quicinc.com \
    --to=quic_jjohnson@quicinc.com \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_vnaralas@quicinc.com \
    --cc=quic_wgong@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).