]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: track dropped MSDU buffer type packets in REO exception ring
authorSarika Sharma <sarika.sharma@oss.qualcomm.com>
Tue, 30 Sep 2025 09:15:51 +0000 (14:45 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Wed, 15 Oct 2025 23:37:53 +0000 (16:37 -0700)
Add a counter "reo_excep_msdu_buf_type" in
ath12k_debugfs_dump_device_dp_stats() to account for packets dropped
due to unexpected MSDU buffer types in the RX error path. These
packets are discarded to prevent incorrect parsing and potential
kernel crashes. This helps in debugging and monitoring RX error
handling behavior.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1

Signed-off-by: Sarika Sharma <sarika.sharma@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20250930091551.3305312-3-sarika.sharma@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/core.h
drivers/net/wireless/ath/ath12k/debugfs.c
drivers/net/wireless/ath/ath12k/dp_rx.c

index 3d1956966a485ab020dc427a44adbcd411d5eead..48d95ea7b3dbc36d7c272f70d22df398b98baca0 100644 (file)
@@ -963,6 +963,7 @@ struct ath12k_device_dp_stats {
        u32 tx_wbm_rel_source[HAL_WBM_REL_SRC_MODULE_MAX];
        u32 tx_enqueued[DP_TCL_NUM_RING_MAX];
        u32 tx_completed[DP_TCL_NUM_RING_MAX];
+       u32 reo_excep_msdu_buf_type;
 };
 
 struct ath12k_reg_freq {
index 16601a8c3644812489bf20b2777906ca699207bc..15219429d4ed88c77941533b1ab4c9202ea9da57 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
  */
 
 #include "core.h"
@@ -1178,6 +1178,9 @@ static ssize_t ath12k_debugfs_dump_device_dp_stats(struct file *file,
                len += scnprintf(buf + len, size - len, "\n");
        }
 
+       len += scnprintf(buf + len, size - len, "\nREO excep MSDU buf type:%u\n",
+                        device_stats->reo_excep_msdu_buf_type);
+
        len += scnprintf(buf + len, size - len, "\nRx WBM REL SRC Errors:\n");
 
        for (i = 0; i < HAL_WBM_REL_SRC_MODULE_MAX; i++) {
index 99d29eda26cf1dcd204aeec8a451b2621b147bc7..6c9f0839c83a3972ef1ef9c7c8a91f9dd6289547 100644 (file)
@@ -3790,6 +3790,8 @@ static int ath12k_dp_h_msdu_buffer_type(struct ath12k_base *ab,
        struct sk_buff *msdu;
        u64 desc_va;
 
+       ab->device_stats.reo_excep_msdu_buf_type++;
+
        desc_va = (u64)le32_to_cpu(desc->buf_va_hi) << 32 |
                  le32_to_cpu(desc->buf_va_lo);
        desc_info = (struct ath12k_rx_desc_info *)(uintptr_t)desc_va;