xref: /wlan-driver/fw-api/hw/qca9574/rx_mpdu_link_ptr.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2021 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 // $ATH_LICENSE_HW_HDR_C$
18 //
19 // DO NOT EDIT!  This file is automatically generated
20 //               These definitions are tied to a particular hardware layout
21 
22 
23 #ifndef _RX_MPDU_LINK_PTR_H_
24 #define _RX_MPDU_LINK_PTR_H_
25 #if !defined(__ASSEMBLER__)
26 #endif
27 
28 #include "buffer_addr_info.h"
29 
30 // ################ START SUMMARY #################
31 //
32 //	Dword	Fields
33 //	0-1	struct buffer_addr_info mpdu_link_desc_addr_info;
34 //
35 // ################ END SUMMARY #################
36 
37 #define NUM_OF_DWORDS_RX_MPDU_LINK_PTR 2
38 
39 struct rx_mpdu_link_ptr {
40     struct            buffer_addr_info                       mpdu_link_desc_addr_info;
41 };
42 
43 /*
44 
45 struct buffer_addr_info mpdu_link_desc_addr_info
46 
47 			Details of the physical address of an MPDU link
48 			descriptor
49 */
50 
51 
52  /* EXTERNAL REFERENCE : struct buffer_addr_info mpdu_link_desc_addr_info */
53 
54 
55 /* Description		RX_MPDU_LINK_PTR_0_MPDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_31_0
56 
57 			Address (lower 32 bits) of the MSDU buffer OR
58 			MSDU_EXTENSION descriptor OR Link Descriptor
59 
60 
61 
62 			In case of 'NULL' pointer, this field is set to 0
63 
64 			<legal all>
65 */
66 #define RX_MPDU_LINK_PTR_0_MPDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_31_0_OFFSET 0x00000000
67 #define RX_MPDU_LINK_PTR_0_MPDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_31_0_LSB 0
68 #define RX_MPDU_LINK_PTR_0_MPDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_31_0_MASK 0xffffffff
69 
70 /* Description		RX_MPDU_LINK_PTR_1_MPDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_39_32
71 
72 			Address (upper 8 bits) of the MSDU buffer OR
73 			MSDU_EXTENSION descriptor OR Link Descriptor
74 
75 
76 
77 			In case of 'NULL' pointer, this field is set to 0
78 
79 			<legal all>
80 */
81 #define RX_MPDU_LINK_PTR_1_MPDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_39_32_OFFSET 0x00000004
82 #define RX_MPDU_LINK_PTR_1_MPDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_39_32_LSB 0
83 #define RX_MPDU_LINK_PTR_1_MPDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_39_32_MASK 0x000000ff
84 
85 /* Description		RX_MPDU_LINK_PTR_1_MPDU_LINK_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER
86 
87 			Consumer: WBM
88 
89 			Producer: SW/FW
90 
91 
92 
93 			In case of 'NULL' pointer, this field is set to 0
94 
95 
96 
97 			Indicates to which buffer manager the buffer OR
98 			MSDU_EXTENSION descriptor OR link descriptor that is being
99 			pointed to shall be returned after the frame has been
100 			processed. It is used by WBM for routing purposes.
101 
102 
103 
104 			<enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned
105 			to the WMB buffer idle list
106 
107 			<enum 1 WBM_IDLE_DESC_LIST> This buffer shall be
108 			returned to the WMB idle link descriptor idle list
109 
110 			<enum 2 FW_BM> This buffer shall be returned to the FW
111 
112 			<enum 3 SW0_BM> This buffer shall be returned to the SW,
113 			ring 0
114 
115 			<enum 4 SW1_BM> This buffer shall be returned to the SW,
116 			ring 1
117 
118 			<enum 5 SW2_BM> This buffer shall be returned to the SW,
119 			ring 2
120 
121 			<enum 6 SW3_BM> This buffer shall be returned to the SW,
122 			ring 3
123 
124 			<enum 7 SW4_BM> This buffer shall be returned to the SW,
125 			ring 3
126 
127 
128 
129 			<legal all>
130 */
131 #define RX_MPDU_LINK_PTR_1_MPDU_LINK_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_OFFSET 0x00000004
132 #define RX_MPDU_LINK_PTR_1_MPDU_LINK_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_LSB 8
133 #define RX_MPDU_LINK_PTR_1_MPDU_LINK_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_MASK 0x00000700
134 
135 /* Description		RX_MPDU_LINK_PTR_1_MPDU_LINK_DESC_ADDR_INFO_SW_BUFFER_COOKIE
136 
137 			Cookie field exclusively used by SW.
138 
139 
140 
141 			In case of 'NULL' pointer, this field is set to 0
142 
143 
144 
145 			HW ignores the contents, accept that it passes the
146 			programmed value on to other descriptors together with the
147 			physical address
148 
149 
150 
151 			Field can be used by SW to for example associate the
152 			buffers physical address with the virtual address
153 
154 			The bit definitions as used by SW are within SW HLD
155 			specification
156 
157 
158 
159 			NOTE:
160 
161 			The three most significant bits can have a special
162 			meaning in case this struct is embedded in a TX_MPDU_DETAILS
163 			STRUCT, and field transmit_bw_restriction is set
164 
165 
166 
167 			In case of NON punctured transmission:
168 
169 			Sw_buffer_cookie[20:19] = 2'b00: 20 MHz TX only
170 
171 			Sw_buffer_cookie[20:19] = 2'b01: 40 MHz TX only
172 
173 			Sw_buffer_cookie[20:19] = 2'b10: 80 MHz TX only
174 
175 			Sw_buffer_cookie[20:19] = 2'b11: 160 MHz TX only
176 
177 
178 
179 			In case of punctured transmission:
180 
181 			Sw_buffer_cookie[20:18] = 3'b000: pattern 0 only
182 
183 			Sw_buffer_cookie[20:18] = 3'b001: pattern 1 only
184 
185 			Sw_buffer_cookie[20:18] = 3'b010: pattern 2 only
186 
187 			Sw_buffer_cookie[20:18] = 3'b011: pattern 3 only
188 
189 			Sw_buffer_cookie[20:18] = 3'b100: pattern 4 only
190 
191 			Sw_buffer_cookie[20:18] = 3'b101: pattern 5 only
192 
193 			Sw_buffer_cookie[20:18] = 3'b110: pattern 6 only
194 
195 			Sw_buffer_cookie[20:18] = 3'b111: pattern 7 only
196 
197 
198 
199 			Note: a punctured transmission is indicated by the
200 			presence of TLV TX_PUNCTURE_SETUP embedded in the scheduler
201 			TLV
202 
203 
204 
205 			<legal all>
206 */
207 #define RX_MPDU_LINK_PTR_1_MPDU_LINK_DESC_ADDR_INFO_SW_BUFFER_COOKIE_OFFSET 0x00000004
208 #define RX_MPDU_LINK_PTR_1_MPDU_LINK_DESC_ADDR_INFO_SW_BUFFER_COOKIE_LSB 11
209 #define RX_MPDU_LINK_PTR_1_MPDU_LINK_DESC_ADDR_INFO_SW_BUFFER_COOKIE_MASK 0xfffff800
210 
211 
212 #endif // _RX_MPDU_LINK_PTR_H_
213