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