|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
|
|
|
+ * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
|
|
*
|
|
|
* Permission to use, copy, modify, and/or distribute this software for
|
|
|
* any purpose with or without fee is hereby granted, provided that the
|
|
@@ -207,3 +207,33 @@ static void hal_tx_desc_set_lmac_id_9000(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_9000() - 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_9000(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--;
|
|
|
+ }
|
|
|
+}
|