qcacmn: Define IPA TX ring indexes for WCN7850
As part of IPA offload support for WCN7850 chipset, properly define TX ring indexes into soc->tcl_data_ring[] and soc->tx_comp_ring[] used by IPA. In the change, use wlan_cfg_get_rbm_id_for_index() to get correct rbm values for WBM2SW ring used by IPA. Change-Id: Ie5b6743c1cb2adfa156735fc84dc1429a67f833a CRs-Fixed: 3246038
This commit is contained in:

committed by
Madan Koyyalamudi

parent
bedd18fa8b
commit
c78b55df2c
@@ -41,9 +41,6 @@
|
|||||||
#include "dp_txrx_wds.h"
|
#include "dp_txrx_wds.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Ring index for WBM2SW2 release ring */
|
|
||||||
#define IPA_TX_COMP_RING_IDX HAL_IPA_TX_COMP_RING_IDX
|
|
||||||
|
|
||||||
/* Hard coded config parameters until dp_ops_cfg.cfg_attach implemented */
|
/* Hard coded config parameters until dp_ops_cfg.cfg_attach implemented */
|
||||||
#define CFG_IPA_UC_TX_BUF_SIZE_DEFAULT (2048)
|
#define CFG_IPA_UC_TX_BUF_SIZE_DEFAULT (2048)
|
||||||
|
|
||||||
@@ -436,7 +433,7 @@ static int dp_ipa_tx_alt_pool_attach(struct dp_soc *soc)
|
|||||||
struct hal_srng *wbm_srng = (struct hal_srng *)
|
struct hal_srng *wbm_srng = (struct hal_srng *)
|
||||||
soc->tx_comp_ring[IPA_TX_ALT_COMP_RING_IDX].hal_srng;
|
soc->tx_comp_ring[IPA_TX_ALT_COMP_RING_IDX].hal_srng;
|
||||||
struct hal_srng_params srng_params;
|
struct hal_srng_params srng_params;
|
||||||
uint32_t wbm_sw0_bm_id = soc->wbm_sw0_bm_id;
|
uint32_t wbm_bm_id;
|
||||||
void *ring_entry;
|
void *ring_entry;
|
||||||
int num_entries;
|
int num_entries;
|
||||||
qdf_nbuf_t nbuf;
|
qdf_nbuf_t nbuf;
|
||||||
@@ -451,6 +448,9 @@ static int dp_ipa_tx_alt_pool_attach(struct dp_soc *soc)
|
|||||||
unsigned int uc_tx_buf_sz = CFG_IPA_UC_TX_BUF_SIZE_DEFAULT;
|
unsigned int uc_tx_buf_sz = CFG_IPA_UC_TX_BUF_SIZE_DEFAULT;
|
||||||
unsigned int alloc_size = uc_tx_buf_sz + ring_base_align - 1;
|
unsigned int alloc_size = uc_tx_buf_sz + ring_base_align - 1;
|
||||||
|
|
||||||
|
wbm_bm_id = wlan_cfg_get_rbm_id_for_index(soc->wlan_cfg_ctx,
|
||||||
|
IPA_TX_ALT_RING_IDX);
|
||||||
|
|
||||||
hal_get_srng_params(soc->hal_soc,
|
hal_get_srng_params(soc->hal_soc,
|
||||||
hal_srng_to_hal_ring_handle(wbm_srng),
|
hal_srng_to_hal_ring_handle(wbm_srng),
|
||||||
&srng_params);
|
&srng_params);
|
||||||
@@ -508,8 +508,7 @@ static int dp_ipa_tx_alt_pool_attach(struct dp_soc *soc)
|
|||||||
qdf_mem_dp_tx_skb_inc(qdf_nbuf_get_end_offset(nbuf));
|
qdf_mem_dp_tx_skb_inc(qdf_nbuf_get_end_offset(nbuf));
|
||||||
|
|
||||||
hal_rxdma_buff_addr_info_set(soc->hal_soc, ring_entry,
|
hal_rxdma_buff_addr_info_set(soc->hal_soc, ring_entry,
|
||||||
buffer_paddr, 0,
|
buffer_paddr, 0, wbm_bm_id);
|
||||||
HAL_WBM_SW4_BM_ID(wbm_sw0_bm_id));
|
|
||||||
|
|
||||||
soc->ipa_uc_tx_rsc_alt.tx_buf_pool_vaddr_unaligned[
|
soc->ipa_uc_tx_rsc_alt.tx_buf_pool_vaddr_unaligned[
|
||||||
tx_buffer_count] = (void *)nbuf;
|
tx_buffer_count] = (void *)nbuf;
|
||||||
@@ -1206,6 +1205,7 @@ static int dp_tx_ipa_uc_attach(struct dp_soc *soc, struct dp_pdev *pdev)
|
|||||||
qdf_nbuf_t nbuf;
|
qdf_nbuf_t nbuf;
|
||||||
int retval = QDF_STATUS_SUCCESS;
|
int retval = QDF_STATUS_SUCCESS;
|
||||||
int max_alloc_count = 0;
|
int max_alloc_count = 0;
|
||||||
|
uint32_t wbm_bm_id;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Uncomment when dp_ops_cfg.cfg_attach is implemented
|
* Uncomment when dp_ops_cfg.cfg_attach is implemented
|
||||||
@@ -1215,6 +1215,9 @@ static int dp_tx_ipa_uc_attach(struct dp_soc *soc, struct dp_pdev *pdev)
|
|||||||
unsigned int uc_tx_buf_sz = CFG_IPA_UC_TX_BUF_SIZE_DEFAULT;
|
unsigned int uc_tx_buf_sz = CFG_IPA_UC_TX_BUF_SIZE_DEFAULT;
|
||||||
unsigned int alloc_size = uc_tx_buf_sz + ring_base_align - 1;
|
unsigned int alloc_size = uc_tx_buf_sz + ring_base_align - 1;
|
||||||
|
|
||||||
|
wbm_bm_id = wlan_cfg_get_rbm_id_for_index(soc->wlan_cfg_ctx,
|
||||||
|
IPA_TCL_DATA_RING_IDX);
|
||||||
|
|
||||||
hal_get_srng_params(soc->hal_soc, hal_srng_to_hal_ring_handle(wbm_srng),
|
hal_get_srng_params(soc->hal_soc, hal_srng_to_hal_ring_handle(wbm_srng),
|
||||||
&srng_params);
|
&srng_params);
|
||||||
num_entries = srng_params.num_entries;
|
num_entries = srng_params.num_entries;
|
||||||
@@ -1274,9 +1277,7 @@ static int dp_tx_ipa_uc_attach(struct dp_soc *soc, struct dp_pdev *pdev)
|
|||||||
* instead of hal soc ops.
|
* instead of hal soc ops.
|
||||||
*/
|
*/
|
||||||
hal_rxdma_buff_addr_info_set(soc->hal_soc, ring_entry,
|
hal_rxdma_buff_addr_info_set(soc->hal_soc, ring_entry,
|
||||||
buffer_paddr, 0,
|
buffer_paddr, 0, wbm_bm_id);
|
||||||
(IPA_TCL_DATA_RING_IDX +
|
|
||||||
soc->wbm_sw0_bm_id));
|
|
||||||
|
|
||||||
soc->ipa_uc_tx_rsc.tx_buf_pool_vaddr_unaligned[tx_buffer_count]
|
soc->ipa_uc_tx_rsc.tx_buf_pool_vaddr_unaligned[tx_buffer_count]
|
||||||
= (void *)nbuf;
|
= (void *)nbuf;
|
||||||
|
@@ -18,7 +18,15 @@
|
|||||||
#ifndef _DP_IPA_H_
|
#ifndef _DP_IPA_H_
|
||||||
#define _DP_IPA_H_
|
#define _DP_IPA_H_
|
||||||
|
|
||||||
|
#if defined(QCA_WIFI_KIWI) || defined(QCA_WIFI_KIWI_V2)
|
||||||
|
/* Index into soc->tcl_data_ring[] */
|
||||||
|
#define IPA_TCL_DATA_RING_IDX 3
|
||||||
|
#else
|
||||||
#define IPA_TCL_DATA_RING_IDX 2
|
#define IPA_TCL_DATA_RING_IDX 2
|
||||||
|
#endif
|
||||||
|
/* Index into soc->tx_comp_ring[] */
|
||||||
|
#define IPA_TX_COMP_RING_IDX IPA_TCL_DATA_RING_IDX
|
||||||
|
|
||||||
#ifdef IPA_OFFLOAD
|
#ifdef IPA_OFFLOAD
|
||||||
|
|
||||||
#define DP_IPA_MAX_IFACE 3
|
#define DP_IPA_MAX_IFACE 3
|
||||||
@@ -32,14 +40,21 @@
|
|||||||
#define TX_COMP_DRAIN_WAIT_TIMEOUT_MS 100
|
#define TX_COMP_DRAIN_WAIT_TIMEOUT_MS 100
|
||||||
|
|
||||||
#ifdef IPA_WDI3_TX_TWO_PIPES
|
#ifdef IPA_WDI3_TX_TWO_PIPES
|
||||||
|
#if defined(QCA_WIFI_KIWI) || defined(QCA_WIFI_KIWI_V2)
|
||||||
|
/* Index into soc->tcl_data_ring[] and soc->tx_comp_ring[] */
|
||||||
|
#define IPA_TX_ALT_RING_IDX 4
|
||||||
|
#define IPA_TX_ALT_COMP_RING_IDX IPA_TX_ALT_RING_IDX
|
||||||
|
#else /* !KIWI */
|
||||||
#define IPA_TX_ALT_RING_IDX 1
|
#define IPA_TX_ALT_RING_IDX 1
|
||||||
/*
|
/*
|
||||||
* must be same as IPA_TX_ALT_RING_IDX as tcl and wbm ring
|
* must be same as IPA_TX_ALT_RING_IDX as tcl and wbm ring
|
||||||
* are initialized with same index as a pair.
|
* are initialized with same index as a pair.
|
||||||
*/
|
*/
|
||||||
#define IPA_TX_ALT_COMP_RING_IDX 1
|
#define IPA_TX_ALT_COMP_RING_IDX 1
|
||||||
|
#endif /* KIWI */
|
||||||
|
|
||||||
#define IPA_SESSION_ID_SHIFT 1
|
#define IPA_SESSION_ID_SHIFT 1
|
||||||
#endif
|
#endif /* IPA_WDI3_TX_TWO_PIPES */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct dp_ipa_uc_tx_hdr - full tx header registered to IPA hardware
|
* struct dp_ipa_uc_tx_hdr - full tx header registered to IPA hardware
|
||||||
|
Reference in New Issue
Block a user