From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
To: "Yu Zhang(Yuriy)" <yu.zhang@oss.qualcomm.com>, jjohnson@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
ath11k@lists.infradead.org,
Vasanthakumar Thiagarajan
<vasanthakumar.thiagarajan@oss.qualcomm.com>
Subject: Re: [PATCH ath-next v2 5/6] wifi: ath11k: Register DBR event handler for CFR data
Date: Wed, 5 Nov 2025 10:46:55 +0800 [thread overview]
Message-ID: <9830e3fb-3f08-4343-bae8-07d446f86173@oss.qualcomm.com> (raw)
In-Reply-To: <20251104162633.3007874-6-yu.zhang@oss.qualcomm.com>
On 11/5/2025 12:26 AM, Yu Zhang(Yuriy) wrote:
> +static enum ath11k_cfr_correlate_status
> +ath11k_cfr_correlate_and_relay(struct ath11k *ar,
> + struct ath11k_look_up_table *lut,
> + u8 event_type)
> +{
> + enum ath11k_cfr_correlate_status status;
> + struct ath11k_cfr *cfr = &ar->cfr;
> + u64 diff;
> +
> + if (event_type == ATH11K_CORRELATE_TX_EVENT) {
> + if (lut->tx_recv)
> + cfr->cfr_dma_aborts++;
> + cfr->tx_evt_cnt++;
> + lut->tx_recv = true;
> + } else if (event_type == ATH11K_CORRELATE_DBR_EVENT) {
> + cfr->dbr_evt_cnt++;
> + lut->dbr_recv = true;
> + }
> +
> + if (lut->dbr_recv && lut->tx_recv) {
> + if (lut->dbr_ppdu_id == lut->tx_ppdu_id) {
> + /* 64-bit counters make wraparound highly improbable,
> + * wraparound handling is omitted.
> + */
I was meaning that we need to change to the common Linux comment style which starts with
an empty line:
/*
* your comments start here
*/
> + cfr->last_success_tstamp = lut->dbr_tstamp;
> + if (lut->dbr_tstamp > lut->txrx_tstamp) {
> + diff = lut->dbr_tstamp - lut->txrx_tstamp;
> + ath11k_dbg(ar->ab, ATH11K_DBG_CFR,
> + "txrx event -> dbr event delay = %u ms",
> + jiffies_to_msecs(diff));
> + } else if (lut->txrx_tstamp > lut->dbr_tstamp) {
> + diff = lut->txrx_tstamp - lut->dbr_tstamp;
> + ath11k_dbg(ar->ab, ATH11K_DBG_CFR,
> + "dbr event -> txrx event delay = %u ms",
> + jiffies_to_msecs(diff));
> + }
> +
> + ath11k_cfr_free_pending_dbr_events(ar);
> +
> + cfr->release_cnt++;
> + status = ATH11K_CORRELATE_STATUS_RELEASE;
> + } else {
> + /* Discard TXRX event on PPDU ID mismatch because multiple PPDUs
> + * may share the same DMA address due to ucode aborts.
> + */
> +
same here
> + ath11k_dbg(ar->ab, ATH11K_DBG_CFR,
> + "Received dbr event twice for the same lut entry");
> + lut->tx_recv = false;
> + lut->tx_ppdu_id = 0;
> + cfr->clear_txrx_event++;
> + cfr->cfr_dma_aborts++;
> + status = ATH11K_CORRELATE_STATUS_HOLD;
> + }
> + } else {
> + status = ATH11K_CORRELATE_STATUS_HOLD;
> + }
> +
> + return status;
> +}
> +
next prev parent reply other threads:[~2025-11-05 2:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 16:26 [PATCH ath-next v2 0/6] wifi: ath11k: Add single shot/periodic CFR capture support Yu Zhang(Yuriy)
2025-11-04 16:26 ` [PATCH ath-next v2 1/6] wifi: ath11k: Add initialization and deinitialization sequence for CFR module Yu Zhang(Yuriy)
2025-11-05 2:40 ` Baochen Qiang
2025-11-04 16:26 ` [PATCH ath-next v2 2/6] wifi: ath11k: Register debugfs for CFR configuration Yu Zhang(Yuriy)
2025-11-04 16:26 ` [PATCH ath-next v2 3/6] wifi: ath11k: Add support unassociated client CFR Yu Zhang(Yuriy)
2025-11-04 16:26 ` [PATCH ath-next v2 4/6] wifi: ath11k: Register relayfs entries for CFR dump Yu Zhang(Yuriy)
2025-11-04 16:26 ` [PATCH ath-next v2 5/6] wifi: ath11k: Register DBR event handler for CFR data Yu Zhang(Yuriy)
2025-11-05 2:46 ` Baochen Qiang [this message]
2025-11-04 16:26 ` [PATCH ath-next v2 6/6] wifi: ath11k: Register handler for CFR capture event Yu Zhang(Yuriy)
2025-11-05 2:49 ` Baochen Qiang
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=9830e3fb-3f08-4343-bae8-07d446f86173@oss.qualcomm.com \
--to=baochen.qiang@oss.qualcomm.com \
--cc=ath11k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=vasanthakumar.thiagarajan@oss.qualcomm.com \
--cc=yu.zhang@oss.qualcomm.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