qcacmn: MCL Buffer Replenishment

Add support for replenishing the rx buffers using the host to
firmware buffer ring.

This includes adding a flag QCA_HOST2FW_RXBUF_RING:
When QCA_HOST2FW_RXBUF_RING is enabled the host will do the following:
- Allocate the refill buffer ring (HTT_HOST1_TO_FW_RXBUF_RING) and
populate it with
 rx buffers
- Send the refill buffer ring configuration to the firmware
- Allocate the rx DMA ring (HTT_RXDMA_HOST_BUF_RING), leave it empty.
- Send the rx DMA ring configuration to the firmware

When QCA_HOST2FW_RXBUF_RING is disabled, the host will do the following:
- Allocate the rx DMA ring (HTT_RXDMA_HOST_BUF_RING), and populate it with
 rx buffers
- Send the rx DMA ring configuration to the firmware

CRs-Fixed: 1074199
Change-Id: Iec05a973cd9d628c742e3aaa16b8dabc7797625d
Dieser Commit ist enthalten in:
Dhanashri Atre
2016-10-12 13:08:09 -07:00
committet von qcabuildsw
Ursprung e3df35488a
Commit 7351d17b41
8 geänderte Dateien mit 63 neuen und 23 gelöschten Zeilen

Datei anzeigen

@@ -426,7 +426,7 @@ static struct hal_hw_srng_config hw_srng_table[] = {
},
{ /* RXDMA_BUF */
.start_ring_id = HAL_SRNG_WMAC1_SW2RXDMA0_BUF,
.max_rings = 1,
.max_rings = 2,
/* TODO: Check if the additional IPA buffer ring needs to be
* setup here (in which case max_rings should be set to 2),
* or it will be setup by IPA host driver
@@ -453,7 +453,7 @@ static struct hal_hw_srng_config hw_srng_table[] = {
.reg_size = {},
},
{ /* RXDMA_MONITOR_BUF */
.start_ring_id = HAL_SRNG_WMAC1_SW2RXDMA1_BUF,
.start_ring_id = HAL_SRNG_WMAC1_SW2RXDMA2_BUF,
.max_rings = 1,
.entry_size = sizeof(struct wbm_buffer_ring) >> 2,
.lmac_ring = TRUE,
@@ -944,4 +944,5 @@ extern void hal_get_srng_params(void *hal_soc, void *hal_ring,
srng->intr_batch_cntr_thres_entries;
ring_params->low_threshold = srng->u.src_ring.low_threshold;
ring_params->flags = srng->flags;
ring_params->ring_id = srng->ring_id;
}