From 3b816d7013917b4a0633458b971a75e4fd6fc0ae Mon Sep 17 00:00:00 2001 From: Amir Patel Date: Thu, 17 Mar 2022 01:28:43 +0530 Subject: [PATCH] qcacmn: Fix monitor dest srng init in case of splitphy 1. pass appropriate pdev_id as ring_num for srng init 2. Increase max rings for monitor destination rings CRs-Fixed: 3152722 Change-Id: I36aa2f4e8e5d7fa41ee90a39593cbb8cdf86ec44 --- dp/wifi3.0/dp_htt.c | 3 ++- dp/wifi3.0/monitor/2.0/dp_mon_2.0.c | 8 ++++---- hal/wifi3.0/qcn9224/hal_9224.c | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index eae8fc6d79..54b9bc6859 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -1051,7 +1051,8 @@ int htt_h2t_rx_ring_cfg(struct htt_soc *htt_soc, int pdev_id, dp_get_target_pdev_id_for_host_pdev_id(soc->dp_soc, pdev_id); if (htt_ring_type == HTT_SW_TO_SW_RING || - htt_ring_type == HTT_SW_TO_HW_RING) + htt_ring_type == HTT_SW_TO_HW_RING || + htt_ring_type == HTT_HW_TO_SW_RING) HTT_RX_RING_SELECTION_CFG_PDEV_ID_SET(*msg_word, target_pdev_id); diff --git a/dp/wifi3.0/monitor/2.0/dp_mon_2.0.c b/dp/wifi3.0/monitor/2.0/dp_mon_2.0.c index a539405f2c..44ab1140e1 100644 --- a/dp/wifi3.0/monitor/2.0/dp_mon_2.0.c +++ b/dp/wifi3.0/monitor/2.0/dp_mon_2.0.c @@ -892,9 +892,9 @@ void dp_pdev_mon_rings_deinit_2_0(struct dp_pdev *pdev) pdev->pdev_id); dp_srng_deinit(soc, &soc->rxdma_mon_dst_ring[lmac_id], - RXDMA_MONITOR_DST, 0); + RXDMA_MONITOR_DST, pdev->pdev_id); dp_srng_deinit(soc, &mon_soc_be->tx_mon_dst_ring[lmac_id], - TX_MONITOR_DST, 0); + TX_MONITOR_DST, pdev->pdev_id); } } @@ -911,13 +911,13 @@ QDF_STATUS dp_pdev_mon_rings_init_2_0(struct dp_pdev *pdev) pdev->pdev_id); if (dp_srng_init(soc, &soc->rxdma_mon_dst_ring[lmac_id], - RXDMA_MONITOR_DST, 0, lmac_id)) { + RXDMA_MONITOR_DST, pdev->pdev_id, lmac_id)) { dp_mon_err("%pK: " RNG_ERR "rxdma_mon_dst_ring", soc); goto fail; } if (dp_srng_init(soc, &mon_soc_be->tx_mon_dst_ring[lmac_id], - TX_MONITOR_DST, 0, lmac_id)) { + TX_MONITOR_DST, pdev->pdev_id, lmac_id)) { dp_mon_err("%pK: " RNG_ERR "tx_mon_dst_ring", soc); goto fail; } diff --git a/hal/wifi3.0/qcn9224/hal_9224.c b/hal/wifi3.0/qcn9224/hal_9224.c index e390806ab6..febadfe39b 100644 --- a/hal/wifi3.0/qcn9224/hal_9224.c +++ b/hal/wifi3.0/qcn9224/hal_9224.c @@ -2307,7 +2307,7 @@ struct hal_hw_srng_config hw_srng_table_9224[] = { #ifdef QCA_MONITOR_2_0_SUPPORT { /* RXDMA_MONITOR_DST */ .start_ring_id = HAL_SRNG_WMAC1_RXMON2SW0, - .max_rings = 1, + .max_rings = 2, .entry_size = sizeof(struct mon_destination_ring) >> 2, .lmac_ring = TRUE, .ring_dir = HAL_SRNG_DST_RING, @@ -2432,7 +2432,7 @@ struct hal_hw_srng_config hw_srng_table_9224[] = { }, { /* TX_MONITOR_DST */ .start_ring_id = HAL_SRNG_WMAC1_TXMON2SW0, - .max_rings = 1, + .max_rings = 2, .entry_size = sizeof(struct mon_destination_ring) >> 2, .lmac_ring = TRUE, .ring_dir = HAL_SRNG_DST_RING,