qcacmn: Fix uninitialized srng access in monitor mode
In monitor mode buffer replenish ring is accessed without getting initialized for configuring low threshold value. Add check to avoid uninitialized srng pointer access. Change-Id: If5dc98d4c1db939ef762749392ec42d46a4ae1f3 CRs-Fixed: 2704586
This commit is contained in:

committed by
nshrivas

parent
a76f88adb8
commit
e53dbab838
@@ -6508,12 +6508,15 @@ static QDF_STATUS dp_vdev_set_monitor_mode(struct cdp_soc_t *soc,
|
||||
* configured.
|
||||
*/
|
||||
mon_buf_ring = &pdev->soc->rxdma_mon_buf_ring[mac_for_pdev];
|
||||
num_entries = mon_buf_ring->num_entries;
|
||||
hal_set_low_threshold(pdev->soc->rxdma_mon_buf_ring[mac_for_pdev].hal_srng,
|
||||
num_entries >> 3);
|
||||
htt_srng_setup(pdev->soc->htt_handle, pdev->pdev_id,
|
||||
pdev->soc->rxdma_mon_buf_ring[mac_for_pdev]
|
||||
.hal_srng, RXDMA_MONITOR_BUF);
|
||||
if (mon_buf_ring->hal_srng) {
|
||||
num_entries = mon_buf_ring->num_entries;
|
||||
hal_set_low_threshold(mon_buf_ring->hal_srng,
|
||||
num_entries >> 3);
|
||||
htt_srng_setup(pdev->soc->htt_handle,
|
||||
pdev->pdev_id,
|
||||
mon_buf_ring->hal_srng,
|
||||
RXDMA_MONITOR_BUF);
|
||||
}
|
||||
}
|
||||
|
||||
dp_soc_config_full_mon_mode(pdev, DP_FULL_MON_ENABLE);
|
||||
|
Reference in New Issue
Block a user