[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9830e3fb-3f08-4343-bae8-07d446f86173@oss.qualcomm.com>
Date: Wed, 5 Nov 2025 10:46:55 +0800
From: Baochen Qiang <baochen.qiang@....qualcomm.com>
To: "Yu Zhang(Yuriy)" <yu.zhang@....qualcomm.com>, jjohnson@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org,
ath11k@...ts.infradead.org,
Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@....qualcomm.com>
Subject: Re: [PATCH ath-next v2 5/6] wifi: ath11k: Register DBR event handler
for CFR data
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;
> +}
> +
Powered by blists - more mailing lists