Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats
@ 2026-06-26  8:52 Sreeramya Soratkal
  2026-06-26  8:52 ` [PATCH ath-next v2 1/3] wifi: ath12k: Use runtime device count in dp stats display Sreeramya Soratkal
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Sreeramya Soratkal @ 2026-06-26  8:52 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, sreeramya.soratkal

This short series improves the device_dp_stats debugfs interface in
ath12k to produce more useful and accurate diagnostic output in MLO
configurations.

Patch 1 fixes a latent correctness issue where the REO Rx and WBM
release error tables were unconditionally printed for
ATH12K_MAX_DEVICES columns showing zero-filled entries for device
slots that have no hardware. Replacing the compile-time constant
with the runtime device count keeps the output compact and correct.

Patch 2 prepends a ktime-based millisecond timestamp to the top of
the dump. In MLO setups the per-device file is to be read
independently for each ath12k instance, so without a common timestamp
it is difficult to verify whether two snapshots are contemporaneous,
making cross-device counter comparisons unreliable.

Patch 3 extends the existing per-radio section to report the center
frequency on which each radio is currently operating.  This allows
the reader to correlate throughput and error counters with the channel
without having to cross-reference iw/nl80211 output separately.

---
Changes in v2:
- Rebased the patch series on the latest tip of ath-next
---

Sreeramya Soratkal (3):
  wifi: ath12k: Use runtime device count in dp stats display
  wifi: ath12k: Add timestamp to dp stats display
  wifi: ath12k: Show per-radio center freq in dp stats

 drivers/net/wireless/ath/ath12k/debugfs.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)


base-commit: 972c4dd19cb92e03d75b66c426cfade07582a1ba
-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH ath-next v2 1/3] wifi: ath12k: Use runtime device count in dp stats display
  2026-06-26  8:52 [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats Sreeramya Soratkal
@ 2026-06-26  8:52 ` Sreeramya Soratkal
  2026-06-26  8:52 ` [PATCH ath-next v2 2/3] wifi: ath12k: Add timestamp to " Sreeramya Soratkal
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Sreeramya Soratkal @ 2026-06-26  8:52 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, sreeramya.soratkal

The REO Rx Received and Rx WBM REL SRC Errors display loops in
ath12k_debugfs_dump_device_dp_stats() iterate up to the compile-time
constant ATH12K_MAX_DEVICES.  This unconditionally prints zeros
in columns with no hardware behind it, making the output misleading.

Replace the compile-time bound with the runtime ab->ag->num_devices so
only live device slots appear in the output.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1

Signed-off-by: Sreeramya Soratkal <sreeramya.soratkal@oss.qualcomm.com>
---
 drivers/net/wireless/ath/ath12k/debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/debugfs.c b/drivers/net/wireless/ath/ath12k/debugfs.c
index d17d4a8f1cb7..bab9d96d6acc 100644
--- a/drivers/net/wireless/ath/ath12k/debugfs.c
+++ b/drivers/net/wireless/ath/ath12k/debugfs.c
@@ -1173,7 +1173,7 @@ static ssize_t ath12k_debugfs_dump_device_dp_stats(struct file *file,
 	for (i = 0; i < DP_REO_DST_RING_MAX; i++) {
 		len += scnprintf(buf + len, size - len, "Ring%d:", i + 1);
 
-		for (j = 0; j < ATH12K_MAX_DEVICES; j++) {
+		for (j = 0; j < ab->ag->num_devices; j++) {
 			len += scnprintf(buf + len, size - len,
 					"\t%d:%u", j,
 					 device_stats->reo_rx[i][j]);
@@ -1190,7 +1190,7 @@ static ssize_t ath12k_debugfs_dump_device_dp_stats(struct file *file,
 	for (i = 0; i < HAL_WBM_REL_SRC_MODULE_MAX; i++) {
 		len += scnprintf(buf + len, size - len, "%s:", wbm_rel_src[i]);
 
-		for (j = 0; j < ATH12K_MAX_DEVICES; j++) {
+		for (j = 0; j < ab->ag->num_devices; j++) {
 			len += scnprintf(buf + len,
 					 size - len,
 					 "\t%d:%u", j,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH ath-next v2 2/3] wifi: ath12k: Add timestamp to dp stats display
  2026-06-26  8:52 [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats Sreeramya Soratkal
  2026-06-26  8:52 ` [PATCH ath-next v2 1/3] wifi: ath12k: Use runtime device count in dp stats display Sreeramya Soratkal
@ 2026-06-26  8:52 ` Sreeramya Soratkal
  2026-06-26  8:52 ` [PATCH ath-next v2 3/3] wifi: ath12k: Show per-radio center freq in dp stats Sreeramya Soratkal
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Sreeramya Soratkal @ 2026-06-26  8:52 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, sreeramya.soratkal

In MLO configurations the device_dp_stats debugfs file is read
separately for each ath12k device.  Without a timestamp it is impossible
to know whether two snapshots were taken at the same moment, making
counter comparisons across devices unreliable.

Prepend a ktime-based millisecond timestamp to the output header so the
reader can confirm when the snapshot was taken.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1

Signed-off-by: Sreeramya Soratkal <sreeramya.soratkal@oss.qualcomm.com>
---
 drivers/net/wireless/ath/ath12k/debugfs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/ath12k/debugfs.c b/drivers/net/wireless/ath/ath12k/debugfs.c
index bab9d96d6acc..57c213111259 100644
--- a/drivers/net/wireless/ath/ath12k/debugfs.c
+++ b/drivers/net/wireless/ath/ath12k/debugfs.c
@@ -1082,6 +1082,9 @@ static ssize_t ath12k_debugfs_dump_device_dp_stats(struct file *file,
 	if (!buf)
 		return -ENOMEM;
 
+	len += scnprintf(buf + len, size - len,
+			 "DEVICE DP STATS (timestamp: %lldms):\n\n",
+			 ktime_to_ms(ktime_get()));
 	len += scnprintf(buf + len, size - len, "DEVICE RX STATS:\n\n");
 	len += scnprintf(buf + len, size - len, "err ring pkts: %u\n",
 			 device_stats->err_ring_pkts);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH ath-next v2 3/3] wifi: ath12k: Show per-radio center freq in dp stats
  2026-06-26  8:52 [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats Sreeramya Soratkal
  2026-06-26  8:52 ` [PATCH ath-next v2 1/3] wifi: ath12k: Use runtime device count in dp stats display Sreeramya Soratkal
  2026-06-26  8:52 ` [PATCH ath-next v2 2/3] wifi: ath12k: Add timestamp to " Sreeramya Soratkal
@ 2026-06-26  8:52 ` Sreeramya Soratkal
  2026-06-29  4:16 ` [PATCH ath-next v2 0/3] wifi: ath12k: Improve " Rameshkumar Sundaram
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Sreeramya Soratkal @ 2026-06-26  8:52 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, sreeramya.soratkal

Currently, the frequency on which each radio is operating
is not available in device_dp_stats. This information is
helpful in debugging the channel-specific throughput and
is available with iw/nl80211 dump.

Extend the device_dp_stats dump to display the center
frequency in the existing per-radio loop.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1

Signed-off-by: Sreeramya Soratkal <sreeramya.soratkal@oss.qualcomm.com>
---
 drivers/net/wireless/ath/ath12k/debugfs.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/wireless/ath/ath12k/debugfs.c b/drivers/net/wireless/ath/ath12k/debugfs.c
index 57c213111259..d54995b7adb2 100644
--- a/drivers/net/wireless/ath/ath12k/debugfs.c
+++ b/drivers/net/wireless/ath/ath12k/debugfs.c
@@ -1031,6 +1031,7 @@ static ssize_t ath12k_debugfs_dump_device_dp_stats(struct file *file,
 	struct ath12k_device_dp_stats *device_stats = &dp->device_stats;
 	int len = 0, i, j, ret;
 	struct ath12k *ar;
+	u32 center_freq;
 	const int size = 4096;
 	static const char *rxdma_err[HAL_REO_ENTR_RING_RXDMA_ECODE_MAX] = {
 		[HAL_REO_ENTR_RING_RXDMA_ECODE_OVERFLOW_ERR] = "Overflow",
@@ -1164,6 +1165,12 @@ static ssize_t ath12k_debugfs_dump_device_dp_stats(struct file *file,
 	for (i = 0; i < ab->num_radios; i++) {
 		ar = ath12k_mac_get_ar_by_pdev_id(ab, DP_SW2HW_MACID(i));
 		if (ar) {
+			spin_lock_bh(&ar->data_lock);
+			center_freq = ar->rx_channel ? ar->rx_channel->center_freq : 0;
+			spin_unlock_bh(&ar->data_lock);
+			len += scnprintf(buf + len, size - len,
+					 "\nradio%d center_freq: %u\n",
+					 i, center_freq);
 			len += scnprintf(buf + len, size - len,
 					"\nradio%d tx_pending: %u\n", i,
 					atomic_read(&ar->dp.num_tx_pending));
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats
  2026-06-26  8:52 [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats Sreeramya Soratkal
                   ` (2 preceding siblings ...)
  2026-06-26  8:52 ` [PATCH ath-next v2 3/3] wifi: ath12k: Show per-radio center freq in dp stats Sreeramya Soratkal
@ 2026-06-29  4:16 ` Rameshkumar Sundaram
  2026-06-29  6:36 ` Aishwarya R
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Rameshkumar Sundaram @ 2026-06-29  4:16 UTC (permalink / raw)
  To: Sreeramya Soratkal, ath12k; +Cc: linux-wireless

On 6/26/2026 2:22 PM, Sreeramya Soratkal wrote:
> This short series improves the device_dp_stats debugfs interface in
> ath12k to produce more useful and accurate diagnostic output in MLO
> configurations.
> 
> Patch 1 fixes a latent correctness issue where the REO Rx and WBM
> release error tables were unconditionally printed for
> ATH12K_MAX_DEVICES columns showing zero-filled entries for device
> slots that have no hardware. Replacing the compile-time constant
> with the runtime device count keeps the output compact and correct.
> 
> Patch 2 prepends a ktime-based millisecond timestamp to the top of
> the dump. In MLO setups the per-device file is to be read
> independently for each ath12k instance, so without a common timestamp
> it is difficult to verify whether two snapshots are contemporaneous,
> making cross-device counter comparisons unreliable.
> 
> Patch 3 extends the existing per-radio section to report the center
> frequency on which each radio is currently operating.  This allows
> the reader to correlate throughput and error counters with the channel
> without having to cross-reference iw/nl80211 output separately.
> 
> ---
> Changes in v2:
> - Rebased the patch series on the latest tip of ath-next
> ---
> 
> Sreeramya Soratkal (3):
>    wifi: ath12k: Use runtime device count in dp stats display
>    wifi: ath12k: Add timestamp to dp stats display
>    wifi: ath12k: Show per-radio center freq in dp stats
> 
>   drivers/net/wireless/ath/ath12k/debugfs.c | 14 ++++++++++++--
>   1 file changed, 12 insertions(+), 2 deletions(-)
> 
> 
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats
  2026-06-26  8:52 [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats Sreeramya Soratkal
                   ` (3 preceding siblings ...)
  2026-06-29  4:16 ` [PATCH ath-next v2 0/3] wifi: ath12k: Improve " Rameshkumar Sundaram
@ 2026-06-29  6:36 ` Aishwarya R
  2026-06-29  7:25 ` Baochen Qiang
  2026-06-30 21:26 ` Jeff Johnson
  6 siblings, 0 replies; 8+ messages in thread
From: Aishwarya R @ 2026-06-29  6:36 UTC (permalink / raw)
  To: Sreeramya Soratkal, ath12k; +Cc: linux-wireless



On 6/26/2026 2:22 PM, Sreeramya Soratkal wrote:
> This short series improves the device_dp_stats debugfs interface in
> ath12k to produce more useful and accurate diagnostic output in MLO
> configurations.
> 
> Patch 1 fixes a latent correctness issue where the REO Rx and WBM
> release error tables were unconditionally printed for
> ATH12K_MAX_DEVICES columns showing zero-filled entries for device
> slots that have no hardware. Replacing the compile-time constant
> with the runtime device count keeps the output compact and correct.
> 
> Patch 2 prepends a ktime-based millisecond timestamp to the top of
> the dump. In MLO setups the per-device file is to be read
> independently for each ath12k instance, so without a common timestamp
> it is difficult to verify whether two snapshots are contemporaneous,
> making cross-device counter comparisons unreliable.
> 
> Patch 3 extends the existing per-radio section to report the center
> frequency on which each radio is currently operating.  This allows
> the reader to correlate throughput and error counters with the channel
> without having to cross-reference iw/nl80211 output separately.
> 
> ---
> Changes in v2:
> - Rebased the patch series on the latest tip of ath-next
> ---
> 
> Sreeramya Soratkal (3):
>    wifi: ath12k: Use runtime device count in dp stats display
>    wifi: ath12k: Add timestamp to dp stats display
>    wifi: ath12k: Show per-radio center freq in dp stats
> 
>   drivers/net/wireless/ath/ath12k/debugfs.c | 14 ++++++++++++--
>   1 file changed, 12 insertions(+), 2 deletions(-)
> 
> 
> base-commit: 972c4dd19cb92e03d75b66c426cfade07582a1ba

Reviewed-by: Aishwarya R <aishwarya.r@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats
  2026-06-26  8:52 [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats Sreeramya Soratkal
                   ` (4 preceding siblings ...)
  2026-06-29  6:36 ` Aishwarya R
@ 2026-06-29  7:25 ` Baochen Qiang
  2026-06-30 21:26 ` Jeff Johnson
  6 siblings, 0 replies; 8+ messages in thread
From: Baochen Qiang @ 2026-06-29  7:25 UTC (permalink / raw)
  To: Sreeramya Soratkal, ath12k; +Cc: linux-wireless



On 6/26/2026 4:52 PM, Sreeramya Soratkal wrote:
> This short series improves the device_dp_stats debugfs interface in
> ath12k to produce more useful and accurate diagnostic output in MLO
> configurations.
> 
> Patch 1 fixes a latent correctness issue where the REO Rx and WBM
> release error tables were unconditionally printed for
> ATH12K_MAX_DEVICES columns showing zero-filled entries for device
> slots that have no hardware. Replacing the compile-time constant
> with the runtime device count keeps the output compact and correct.
> 
> Patch 2 prepends a ktime-based millisecond timestamp to the top of
> the dump. In MLO setups the per-device file is to be read
> independently for each ath12k instance, so without a common timestamp
> it is difficult to verify whether two snapshots are contemporaneous,
> making cross-device counter comparisons unreliable.
> 
> Patch 3 extends the existing per-radio section to report the center
> frequency on which each radio is currently operating.  This allows
> the reader to correlate throughput and error counters with the channel
> without having to cross-reference iw/nl80211 output separately.
> 
> ---
> Changes in v2:
> - Rebased the patch series on the latest tip of ath-next
> ---
> 
> Sreeramya Soratkal (3):
>   wifi: ath12k: Use runtime device count in dp stats display
>   wifi: ath12k: Add timestamp to dp stats display
>   wifi: ath12k: Show per-radio center freq in dp stats
> 
>  drivers/net/wireless/ath/ath12k/debugfs.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> 
> base-commit: 972c4dd19cb92e03d75b66c426cfade07582a1ba

Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats
  2026-06-26  8:52 [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats Sreeramya Soratkal
                   ` (5 preceding siblings ...)
  2026-06-29  7:25 ` Baochen Qiang
@ 2026-06-30 21:26 ` Jeff Johnson
  6 siblings, 0 replies; 8+ messages in thread
From: Jeff Johnson @ 2026-06-30 21:26 UTC (permalink / raw)
  To: ath12k, Sreeramya Soratkal; +Cc: linux-wireless


On Fri, 26 Jun 2026 14:22:50 +0530, Sreeramya Soratkal wrote:
> This short series improves the device_dp_stats debugfs interface in
> ath12k to produce more useful and accurate diagnostic output in MLO
> configurations.
> 
> Patch 1 fixes a latent correctness issue where the REO Rx and WBM
> release error tables were unconditionally printed for
> ATH12K_MAX_DEVICES columns showing zero-filled entries for device
> slots that have no hardware. Replacing the compile-time constant
> with the runtime device count keeps the output compact and correct.
> 
> [...]

Applied, thanks!

[1/3] wifi: ath12k: Use runtime device count in dp stats display
      commit: 34620d1890cc1fcf87a95219d6781d7f7b9d8cbd
[2/3] wifi: ath12k: Add timestamp to dp stats display
      commit: 6cc84fce7b999b0c6c8aaccdfa8669f0a55e8586
[3/3] wifi: ath12k: Show per-radio center freq in dp stats
      commit: b1d8d626e206a757b745af2adcbc7127ec593a20

Best regards,
-- 
Jeff Johnson <jeff.johnson@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-06-30 21:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-26  8:52 [PATCH ath-next v2 0/3] wifi: ath12k: Improve dp stats Sreeramya Soratkal
2026-06-26  8:52 ` [PATCH ath-next v2 1/3] wifi: ath12k: Use runtime device count in dp stats display Sreeramya Soratkal
2026-06-26  8:52 ` [PATCH ath-next v2 2/3] wifi: ath12k: Add timestamp to " Sreeramya Soratkal
2026-06-26  8:52 ` [PATCH ath-next v2 3/3] wifi: ath12k: Show per-radio center freq in dp stats Sreeramya Soratkal
2026-06-29  4:16 ` [PATCH ath-next v2 0/3] wifi: ath12k: Improve " Rameshkumar Sundaram
2026-06-29  6:36 ` Aishwarya R
2026-06-29  7:25 ` Baochen Qiang
2026-06-30 21:26 ` Jeff Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox