From: Kalle Valo <kvalo@kernel.org>
To: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
Cc: ath12k@lists.infradead.org, linux-wireless@vger.kernel.org,
Dinesh Karthikeyan <quic_dinek@quicinc.com>
Subject: Re: [PATCH v2 2/5] wifi: ath12k: Add htt_stats_dump file ops support
Date: Tue, 21 May 2024 10:53:59 +0300 [thread overview]
Message-ID: <87ttird2i0.fsf@kernel.org> (raw)
In-Reply-To: <20240510050806.514126-3-quic_rgnanase@quicinc.com> (Ramya Gnanasekar's message of "Fri, 10 May 2024 10:38:03 +0530")
Ramya Gnanasekar <quic_rgnanase@quicinc.com> writes:
> From: Dinesh Karthikeyan <quic_dinek@quicinc.com>
>
> Add dump_htt_stats file operation to dump the stats value requested
> for the requested stats_type.
> Stats sent from firmware will be cumulative. Hence add debugfs to reset
> the requested stats type.
>
> Example with one ath12k device:
>
> ath12k
> `-- pci-0000:06:00.0
> |-- mac0
> `-- htt_stats
> |-- htt_stats_type
> |-- htt_stats_reset
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>
> Signed-off-by: Dinesh Karthikeyan <quic_dinek@quicinc.com>
> Co-developed-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
> Signed-off-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
> ---
> drivers/net/wireless/ath/ath12k/core.h | 2 +
> .../wireless/ath/ath12k/debugfs_htt_stats.c | 202 ++++++++++++++++++
> .../wireless/ath/ath12k/debugfs_htt_stats.h | 30 +++
> 3 files changed, 234 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
> index 3919bc828620..77c0842e5ab0 100644
> --- a/drivers/net/wireless/ath/ath12k/core.h
> +++ b/drivers/net/wireless/ath/ath12k/core.h
> @@ -477,6 +477,8 @@ struct ath12k_fw_stats {
> struct ath12k_dbg_htt_stats {
> enum ath12k_dbg_htt_ext_stats_type type;
> u32 cfg_param[4];
> + u8 reset;
> + struct debug_htt_stats_req *stats_req;
Please document with a code comment how these are protected
> /* protects shared stats req buffer */
> spinlock_t lock;
I'm guessing "stats req buffer" refers to struct
ath12k_dbg_htt_stats::stats_req. But at least in
ath12k_release_htt_stats() you are using conf_mutex for protection:
static int ath12k_release_htt_stats(struct inode *inode,
struct file *file)
{
struct ath12k *ar = inode->i_private;
mutex_lock(&ar->conf_mutex);
kfree(file->private_data);
ar->debug.htt_stats.stats_req = NULL;
mutex_unlock(&ar->conf_mutex);
return 0;
}
> +static int ath12k_debugfs_htt_stats_req(struct ath12k *ar)
> +{
> + struct debug_htt_stats_req *stats_req = ar->debug.htt_stats.stats_req;
> + enum ath12k_dbg_htt_ext_stats_type type = stats_req->type;
> + u64 cookie;
> + int ret, pdev_id = ar->pdev->pdev_id;
> + struct htt_ext_stats_cfg_params cfg_params = { 0 };
> +
> + init_completion(&stats_req->htt_stats_rcvd);
> +
> + stats_req->done = false;
> + stats_req->pdev_id = pdev_id;
The locking design is not clear for me yet but I suspect this function
needs:
lockdep_assert_held(&ar->conf_mutex);
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2024-05-21 7:54 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 5:08 [PATCH v2 0/5] wifi: ath12k: Add support to enable debugfs_htt_stats Ramya Gnanasekar
2024-05-10 5:08 ` [PATCH v2 1/5] " Ramya Gnanasekar
2024-05-10 19:53 ` Jeff Johnson
2024-05-21 7:49 ` Kalle Valo
2024-05-27 10:42 ` Ramya Gnanasekar
2024-05-10 5:08 ` [PATCH v2 2/5] wifi: ath12k: Add htt_stats_dump file ops support Ramya Gnanasekar
2024-05-10 19:53 ` Jeff Johnson
2024-05-21 7:53 ` Kalle Valo [this message]
2024-05-10 5:08 ` [PATCH v2 3/5] wifi: ath12k: Fix Pdev id in HTT stats request for WCN7850 Ramya Gnanasekar
2024-05-10 19:53 ` Jeff Johnson
2024-05-21 7:57 ` Kalle Valo
2024-05-23 12:34 ` Lingbo Kong
2024-05-23 12:55 ` Kalle Valo
2024-05-23 14:04 ` Lingbo Kong
2024-05-10 5:08 ` [PATCH v2 4/5] wifi: ath12k: Add support to parse requested stats_type Ramya Gnanasekar
2024-05-10 19:53 ` Jeff Johnson
2024-05-10 5:08 ` [PATCH v2 5/5] wifi: ath12k: Dump additional Tx PDEV HTT stats Ramya Gnanasekar
2024-05-10 19:54 ` Jeff Johnson
2024-05-21 8:00 ` Kalle Valo
2024-05-27 9:38 ` Ramya Gnanasekar
2024-05-28 11:06 ` Kalle Valo
2024-05-28 16:48 ` Ramya Gnanasekar
2024-05-31 18:00 ` Kalle Valo
2024-05-31 19:05 ` Ramya Gnanasekar
2024-05-21 7:40 ` [PATCH v2 0/5] wifi: ath12k: Add support to enable debugfs_htt_stats Kalle Valo
2024-05-27 10:44 ` Ramya Gnanasekar
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=87ttird2i0.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=ath12k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_dinek@quicinc.com \
--cc=quic_rgnanase@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.