xref: /wlan-driver/fw-api/hw/qca5332/no_ack_report.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. 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 
18 
19 
20 
21 
22 
23 
24 
25 
26 #ifndef _NO_ACK_REPORT_H_
27 #define _NO_ACK_REPORT_H_
28 #if !defined(__ASSEMBLER__)
29 #endif
30 
31 #define NUM_OF_DWORDS_NO_ACK_REPORT 4
32 
33 
34 struct no_ack_report {
35 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
36              uint32_t no_ack_transmit_reason                                  :  4, // [3:0]
37                       macrx_abort_reason                                      :  4, // [7:4]
38                       phyrx_abort_reason                                      :  8, // [15:8]
39                       frame_control                                           : 16; // [31:16]
40              uint32_t rx_ppdu_duration                                        : 24, // [23:0]
41                       sr_ppdu_during_obss                                     :  1, // [24:24]
42                       selfgen_response_reason_to_sr_ppdu                      :  4, // [28:25]
43                       reserved_1                                              :  3; // [31:29]
44              uint32_t pre_bt_broadcast_status_details                         : 12, // [11:0]
45                       first_bt_broadcast_status_details                       : 12, // [23:12]
46                       reserved_2                                              :  8; // [31:24]
47              uint32_t second_bt_broadcast_status_details                      : 12, // [11:0]
48                       reserved_3                                              : 20; // [31:12]
49 #else
50              uint32_t frame_control                                           : 16, // [31:16]
51                       phyrx_abort_reason                                      :  8, // [15:8]
52                       macrx_abort_reason                                      :  4, // [7:4]
53                       no_ack_transmit_reason                                  :  4; // [3:0]
54              uint32_t reserved_1                                              :  3, // [31:29]
55                       selfgen_response_reason_to_sr_ppdu                      :  4, // [28:25]
56                       sr_ppdu_during_obss                                     :  1, // [24:24]
57                       rx_ppdu_duration                                        : 24; // [23:0]
58              uint32_t reserved_2                                              :  8, // [31:24]
59                       first_bt_broadcast_status_details                       : 12, // [23:12]
60                       pre_bt_broadcast_status_details                         : 12; // [11:0]
61              uint32_t reserved_3                                              : 20, // [31:12]
62                       second_bt_broadcast_status_details                      : 12; // [11:0]
63 #endif
64 };
65 
66 
67 /* Description		NO_ACK_TRANSMIT_REASON
68 
69 			Field that indicates why the received frame is not needing
70 			 any transmit response in SIFS time.
71 
72 			The possible responses are listed in order.
73 
74 			<enum 0     NO_ACK_FCS_errors > All received frames have
75 			 FCS errors.
76 			<enum 1     Unicast_no_ack_frame_received > All received
77 			 frames did not require a response.
78 			<enum 2     NO_ACK_Broadcast> Broadcast frame received
79 			<enum 3     NO_ACK_Multicast> Multicast frame received
80 			<enum 4     Not_directed> Frames received are not directed
81 			 to this device (based on addr1)
82 			<enum 5     AST_no_ack> The AST entry indicated that NO
83 			ACK shall be send
84 			<enum 6     PHY_GID_mismatch> PHY dropped the incoming frame
85 			 dur to GID mismatch
86 			<enum 7     PHY_AID_mismatch> PHY dropped the incoming frame
87 			 dur to AID mismatch
88 			<enum 8     NO_ACK_PHY_error> PHY reported an error during
89 			 reception. For details, see the 'phy_error...' fields
90 			<enum 9     RTS_bw_not_available> The requested BW for the
91 			 CTS response frame is not available
92 			<enum 10     NDPA_Frame> An NDPA frame got received
93 			<enum 11     NDP_Frame> An NDP frame got received
94 			<enum 12     Trigger_NAV_blocked> a trigger frame was received,
95 			but due to NAV setting, no response could be generated
96 			<enum 13     Trigger_no_AID> A trigger frame was received,
97 			but this device's AID was not in the list
98 			<enum 14     NO_ACK_MAC_ABORT_REQ > No ACK is needed as
99 			SW asked RXPCU to send a abort_request to the PHYRX
100 			<enum 15     no_response_other> placeholder in case non
101 			of the above properly cover the reasons
102 
103 			Also see the field SR_PPDU_during_OBSS.
104 			<legal 0-15>
105 */
106 
107 #define NO_ACK_REPORT_NO_ACK_TRANSMIT_REASON_OFFSET                                 0x00000000
108 #define NO_ACK_REPORT_NO_ACK_TRANSMIT_REASON_LSB                                    0
109 #define NO_ACK_REPORT_NO_ACK_TRANSMIT_REASON_MSB                                    3
110 #define NO_ACK_REPORT_NO_ACK_TRANSMIT_REASON_MASK                                   0x0000000f
111 
112 
113 /* Description		MACRX_ABORT_REASON
114 
115 			Field only valid when No_ack_transmit_reason is set to NO_ACK_MAC_ABORT_REQ
116 
117 
118 			Error field received from MACRX_ABORT_REQUEST.Macrx_abort_reason[2:0]
119 
120 			 <Legal all>
121 */
122 
123 #define NO_ACK_REPORT_MACRX_ABORT_REASON_OFFSET                                     0x00000000
124 #define NO_ACK_REPORT_MACRX_ABORT_REASON_LSB                                        4
125 #define NO_ACK_REPORT_MACRX_ABORT_REASON_MSB                                        7
126 #define NO_ACK_REPORT_MACRX_ABORT_REASON_MASK                                       0x000000f0
127 
128 
129 /* Description		PHYRX_ABORT_REASON
130 
131 			Field only valid when No_ack_transmit_reason is set to NO_ACK_PHY_error
132 
133 
134 			Error field received from PHYRX_ABORT_REQUEST.Phyrx_abort_reason
135 
136 
137 			<Legal all>
138 */
139 
140 #define NO_ACK_REPORT_PHYRX_ABORT_REASON_OFFSET                                     0x00000000
141 #define NO_ACK_REPORT_PHYRX_ABORT_REASON_LSB                                        8
142 #define NO_ACK_REPORT_PHYRX_ABORT_REASON_MSB                                        15
143 #define NO_ACK_REPORT_PHYRX_ABORT_REASON_MASK                                       0x0000ff00
144 
145 
146 /* Description		FRAME_CONTROL
147 
148 			frame control field of the received (first properly received)
149 			frame
150 
151 			<Legal all>
152 */
153 
154 #define NO_ACK_REPORT_FRAME_CONTROL_OFFSET                                          0x00000000
155 #define NO_ACK_REPORT_FRAME_CONTROL_LSB                                             16
156 #define NO_ACK_REPORT_FRAME_CONTROL_MSB                                             31
157 #define NO_ACK_REPORT_FRAME_CONTROL_MASK                                            0xffff0000
158 
159 
160 /* Description		RX_PPDU_DURATION
161 
162 			The length of this PPDU reception in us
163 			<Legal all>
164 */
165 
166 #define NO_ACK_REPORT_RX_PPDU_DURATION_OFFSET                                       0x00000004
167 #define NO_ACK_REPORT_RX_PPDU_DURATION_LSB                                          0
168 #define NO_ACK_REPORT_RX_PPDU_DURATION_MSB                                          23
169 #define NO_ACK_REPORT_RX_PPDU_DURATION_MASK                                         0x00ffffff
170 
171 
172 /* Description		SR_PPDU_DURING_OBSS
173 
174 			Field only valid with SRP Responder support (not PoR in
175 			Moselle/Maple/Spruce)
176 
177 			Indicates that the received frame was sent using SRP as
178 			indicated by the 'SR PPDU' bit in the 'CAS Control' in the
179 			 'HE A-Control' in one of the MPDUs received, and that the
180 			 response could not be generated due to OBSS traffic setting
181 			 the NAV
182 			<legal all>
183 */
184 
185 #define NO_ACK_REPORT_SR_PPDU_DURING_OBSS_OFFSET                                    0x00000004
186 #define NO_ACK_REPORT_SR_PPDU_DURING_OBSS_LSB                                       24
187 #define NO_ACK_REPORT_SR_PPDU_DURING_OBSS_MSB                                       24
188 #define NO_ACK_REPORT_SR_PPDU_DURING_OBSS_MASK                                      0x01000000
189 
190 
191 /* Description		SELFGEN_RESPONSE_REASON_TO_SR_PPDU
192 
193 			Field only valid with SRP Responder support (not PoR in
194 			Moselle/Maple/Spruce)
195 
196 			This field indicates why the received SR PPDU needs a response
197 			 in SIFS time. The e-num used is the same as in the field
198 			 selfgen_response_reason in 'ACK_REPORT' structure although
199 			 some of these will be unused in case of an SR PPDU.
200 
201 			<enum 0     CTS_frame>
202 			<enum 1     ACK_frame>
203 			<enum 2     BA_frame >
204 			<enum 3     Qboost_trigger> Qboost trigger received
205 			<enum 4     PSPOLL_trigger> PSPOLL trigger received
206 			<enum 5     UAPSD_trigger > Unscheduled APSD  trigger received
207 
208 			<enum 6     CBF_frame> the CBF frame needs to be send as
209 			 a result of NDP or BRPOLL
210 			<enum 7     ax_su_trigger> 11ax trigger received for this
211 			 device
212 			<enum 8     ax_wildcard_trigger> 11ax wildcardtrigger has
213 			 been received
214 			<enum 9     ax_unassoc_wildcard_trigger> 11ax wildcard trigger
215 			 for unassociated STAs has been received
216 			<enum 12     eht_su_trigger> EHT R1 trigger received for
217 			 this device
218 			<enum 10     MU_UL_response_to_response>
219 
220 			<enum 11     Ranging_NDP_LMR_frames> Ranging NDP + LMR need
221 			 to be sent in response to ranging NDPA + NDP
222 
223 			<legal 0-12>
224 */
225 
226 #define NO_ACK_REPORT_SELFGEN_RESPONSE_REASON_TO_SR_PPDU_OFFSET                     0x00000004
227 #define NO_ACK_REPORT_SELFGEN_RESPONSE_REASON_TO_SR_PPDU_LSB                        25
228 #define NO_ACK_REPORT_SELFGEN_RESPONSE_REASON_TO_SR_PPDU_MSB                        28
229 #define NO_ACK_REPORT_SELFGEN_RESPONSE_REASON_TO_SR_PPDU_MASK                       0x1e000000
230 
231 
232 /* Description		RESERVED_1
233 
234 			<legal all>
235 */
236 
237 #define NO_ACK_REPORT_RESERVED_1_OFFSET                                             0x00000004
238 #define NO_ACK_REPORT_RESERVED_1_LSB                                                29
239 #define NO_ACK_REPORT_RESERVED_1_MSB                                                31
240 #define NO_ACK_REPORT_RESERVED_1_MASK                                               0xe0000000
241 
242 
243 /* Description		PRE_BT_BROADCAST_STATUS_DETAILS
244 
245 			Same contents as field "bt_broadcast_status_details" for
246 			 the first received COEX_STATUS_BROADCAST tlv during this
247 			 PPDU reception.
248 			After power up, this field is all initialized to 0
249 
250 			Bits: [31:28]: always 0
251 
252 
253 			For detailed info see doc: TBD
254 			<legal all>
255 */
256 
257 #define NO_ACK_REPORT_PRE_BT_BROADCAST_STATUS_DETAILS_OFFSET                        0x00000008
258 #define NO_ACK_REPORT_PRE_BT_BROADCAST_STATUS_DETAILS_LSB                           0
259 #define NO_ACK_REPORT_PRE_BT_BROADCAST_STATUS_DETAILS_MSB                           11
260 #define NO_ACK_REPORT_PRE_BT_BROADCAST_STATUS_DETAILS_MASK                          0x00000fff
261 
262 
263 /* Description		FIRST_BT_BROADCAST_STATUS_DETAILS
264 
265 			Same contents as field "bt_broadcast_status_details" for
266 			 the first received COEX_STATUS_BROADCAST tlv during this
267 			 PPDU reception.
268 
269 			If no COEX_STATUS_BROADCAST tlv is received during this
270 			PPDU reception, this field will be set to 0
271 			<legal all>
272 */
273 
274 #define NO_ACK_REPORT_FIRST_BT_BROADCAST_STATUS_DETAILS_OFFSET                      0x00000008
275 #define NO_ACK_REPORT_FIRST_BT_BROADCAST_STATUS_DETAILS_LSB                         12
276 #define NO_ACK_REPORT_FIRST_BT_BROADCAST_STATUS_DETAILS_MSB                         23
277 #define NO_ACK_REPORT_FIRST_BT_BROADCAST_STATUS_DETAILS_MASK                        0x00fff000
278 
279 
280 /* Description		RESERVED_2
281 
282 			<legal 0>
283 */
284 
285 #define NO_ACK_REPORT_RESERVED_2_OFFSET                                             0x00000008
286 #define NO_ACK_REPORT_RESERVED_2_LSB                                                24
287 #define NO_ACK_REPORT_RESERVED_2_MSB                                                31
288 #define NO_ACK_REPORT_RESERVED_2_MASK                                               0xff000000
289 
290 
291 /* Description		SECOND_BT_BROADCAST_STATUS_DETAILS
292 
293 			Same contents as field "bt_broadcast_status_details" for
294 			 the second received COEX_STATUS_BROADCAST tlv during this
295 			 PPDU reception.
296 
297 			If no second COEX_STATUS_BROADCAST tlv is received during
298 			 this PPDU reception, this field will be set to 0
299 			<legal all>
300 */
301 
302 #define NO_ACK_REPORT_SECOND_BT_BROADCAST_STATUS_DETAILS_OFFSET                     0x0000000c
303 #define NO_ACK_REPORT_SECOND_BT_BROADCAST_STATUS_DETAILS_LSB                        0
304 #define NO_ACK_REPORT_SECOND_BT_BROADCAST_STATUS_DETAILS_MSB                        11
305 #define NO_ACK_REPORT_SECOND_BT_BROADCAST_STATUS_DETAILS_MASK                       0x00000fff
306 
307 
308 /* Description		RESERVED_3
309 
310 			<legal 0>
311 */
312 
313 #define NO_ACK_REPORT_RESERVED_3_OFFSET                                             0x0000000c
314 #define NO_ACK_REPORT_RESERVED_3_LSB                                                12
315 #define NO_ACK_REPORT_RESERVED_3_MSB                                                31
316 #define NO_ACK_REPORT_RESERVED_3_MASK                                               0xfffff000
317 
318 
319 
320 #endif   // NO_ACK_REPORT
321