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
このコミットが含まれているのは:
Dhanashri Atre
2016-10-12 13:08:09 -07:00
committed by qcabuildsw
コミット 7351d17b41
8個のファイルの変更63行の追加23行の削除

ファイルの表示

@@ -120,6 +120,8 @@ struct hal_srng_params {
uint32_t low_threshold;
/* Misc flags */
uint32_t flags;
/* Unique ring id */
uint8_t ring_id;
};
/**

ファイルの表示

@@ -111,11 +111,12 @@ enum hal_srng_ring_id {
HAL_SRNG_LMAC1_ID_START = 128,
HAL_SRNG_WMAC1_SW2RXDMA0_BUF = HAL_SRNG_LMAC1_ID_START,
HAL_SRNG_WMAC1_SW2RXDMA1_BUF = 129,
HAL_SRNG_WMAC1_SW2RXDMA0_STATBUF = 130,
HAL_SRNG_WMAC1_SW2RXDMA1_STATBUF = 131,
HAL_SRNG_WMAC1_RXDMA2SW0 = 132,
HAL_SRNG_WMAC1_RXDMA2SW1 = 133,
/* 134-142 unused */
HAL_SRNG_WMAC1_SW2RXDMA2_BUF = 130,
HAL_SRNG_WMAC1_SW2RXDMA0_STATBUF = 131,
HAL_SRNG_WMAC1_SW2RXDMA1_STATBUF = 132,
HAL_SRNG_WMAC1_RXDMA2SW0 = 133,
HAL_SRNG_WMAC1_RXDMA2SW1 = 134,
/* 135-142 unused */
HAL_SRNG_LMAC1_ID_END = 143
};

ファイルの表示

@@ -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;
}