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