xref: /wlan-dirver/qca-wifi-host-cmn/hal/wifi3.0/li/hal_li_reo.h (revision 901120c066e139c7f8a2c8e4820561fdd83c67ef)
1 /*
2  * Copyright (c) 2017-2019, 2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef _HAL_LI_REO_H_
21 #define _HAL_LI_REO_H_
22 
23 #include "hal_rx.h"
24 #include "hal_reo.h"
25 
26 #define HAL_REO_QUEUE_EXT_DESC 9
27 
28 /* Proto-types */
29 void hal_get_ba_aging_timeout_li(hal_soc_handle_t hal_soc_hdl, uint8_t ac,
30 				 uint32_t *value);
31 void hal_set_ba_aging_timeout_li(hal_soc_handle_t hal_soc_hdl, uint8_t ac,
32 				 uint32_t value);
33 uint32_t hal_get_reo_reg_base_offset_li(void);
34 
35 int hal_reo_send_cmd_li(hal_soc_handle_t hal_soc_hdl,
36 			hal_ring_handle_t  hal_ring_hdl,
37 			enum hal_reo_cmd_type cmd,
38 			void *params);
39 
40 /* REO status ring routines */
41 void
42 hal_reo_queue_stats_status_li(hal_ring_desc_t ring_desc,
43 			      void *st_handle,
44 			      hal_soc_handle_t hal_soc_hdl);
45 void
46 hal_reo_flush_queue_status_li(hal_ring_desc_t ring_desc,
47 			      void *st_handle,
48 			      hal_soc_handle_t hal_soc_hdl);
49 void
50 hal_reo_flush_cache_status_li(hal_ring_desc_t ring_desc,
51 			      void *st_handle,
52 			      hal_soc_handle_t hal_soc_hdl);
53 void
54 hal_reo_unblock_cache_status_li(hal_ring_desc_t ring_desc,
55 				hal_soc_handle_t hal_soc_hdl,
56 				void *st_handle);
57 void hal_reo_flush_timeout_list_status_li(hal_ring_desc_t ring_desc,
58 					  void *st_handle,
59 					  hal_soc_handle_t hal_soc_hdl);
60 void hal_reo_desc_thres_reached_status_li(hal_ring_desc_t ring_desc,
61 					  void *st_handle,
62 					  hal_soc_handle_t hal_soc_hdl);
63 void
64 hal_reo_rx_update_queue_status_li(hal_ring_desc_t ring_desc,
65 				  void *st_handle,
66 				  hal_soc_handle_t hal_soc_hdl);
67 
68 /**
69  * hal_reo_init_cmd_ring_li() - Initialize descriptors of REO command SRNG
70  * with command number
71  * @hal_soc: Handle to HAL SoC structure
72  * @hal_ring: Handle to HAL SRNG structure
73  *
74  * Return: none
75  */
76 void hal_reo_init_cmd_ring_li(hal_soc_handle_t hal_soc_hdl,
77 			      hal_ring_handle_t hal_ring_hdl);
78 
79 uint8_t hal_get_tlv_hdr_size_li(void);
80 
81 uint64_t hal_rx_get_qdesc_addr_li(uint8_t *dst_ring_desc, uint8_t *buf);
82 #endif /* _HAL_LI_REO_H_ */
83