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