qcacmn: init mon_intr_id_lmac_map in interrupt mode
Currently mon_intr_id_lmac_map is set only in poll mode Which is only in Global Monitor mode. In case of dynamic switch from STA to Monitor Mode This can cause issue while removing monitor mode Initialize mon_intr_id_lmac_map in interrupt mode also and add sanity check for mon_intr_id_lmac_map value in monitor ring flush. Change-Id: Ic7dae948078661e376541b30aa70e4e12ca9d24f CRs-Fixed: 3037952
This commit is contained in:

committed by
Madan Koyyalamudi

parent
8e18b21f89
commit
cfa44c7843
@@ -2972,6 +2972,7 @@ static QDF_STATUS dp_soc_interrupt_attach(struct cdp_soc_t *txrx_soc)
|
||||
int i = 0;
|
||||
int num_irq = 0;
|
||||
int rx_err_ring_intr_ctxt_id = HIF_MAX_GROUP;
|
||||
int lmac_id = 0;
|
||||
|
||||
qdf_mem_set(&soc->mon_intr_id_lmac_map,
|
||||
sizeof(soc->mon_intr_id_lmac_map), DP_MON_INVALID_LMAC_ID);
|
||||
@@ -3062,6 +3063,11 @@ static QDF_STATUS dp_soc_interrupt_attach(struct cdp_soc_t *txrx_soc)
|
||||
|
||||
if (rx_err_ring_mask)
|
||||
rx_err_ring_intr_ctxt_id = i;
|
||||
|
||||
if (dp_is_mon_mask_valid(soc, &soc->intr_ctx[i])) {
|
||||
soc->mon_intr_id_lmac_map[lmac_id] = i;
|
||||
lmac_id++;
|
||||
}
|
||||
}
|
||||
|
||||
hif_configure_ext_group_interrupts(soc->hif_handle);
|
||||
|
@@ -941,7 +941,7 @@ static void dp_flush_monitor_rings(struct dp_soc *soc)
|
||||
hal_soc_handle_t hal_soc = soc->hal_soc;
|
||||
uint32_t lmac_id;
|
||||
uint32_t hp, tp;
|
||||
uint8_t dp_intr_id;
|
||||
int dp_intr_id;
|
||||
int budget;
|
||||
void *mon_dst_srng;
|
||||
struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev;
|
||||
@@ -961,6 +961,9 @@ static void dp_flush_monitor_rings(struct dp_soc *soc)
|
||||
return;
|
||||
|
||||
dp_intr_id = soc->mon_intr_id_lmac_map[lmac_id];
|
||||
if (qdf_unlikely(dp_intr_id == DP_MON_INVALID_LMAC_ID))
|
||||
return;
|
||||
|
||||
mon_dst_srng = dp_rxdma_get_mon_dst_ring(pdev, lmac_id);
|
||||
|
||||
/* reap full ring */
|
||||
|
Reference in New Issue
Block a user