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