From e7c977690073cc894c2700699cee235227defd01 Mon Sep 17 00:00:00 2001 From: Rakesh Pillai Date: Thu, 7 Oct 2021 20:19:56 -0700 Subject: [PATCH] qcacmn: Fix the mask for tx completion near full irq Currently the IRQ mask for tx completion near full interrupt is not in sync with the tx completion rings which are enabled for WCN7850. Fix the mask for tx completion near full interrupt. Change-Id: I1432191b260094060873406d48e04fde5b7bc35e CRs-Fixed: 3052650 --- dp/wifi3.0/be/dp_be.c | 2 +- dp/wifi3.0/dp_stats.c | 2 +- wlan_cfg/wlan_cfg.c | 4 ++++ wlan_cfg/wlan_cfg.h | 8 ++++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dp/wifi3.0/be/dp_be.c b/dp/wifi3.0/be/dp_be.c index 9ddf1ec523..88650ac5fa 100644 --- a/dp/wifi3.0/be/dp_be.c +++ b/dp/wifi3.0/be/dp_be.c @@ -676,7 +676,7 @@ dp_service_near_full_srngs_be(struct dp_soc *soc, struct dp_intr *int_ctx, } if (tx_ring_near_full_mask) { - for (ring = 0; ring < MAX_TCL_DATA_RINGS; ring++) { + for (ring = 0; ring < soc->num_tcl_data_rings; ring++) { if (!(tx_ring_near_full_mask & (1 << ring))) continue; diff --git a/dp/wifi3.0/dp_stats.c b/dp/wifi3.0/dp_stats.c index b2a26080e7..50305f70cd 100644 --- a/dp/wifi3.0/dp_stats.c +++ b/dp/wifi3.0/dp_stats.c @@ -6488,7 +6488,7 @@ void dp_print_soc_interrupt_stats(struct dp_soc *soc) qdf_mem_zero(int_ctx_str, sizeof(int_ctx_str)); intr_stats = &soc->intr_ctx[i].intr_stats; - if (!intr_stats->num_masks) + if (!intr_stats->num_masks && !intr_stats->num_near_full_masks) continue; pos += qdf_scnprintf(buf + pos, diff --git a/wlan_cfg/wlan_cfg.c b/wlan_cfg/wlan_cfg.c index d5557520fc..26d5f54521 100644 --- a/wlan_cfg/wlan_cfg.c +++ b/wlan_cfg/wlan_cfg.c @@ -120,6 +120,10 @@ struct dp_int_mask_assignment { #ifdef CONFIG_BERYLLIUM #ifdef IPA_OFFLOAD +/* + * NEAR-FULL IRQ mask should be updated, if any change is made to + * the below TX mask. + */ static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { [0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_6, [2] = WLAN_CFG_TX_RING_MASK_7}; diff --git a/wlan_cfg/wlan_cfg.h b/wlan_cfg/wlan_cfg.h index 06af3eabda..1d2af9c97d 100644 --- a/wlan_cfg/wlan_cfg.h +++ b/wlan_cfg/wlan_cfg.h @@ -63,8 +63,8 @@ WLAN_CFG_RX_RING_MASK_6) #define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0 | \ - WLAN_CFG_TX_RING_MASK_5 | \ - WLAN_CFG_TX_RING_MASK_6) + WLAN_CFG_TX_RING_MASK_6 | \ + WLAN_CFG_TX_RING_MASK_7) #else #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1 (WLAN_CFG_RX_RING_MASK_0 | \ @@ -80,8 +80,8 @@ #define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0 | \ WLAN_CFG_TX_RING_MASK_4 | \ WLAN_CFG_TX_RING_MASK_2 | \ - WLAN_CFG_TX_RING_MASK_5 | \ - WLAN_CFG_TX_RING_MASK_6) + WLAN_CFG_TX_RING_MASK_6 | \ + WLAN_CFG_TX_RING_MASK_7) #endif #endif