From: Kalle Valo <kvalo@kernel.org>
To: Baochen Qiang <quic_bqiang@quicinc.com>
Cc: <ath11k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 2/6] wifi: ath11k: don't use static variables in ath11k_debugfs_fw_stats_process()
Date: Wed, 13 Nov 2024 13:15:39 +0200 [thread overview]
Message-ID: <87y11n1j1g.fsf@kernel.org> (raw)
In-Reply-To: <20241113015631.3105-3-quic_bqiang@quicinc.com> (Baochen Qiang's message of "Wed, 13 Nov 2024 09:56:27 +0800")
Baochen Qiang <quic_bqiang@quicinc.com> writes:
> Currently ath11k_debugfs_fw_stats_process() is using static variables to count
> firmware stat events. Taking num_vdev as an example, if for whatever reason (
> say ar->num_started_vdevs is 0 or firmware bug etc.) the following condition
>
> (++num_vdev) == total_vdevs_started
>
> is not met, is_end is not set thus num_vdev won't be cleared. Next time when
> firmware stats is requested again, even if everything is working fine, we will
> fail due to the condition above will never be satisfied.
>
> The same applies to num_bcn as well.
>
> Change to use non-static counters so that we have a chance to clear them each
> time firmware stats is requested. Currently only ath11k_fw_stats_request() and
> ath11k_debugfs_fw_stats_request() are requesting firmware stats, so clear
> counters there.
>
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37
>
> Fixes: da3a9d3c1576 ("ath11k: refactor debugfs code into debugfs.c")
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Yikes, good catch!
Acked-by: Kalle Valo <kvalo@kernel.org>
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2024-11-13 11:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 1:56 [PATCH 0/6] wifi: ath11k: fixes and refactor to firmware stats related functions Baochen Qiang
2024-11-13 1:56 ` [PATCH 1/6] wifi: ath11k: avoid burning CPU in ath11k_debugfs_fw_stats_request() Baochen Qiang
2024-11-13 11:12 ` Kalle Valo
2024-11-14 5:34 ` Baochen Qiang
2024-11-13 1:56 ` [PATCH 2/6] wifi: ath11k: don't use static variables in ath11k_debugfs_fw_stats_process() Baochen Qiang
2024-11-13 11:15 ` Kalle Valo [this message]
2024-11-13 1:56 ` [PATCH 3/6] wifi: ath11k: move some firmware stats related functions outside of debugfs Baochen Qiang
2024-11-13 11:14 ` Kalle Valo
2024-11-14 6:05 ` Baochen Qiang
2024-11-14 11:34 ` Kalle Valo
2024-11-15 1:46 ` Baochen Qiang
2024-11-13 1:56 ` [PATCH 4/6] wifi: ath11k: adjust unlock sequence in ath11k_update_stats_event() Baochen Qiang
2024-11-13 11:15 ` Kalle Valo
2024-11-13 1:56 ` [PATCH 5/6] wifi: ath11k: move locking outside of ath11k_mac_get_fw_stats() Baochen Qiang
2024-11-13 1:56 ` [PATCH 6/6] wifi: ath11k: consistently use ath11k_mac_get_fw_stats() 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=87y11n1j1g.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=ath11k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_bqiang@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 NNTP newsgroup(s).