qcacmn: Set low threshold for monitor ring
Configure low threshold for monitor ring only when monitor vap is created. This is needed to avoid spurious low threshold interrupts on monitor ring since the low threshold condition always evaluates to true. Change-Id: I452c0ada84e0a4f18e410c865d8a6a7f50329aef
This commit is contained in:

committed by
nshrivas

parent
3e3a071188
commit
3e8172d58b
@@ -1374,9 +1374,8 @@ dp_srng_configure_interrupt_thresholds(struct dp_soc *soc,
|
|||||||
|
|
||||||
/* During initialisation monitor rings are only filled with
|
/* During initialisation monitor rings are only filled with
|
||||||
* MON_BUF_MIN_ENTRIES entries. So low threshold needs to be set to
|
* MON_BUF_MIN_ENTRIES entries. So low threshold needs to be set to
|
||||||
* a value less than that. Once HTT dynamic config of ring threshold
|
* a value less than that. Low threshold value is reconfigured again
|
||||||
* setting is enabled, then the low threshold updated should be
|
* to 1/8th of the ring size when monitor vap is created.
|
||||||
* adjusted accrodingly.
|
|
||||||
*/
|
*/
|
||||||
if (ring_type == RXDMA_MONITOR_BUF)
|
if (ring_type == RXDMA_MONITOR_BUF)
|
||||||
ring_params->low_threshold = MON_BUF_MIN_ENTRIES >> 1;
|
ring_params->low_threshold = MON_BUF_MIN_ENTRIES >> 1;
|
||||||
@@ -6461,6 +6460,8 @@ static QDF_STATUS dp_vdev_set_monitor_mode(struct cdp_soc_t *soc,
|
|||||||
uint32_t mac_id;
|
uint32_t mac_id;
|
||||||
uint32_t mac_for_pdev;
|
uint32_t mac_for_pdev;
|
||||||
struct dp_pdev *pdev;
|
struct dp_pdev *pdev;
|
||||||
|
uint32_t num_entries;
|
||||||
|
struct dp_srng *mon_buf_ring;
|
||||||
struct dp_vdev *vdev =
|
struct dp_vdev *vdev =
|
||||||
dp_get_vdev_from_soc_vdev_id_wifi3((struct dp_soc *)soc,
|
dp_get_vdev_from_soc_vdev_id_wifi3((struct dp_soc *)soc,
|
||||||
vdev_id);
|
vdev_id);
|
||||||
@@ -6499,6 +6500,17 @@ static QDF_STATUS dp_vdev_set_monitor_mode(struct cdp_soc_t *soc,
|
|||||||
pdev->pdev_id);
|
pdev->pdev_id);
|
||||||
dp_rx_pdev_mon_buf_buffers_alloc(pdev, mac_for_pdev,
|
dp_rx_pdev_mon_buf_buffers_alloc(pdev, mac_for_pdev,
|
||||||
FALSE);
|
FALSE);
|
||||||
|
/*
|
||||||
|
* Configure low interrupt threshld when monitor mode is
|
||||||
|
* 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
dp_soc_config_full_mon_mode(pdev, DP_FULL_MON_ENABLE);
|
dp_soc_config_full_mon_mode(pdev, DP_FULL_MON_ENABLE);
|
||||||
|
@@ -686,6 +686,9 @@ extern uint32_t hal_srng_get_entrysize(void *hal_soc, int ring_type);
|
|||||||
*/
|
*/
|
||||||
uint32_t hal_srng_max_entries(void *hal_soc, int ring_type);
|
uint32_t hal_srng_max_entries(void *hal_soc, int ring_type);
|
||||||
|
|
||||||
|
void hal_set_low_threshold(hal_ring_handle_t hal_ring_hdl,
|
||||||
|
uint32_t low_threshold);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hal_srng_dump - Dump ring status
|
* hal_srng_dump - Dump ring status
|
||||||
* @srng: hal srng pointer
|
* @srng: hal srng pointer
|
||||||
|
@@ -1300,6 +1300,15 @@ extern void hal_get_srng_params(hal_soc_handle_t hal_soc_hdl,
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(hal_get_srng_params);
|
qdf_export_symbol(hal_get_srng_params);
|
||||||
|
|
||||||
|
void hal_set_low_threshold(hal_ring_handle_t hal_ring_hdl,
|
||||||
|
uint32_t low_threshold)
|
||||||
|
{
|
||||||
|
struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl;
|
||||||
|
srng->u.src_ring.low_threshold = low_threshold * srng->entry_size;
|
||||||
|
}
|
||||||
|
qdf_export_symbol(hal_set_low_threshold);
|
||||||
|
|
||||||
|
|
||||||
#ifdef FORCE_WAKE
|
#ifdef FORCE_WAKE
|
||||||
void hal_set_init_phase(hal_soc_handle_t soc, bool init_phase)
|
void hal_set_init_phase(hal_soc_handle_t soc, bool init_phase)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user