qcacmn: Revert "qcacmn: Replenish last entry in monitor status ring"

This reverts commit I7da6cd6006243cbca2151da22a31a6f5ed0015f3

Change-Id: I04ceeeeabb5f94bfcd81e10280dcd017da537c81
This commit is contained in:
Amir Patel
2020-03-08 23:03:49 +05:30
committed by nshrivas
parent 673a66042b
commit d5a7a4ca89
2 changed files with 8 additions and 41 deletions

View File

@@ -1643,7 +1643,7 @@ dp_rx_mon_status_srng_process(struct dp_soc *soc, uint32_t mac_id,
* BUFFER_ADDR_INFO STRUCT * BUFFER_ADDR_INFO STRUCT
*/ */
while (qdf_likely((rxdma_mon_status_ring_entry = while (qdf_likely((rxdma_mon_status_ring_entry =
hal_srng_src_peek_n_get_next(hal_soc, mon_status_srng)) hal_srng_src_peek(hal_soc, mon_status_srng))
&& quota--)) { && quota--)) {
uint32_t rx_buf_cookie; uint32_t rx_buf_cookie;
qdf_nbuf_t status_nbuf; qdf_nbuf_t status_nbuf;
@@ -1921,7 +1921,7 @@ QDF_STATUS dp_rx_mon_status_buffers_replenish(struct dp_soc *dp_soc,
num_req_buffers = num_entries_avail; num_req_buffers = num_entries_avail;
} }
while (count <= num_req_buffers) { while (count < num_req_buffers) {
rx_netbuf = dp_rx_nbuf_prepare(dp_soc, dp_pdev); rx_netbuf = dp_rx_nbuf_prepare(dp_soc, dp_pdev);
/* /*
@@ -1940,9 +1940,8 @@ QDF_STATUS dp_rx_mon_status_buffers_replenish(struct dp_soc *dp_soc,
paddr = qdf_nbuf_get_frag_paddr(rx_netbuf, 0); paddr = qdf_nbuf_get_frag_paddr(rx_netbuf, 0);
next = (*desc_list)->next; next = (*desc_list)->next;
rxdma_ring_entry = hal_srng_src_get_cur_hp_n_move_next( rxdma_ring_entry = hal_srng_src_get_next(dp_soc->hal_soc,
dp_soc->hal_soc, rxdma_srng);
rxdma_srng);
if (qdf_unlikely(!rxdma_ring_entry)) { if (qdf_unlikely(!rxdma_ring_entry)) {
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR, QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,

View File

@@ -1337,8 +1337,7 @@ void *hal_srng_src_get_next(void *hal_soc,
} }
/** /**
* hal_srng_src_peek_n_get_next - Get next entry from a ring without * hal_srng_src_peek - Get next entry from a ring without moving head pointer.
* moving head pointer.
* hal_srng_src_get_next should be called subsequently to move the head pointer * hal_srng_src_get_next should be called subsequently to move the head pointer
* *
* @hal_soc: Opaque HAL SOC handle * @hal_soc: Opaque HAL SOC handle
@@ -1347,8 +1346,8 @@ void *hal_srng_src_get_next(void *hal_soc,
* Return: Opaque pointer for next ring entry; NULL on failire * Return: Opaque pointer for next ring entry; NULL on failire
*/ */
static inline static inline
void *hal_srng_src_peek_n_get_next(hal_soc_handle_t hal_soc_hdl, void *hal_srng_src_peek(hal_soc_handle_t hal_soc_hdl,
hal_ring_handle_t hal_ring_hdl) hal_ring_handle_t hal_ring_hdl)
{ {
struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl; struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl;
uint32_t *desc; uint32_t *desc;
@@ -1361,44 +1360,13 @@ void *hal_srng_src_peek_n_get_next(hal_soc_handle_t hal_soc_hdl,
*/ */
if (((srng->u.src_ring.hp + srng->entry_size) % if (((srng->u.src_ring.hp + srng->entry_size) %
srng->ring_size) != srng->u.src_ring.cached_tp) { srng->ring_size) != srng->u.src_ring.cached_tp) {
desc = &(srng->ring_base_vaddr[(srng->u.src_ring.hp + desc = &(srng->ring_base_vaddr[srng->u.src_ring.hp]);
srng->entry_size) %
srng->ring_size]);
return (void *)desc; return (void *)desc;
} }
return NULL; return NULL;
} }
/**
* hal_srng_src_get_cur_hp_n_move_next () - API returns current hp
* and move hp to next in src ring
*
* Usage: This API should only be used at init time replenish.
*
* @hal_soc_hdl: HAL soc handle
* @hal_ring_hdl: Source ring pointer
*
*/
static inline void *
hal_srng_src_get_cur_hp_n_move_next(hal_soc_handle_t hal_soc_hdl,
hal_ring_handle_t hal_ring_hdl)
{
struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl;
uint32_t *cur_desc = NULL;
uint32_t next_hp;
cur_desc = &srng->ring_base_vaddr[(srng->u.src_ring.hp)];
next_hp = (srng->u.src_ring.hp + srng->entry_size) %
srng->ring_size;
if (next_hp != srng->u.src_ring.cached_tp)
srng->u.src_ring.hp = next_hp;
return (void *)cur_desc;
}
/** /**
* hal_srng_src_num_avail - Returns number of available entries in src ring * hal_srng_src_num_avail - Returns number of available entries in src ring
* *