qcacmn: Add flag in dp_mon_soc_be to avoid double deinit

Add flag in dp_mon_soc_be to avoid double deinit

Change-Id: Ie3f5f9fe3880311b169504c8f4c9861efcf1c4d3
CRs-Fixed: 3138172
This commit is contained in:
Harsh Kumar Bijlani
2022-02-24 20:20:18 +05:30
کامیت شده توسط Madan Koyyalamudi
والد 3f95481d0e
کامیت bd7a797898
2فایلهای تغییر یافته به همراه14 افزوده شده و 0 حذف شده

مشاهده پرونده

@@ -597,6 +597,9 @@ static void dp_mon_soc_deinit_2_0(struct dp_soc *soc)
struct dp_mon_soc_be *mon_soc_be =
dp_get_be_mon_soc_from_dp_mon_soc(mon_soc);
if (!mon_soc_be->is_dp_mon_soc_initialized)
return;
dp_rx_mon_buffers_free(soc);
dp_tx_mon_buffers_free(soc);
@@ -605,6 +608,8 @@ static void dp_mon_soc_deinit_2_0(struct dp_soc *soc)
dp_srng_deinit(soc, &soc->rxdma_mon_buf_ring[0], RXDMA_MONITOR_BUF, 0);
dp_srng_deinit(soc, &mon_soc_be->tx_mon_buf_ring, TX_MONITOR_BUF, 0);
mon_soc_be->is_dp_mon_soc_initialized = false;
}
static
@@ -664,6 +669,10 @@ fail:
static
QDF_STATUS dp_mon_soc_init_2_0(struct dp_soc *soc)
{
struct dp_mon_soc *mon_soc = soc->monitor_soc;
struct dp_mon_soc_be *mon_soc_be =
dp_get_be_mon_soc_from_dp_mon_soc(mon_soc);
if (soc->rxdma_mon_buf_ring[0].hal_srng) {
dp_mon_info("%pK: mon soc init is done", soc);
return QDF_STATUS_SUCCESS;
@@ -678,6 +687,8 @@ QDF_STATUS dp_mon_soc_init_2_0(struct dp_soc *soc)
dp_mon_err("%pK: " RNG_ERR "tx_mon_buf_ring", soc);
goto fail;
}
mon_soc_be->is_dp_mon_soc_initialized = true;
return QDF_STATUS_SUCCESS;
fail:
dp_mon_soc_deinit_2_0(soc);

مشاهده پرونده

@@ -122,6 +122,7 @@ struct dp_mon_pdev_be {
* @tx_mon_ring_fill_level: tx mon ring refill level
* @tx_low_thresh_intrs: number of tx mon low threshold interrupts received
* @rx_low_thresh_intrs: number of rx mon low threshold interrupts received
* @is_dp_mon_soc_initialized: flag to indicate soc is initialized
*/
struct dp_mon_soc_be {
struct dp_mon_soc mon_soc;
@@ -138,6 +139,8 @@ struct dp_mon_soc_be {
uint16_t tx_mon_ring_fill_level;
uint32_t tx_low_thresh_intrs;
uint32_t rx_low_thresh_intrs;
bool is_dp_mon_soc_initialized;
};
#endif