qcacmn: Change buffer replenishment model for SDX+Pine

For IPQ products, there is 1 refill ring which is of hardware type
and host replenishes the buffers onto this ring so that hardware can
use these buffers for Rx.

In IPA offload mode, the buffer replenishment model is different from
the one mentioned above. There are 3 refill rings, out of which,
2 are software refill rings (1 for host and 1 for IPA), and last ring
is hardware ring given to FW.
Ring given to IPA is to refill the buffers after processing the
regular Rx packets and ring given to host is to refill the buffers
after processing of exception packets. Since there are 2 entities to
refill the buffers, the hardware ring given to FW multiplexes these 2
software rings and provides the buffers to hardware.

Make changes to follow above replenishment model for SDX+Pine
integration.

Change-Id: I0d9e4ec811a3023a258e0a6b9ee22ccdffcebafa
CRs-Fixed: 3049633
This commit is contained in:
Devender Kumar
2021-08-11 19:06:33 +05:30
committed by Madan Koyyalamudi
parent 30c0b8b4cd
commit 30482aa5c4
6 changed files with 170 additions and 82 deletions

View File

@@ -437,12 +437,14 @@ int htt_srng_setup(struct htt_soc *soc, int mac_id,
case RXDMA_BUF:
#ifdef QCA_HOST2FW_RXBUF_RING
if (srng_params.ring_id ==
(HAL_SRNG_WMAC1_SW2RXDMA0_BUF0)) {
(HAL_SRNG_WMAC1_SW2RXDMA0_BUF0 +
(lmac_id * HAL_MAX_RINGS_PER_LMAC))) {
htt_ring_id = HTT_HOST1_TO_FW_RXBUF_RING;
htt_ring_type = HTT_SW_TO_SW_RING;
#ifdef IPA_OFFLOAD
} else if (srng_params.ring_id ==
(HAL_SRNG_WMAC1_SW2RXDMA0_BUF2)) {
(HAL_SRNG_WMAC1_SW2RXDMA0_BUF2 +
(lmac_id * HAL_MAX_RINGS_PER_LMAC))) {
htt_ring_id = HTT_HOST2_TO_FW_RXBUF_RING;
htt_ring_type = HTT_SW_TO_SW_RING;
#endif