]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: Fix inappropriate use of print_array_to_buf_index()
authorRoopni Devanathan <quic_rdevanat@quicinc.com>
Mon, 18 Nov 2024 03:57:22 +0000 (09:27 +0530)
committerJeff Johnson <quic_jjohnson@quicinc.com>
Thu, 21 Nov 2024 15:52:50 +0000 (07:52 -0800)
Currently in ath12k_htt_print_tx_pdev_mumimo_grp_stats_tlv() the
htt_stats_buf->ul_mumimo_grp_best_usrs array is printed using
print_array_to_buf_index() with a stats_index of 1. This is meant
to convey the semantic that first entry in ul_mumimo_grp_best_usrs
is associated with user 1. However, unlike some of the other "usr"
arrays which have that semantic, ul_mumimo_grp_best_usrs does not
have that semantic. Instead the first entry corresponds to user 0.

Fix the issue by calling the API - print_array_to_buf(), instead of
print_array_to_buf_index().

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241118035722.1755373-1-quic_rdevanat@quicinc.com
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c

index 0bc945c7a93aa32d39dfbc3ebe93128808999e2a..d8f137bfba7b86dff2795985f06698c411c7613b 100644 (file)
@@ -2310,9 +2310,9 @@ ath12k_htt_print_tx_pdev_mumimo_grp_stats_tlv(const void *tag_buf, u16 tag_len,
        len += print_array_to_buf(buf, len, "ul_mumimo_grp_best_grp_size",
                                  htt_stats_buf->ul_mumimo_grp_best_grp_size,
                                  ATH12K_HTT_STATS_NUM_MAX_MUMIMO_SZ, "\n");
-       len += print_array_to_buf_index(buf, len, "ul_mumimo_grp_best_num_usrs = ", 1,
-                                       htt_stats_buf->ul_mumimo_grp_best_usrs,
-                                       ATH12K_HTT_TX_NUM_AX_MUMIMO_USER_STATS, "\n");
+       len += print_array_to_buf(buf, len, "ul_mumimo_grp_best_num_usrs = ",
+                                 htt_stats_buf->ul_mumimo_grp_best_usrs,
+                                 ATH12K_HTT_TX_NUM_AX_MUMIMO_USER_STATS, "\n");
        len += print_array_to_buf(buf, len,
                                  "ul_mumimo_grp_tputs_observed (per bin = 300 mbps)",
                                  htt_stats_buf->ul_mumimo_grp_tputs,