qcacmn: Handle monitor buffer allocation failure

Currently the monitor buffers allocation is attempted
for 2 RXDMA monitor status/destination rings.
For certain targets, eg KIWI, there is only one RXDMA
monitor status/destination ring, and the monitor buffer
allocation for the second ring fails. This return status
is not handled properly.

Fix the monitor buffer allocation to use the number of
rxdma rings from cfg context and handle the return status
properly.

Change-Id: I86718dbd790d96d794963b17a4c9bdf32792d854
CRs-Fixed: 3128299
这个提交包含在:
Rakesh Pillai
2022-01-10 22:29:15 -08:00
提交者 Madan Koyyalamudi
父节点 d0eb950a7b
当前提交 595926af77
修改 2 个文件,包含 39 行新增35 行删除

查看文件

@@ -4841,14 +4841,26 @@ QDF_STATUS dp_mon_pdev_init(struct dp_pdev *pdev)
mon_ops->rx_mon_desc_pool_init(pdev);
/* allocate buffers and replenish the monitor RxDMA ring */
if (mon_ops->rx_mon_buffers_alloc)
mon_ops->rx_mon_buffers_alloc(pdev);
if (mon_ops->rx_mon_buffers_alloc) {
if (mon_ops->rx_mon_buffers_alloc(pdev)) {
dp_mon_err("%pK: rx mon buffers alloc failed", pdev);
goto fail4;
}
}
/* attach monitor function */
dp_monitor_tx_ppdu_stats_attach(pdev);
mon_pdev->is_dp_mon_pdev_initialized = true;
return QDF_STATUS_SUCCESS;
fail4:
if (mon_ops->rx_mon_desc_pool_deinit)
mon_ops->rx_mon_desc_pool_deinit(pdev);
if (mon_ops->mon_rings_deinit)
mon_ops->mon_rings_deinit(pdev);
fail3:
dp_htt_ppdu_stats_detach(pdev);
fail2: