xref: /wlan-driver/fw-api/hw/qca5332/ack_report.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name 
2*5113495bSYour Name /* Copyright (c) 2022, 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 
18*5113495bSYour Name 
19*5113495bSYour Name 
20*5113495bSYour Name 
21*5113495bSYour Name 
22*5113495bSYour Name 
23*5113495bSYour Name 
24*5113495bSYour Name 
25*5113495bSYour Name 
26*5113495bSYour Name #ifndef _ACK_REPORT_H_
27*5113495bSYour Name #define _ACK_REPORT_H_
28*5113495bSYour Name #if !defined(__ASSEMBLER__)
29*5113495bSYour Name #endif
30*5113495bSYour Name 
31*5113495bSYour Name #define NUM_OF_DWORDS_ACK_REPORT 1
32*5113495bSYour Name 
33*5113495bSYour Name 
34*5113495bSYour Name struct ack_report {
35*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
36*5113495bSYour Name              uint32_t selfgen_response_reason                                 :  4, // [3:0]
37*5113495bSYour Name                       ax_trigger_type                                         :  4, // [7:4]
38*5113495bSYour Name                       sr_ppdu                                                 :  1, // [8:8]
39*5113495bSYour Name                       reserved                                                :  7, // [15:9]
40*5113495bSYour Name                       frame_control                                           : 16; // [31:16]
41*5113495bSYour Name #else
42*5113495bSYour Name              uint32_t frame_control                                           : 16, // [31:16]
43*5113495bSYour Name                       reserved                                                :  7, // [15:9]
44*5113495bSYour Name                       sr_ppdu                                                 :  1, // [8:8]
45*5113495bSYour Name                       ax_trigger_type                                         :  4, // [7:4]
46*5113495bSYour Name                       selfgen_response_reason                                 :  4; // [3:0]
47*5113495bSYour Name #endif
48*5113495bSYour Name };
49*5113495bSYour Name 
50*5113495bSYour Name 
51*5113495bSYour Name /* Description		SELFGEN_RESPONSE_REASON
52*5113495bSYour Name 
53*5113495bSYour Name 			Field that indicates why the received frame needs a response
54*5113495bSYour Name 			 in SIFS time. The possible responses are listed in order.
55*5113495bSYour Name 
56*5113495bSYour Name 
57*5113495bSYour Name 			<enum 0     CTS_frame>
58*5113495bSYour Name 			<enum 1     ACK_frame>
59*5113495bSYour Name 			<enum 2     BA_frame >
60*5113495bSYour Name 			<enum 3     Qboost_trigger> Qboost trigger received
61*5113495bSYour Name 			<enum 4     PSPOLL_trigger> PSPOLL trigger received
62*5113495bSYour Name 			<enum 5     UAPSD_trigger > Unscheduled APSD  trigger received
63*5113495bSYour Name 
64*5113495bSYour Name 			<enum 6     CBF_frame> the CBF frame needs to be send as
65*5113495bSYour Name 			 a result of NDP or BRPOLL
66*5113495bSYour Name 			<enum 7     ax_su_trigger> 11ax trigger received for this
67*5113495bSYour Name 			 device
68*5113495bSYour Name 			<enum 8     ax_wildcard_trigger> 11ax wildcardtrigger has
69*5113495bSYour Name 			 been received
70*5113495bSYour Name 			<enum 9     ax_unassoc_wildcard_trigger> 11ax wildcard trigger
71*5113495bSYour Name 			 for unassociated STAs has been received
72*5113495bSYour Name 			<enum 12     eht_su_trigger> EHT R1 trigger received for
73*5113495bSYour Name 			 this device
74*5113495bSYour Name 
75*5113495bSYour Name 			<enum 10     MU_UL_response_to_response>
76*5113495bSYour Name 
77*5113495bSYour Name 			<enum 11     Ranging_NDP_LMR_frames> Ranging NDP + LMR need
78*5113495bSYour Name 			 to be sent in response to ranging NDPA + NDP
79*5113495bSYour Name 
80*5113495bSYour Name 			<legal 0-12>
81*5113495bSYour Name */
82*5113495bSYour Name 
83*5113495bSYour Name #define ACK_REPORT_SELFGEN_RESPONSE_REASON_OFFSET                                   0x00000000
84*5113495bSYour Name #define ACK_REPORT_SELFGEN_RESPONSE_REASON_LSB                                      0
85*5113495bSYour Name #define ACK_REPORT_SELFGEN_RESPONSE_REASON_MSB                                      3
86*5113495bSYour Name #define ACK_REPORT_SELFGEN_RESPONSE_REASON_MASK                                     0x0000000f
87*5113495bSYour Name 
88*5113495bSYour Name 
89*5113495bSYour Name /* Description		AX_TRIGGER_TYPE
90*5113495bSYour Name 
91*5113495bSYour Name 			Field Only valid when selfgen_response_reason is an 11ax
92*5113495bSYour Name 			 related trigger
93*5113495bSYour Name 
94*5113495bSYour Name 			The 11AX trigger type/ trigger number:
95*5113495bSYour Name 			It identifies which trigger was received.
96*5113495bSYour Name 			<enum 0 ax_trigger_basic>
97*5113495bSYour Name 			<enum 1 ax_trigger_brpoll>
98*5113495bSYour Name 			<enum 2 ax_trigger_mu_bar>
99*5113495bSYour Name 			<enum 3 ax_trigger_mu_rts>
100*5113495bSYour Name 			<enum 4 ax_trigger_buffer_size>
101*5113495bSYour Name 			<enum 5 ax_trigger_gcr_mu_bar>
102*5113495bSYour Name 			<enum 6 ax_trigger_BQRP>
103*5113495bSYour Name 			<enum 7 ax_trigger_NDP_fb_report_poll>
104*5113495bSYour Name 			<enum 8 ax_tb_ranging_trigger>
105*5113495bSYour Name 			<enum 9 ax_trigger_reserved_9>
106*5113495bSYour Name 			<enum 10 ax_trigger_reserved_10>
107*5113495bSYour Name 			<enum 11 ax_trigger_reserved_11>
108*5113495bSYour Name 			<enum 12 ax_trigger_reserved_12>
109*5113495bSYour Name 			<enum 13 ax_trigger_reserved_13>
110*5113495bSYour Name 			<enum 14 ax_trigger_reserved_14>
111*5113495bSYour Name 			<enum 15 ax_trigger_reserved_15>
112*5113495bSYour Name 
113*5113495bSYour Name 			<legal all>
114*5113495bSYour Name */
115*5113495bSYour Name 
116*5113495bSYour Name #define ACK_REPORT_AX_TRIGGER_TYPE_OFFSET                                           0x00000000
117*5113495bSYour Name #define ACK_REPORT_AX_TRIGGER_TYPE_LSB                                              4
118*5113495bSYour Name #define ACK_REPORT_AX_TRIGGER_TYPE_MSB                                              7
119*5113495bSYour Name #define ACK_REPORT_AX_TRIGGER_TYPE_MASK                                             0x000000f0
120*5113495bSYour Name 
121*5113495bSYour Name 
122*5113495bSYour Name /* Description		SR_PPDU
123*5113495bSYour Name 
124*5113495bSYour Name 			Field only valid with SRP Responder support (not PoR in
125*5113495bSYour Name 			Moselle/Maple/Spruce)
126*5113495bSYour Name 
127*5113495bSYour Name 			Indicates if the received frame was sent using SRP as indicated
128*5113495bSYour Name 			 by the 'SR PPDU' bit in the 'CAS Control' in the 'HE A-Control'
129*5113495bSYour Name 			in one of the MPDUs received
130*5113495bSYour Name 			<legal all>
131*5113495bSYour Name */
132*5113495bSYour Name 
133*5113495bSYour Name #define ACK_REPORT_SR_PPDU_OFFSET                                                   0x00000000
134*5113495bSYour Name #define ACK_REPORT_SR_PPDU_LSB                                                      8
135*5113495bSYour Name #define ACK_REPORT_SR_PPDU_MSB                                                      8
136*5113495bSYour Name #define ACK_REPORT_SR_PPDU_MASK                                                     0x00000100
137*5113495bSYour Name 
138*5113495bSYour Name 
139*5113495bSYour Name /* Description		RESERVED
140*5113495bSYour Name 
141*5113495bSYour Name 			<legal 0>
142*5113495bSYour Name */
143*5113495bSYour Name 
144*5113495bSYour Name #define ACK_REPORT_RESERVED_OFFSET                                                  0x00000000
145*5113495bSYour Name #define ACK_REPORT_RESERVED_LSB                                                     9
146*5113495bSYour Name #define ACK_REPORT_RESERVED_MSB                                                     15
147*5113495bSYour Name #define ACK_REPORT_RESERVED_MASK                                                    0x0000fe00
148*5113495bSYour Name 
149*5113495bSYour Name 
150*5113495bSYour Name /* Description		FRAME_CONTROL
151*5113495bSYour Name 
152*5113495bSYour Name 			Field not valid when selfgen_response_reason is MU_UL_response_to_response
153*5113495bSYour Name 
154*5113495bSYour Name 
155*5113495bSYour Name 			For SU receptions:
156*5113495bSYour Name 			frame control field of the received frame
157*5113495bSYour Name 
158*5113495bSYour Name 			In 11ah Mode of Operation, for non-NDP frames the BW information
159*5113495bSYour Name 			 is extracted from Frame Control fields [11:8].
160*5113495bSYour Name 
161*5113495bSYour Name 			Decode is as follows
162*5113495bSYour Name 
163*5113495bSYour Name 			Bits[11] - Dynamic/Static
164*5113495bSYour Name 			Bits[10:8] - Channel BW
165*5113495bSYour Name */
166*5113495bSYour Name 
167*5113495bSYour Name #define ACK_REPORT_FRAME_CONTROL_OFFSET                                             0x00000000
168*5113495bSYour Name #define ACK_REPORT_FRAME_CONTROL_LSB                                                16
169*5113495bSYour Name #define ACK_REPORT_FRAME_CONTROL_MSB                                                31
170*5113495bSYour Name #define ACK_REPORT_FRAME_CONTROL_MASK                                               0xffff0000
171*5113495bSYour Name 
172*5113495bSYour Name 
173*5113495bSYour Name 
174*5113495bSYour Name #endif   // ACK_REPORT
175