qcacmn: Initialize command/credit ring for qca8074 & qcn9000
Initialize command/credit ring for qca8074 & qcn9000. Change-Id: I28087dd4d8f4afddd954c764c2e85da43eaf78f1 CRs-fixed: 2562649
This commit is contained in:

committed by
nshrivas

orang tua
7e0bf6da72
melakukan
2bf9b7a18a
@@ -1366,6 +1366,7 @@ struct hal_hw_txrx_ops qca5018_hal_hw_txrx_ops = {
|
||||
hal_tx_comp_get_release_reason_generic,
|
||||
hal_get_wbm_internal_error_generic,
|
||||
hal_tx_desc_set_mesh_en_5018,
|
||||
hal_tx_init_cmd_credit_ring_5018,
|
||||
|
||||
/* rx */
|
||||
hal_rx_msdu_start_nss_get_5018,
|
||||
@@ -1571,7 +1572,7 @@ struct hal_hw_srng_config hw_srng_table_5018[] = {
|
||||
.start_ring_id = HAL_SRNG_SW2TCL_CMD,
|
||||
.max_rings = 1,
|
||||
.entry_size = (sizeof(struct tlv_32_hdr) +
|
||||
sizeof(struct tcl_gse_cmd)) >> 2,
|
||||
sizeof(struct tcl_data_cmd)) >> 2,
|
||||
.lmac_ring = FALSE,
|
||||
.ring_dir = HAL_SRNG_SRC_RING,
|
||||
.reg_start = {
|
||||
|
@@ -207,3 +207,33 @@ static void hal_tx_desc_set_lmac_id_5018(void *desc, uint8_t lmac_id)
|
||||
HAL_SET_FLD(desc, TCL_DATA_CMD_4, LMAC_ID) |=
|
||||
HAL_TX_SM(TCL_DATA_CMD_4, LMAC_ID, lmac_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_tx_init_cmd_credit_ring_5018() - Initialize TCL command/credit SRNG
|
||||
* @hal_soc_hdl: Handle to HAL SoC structure
|
||||
* @hal_srng: Handle to HAL SRNG structure
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static inline void hal_tx_init_cmd_credit_ring_5018(hal_soc_handle_t hal_soc_hdl,
|
||||
hal_ring_handle_t hal_ring_hdl)
|
||||
{
|
||||
uint8_t *desc_addr;
|
||||
struct hal_srng_params srng_params;
|
||||
uint32_t desc_size;
|
||||
uint32_t num_desc;
|
||||
|
||||
hal_get_srng_params(hal_soc_hdl, hal_ring_hdl, &srng_params);
|
||||
|
||||
desc_addr = (uint8_t *)srng_params.ring_base_vaddr;
|
||||
desc_size = sizeof(struct tcl_data_cmd);
|
||||
num_desc = srng_params.num_entries;
|
||||
|
||||
while (num_desc) {
|
||||
/* using CMD/CREDIT Ring to send DATA CMD tag */
|
||||
HAL_TX_DESC_SET_TLV_HDR(desc_addr, WIFITCL_DATA_CMD_E,
|
||||
desc_size);
|
||||
desc_addr += (desc_size + sizeof(struct tlv_32_hdr));
|
||||
num_desc--;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user