xref: /wlan-driver/fw-api/hw/qcn6432/coex_tx_status.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 _COEX_TX_STATUS_H_
18*5113495bSYour Name #define _COEX_TX_STATUS_H_
19*5113495bSYour Name #if !defined(__ASSEMBLER__)
20*5113495bSYour Name #endif
21*5113495bSYour Name 
22*5113495bSYour Name #define NUM_OF_DWORDS_COEX_TX_STATUS 4
23*5113495bSYour Name 
24*5113495bSYour Name #define NUM_OF_QWORDS_COEX_TX_STATUS 2
25*5113495bSYour Name 
26*5113495bSYour Name 
27*5113495bSYour Name struct coex_tx_status {
28*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
29*5113495bSYour Name              uint32_t reserved_0a                                             :  7, // [6:0]
30*5113495bSYour Name                       tx_bw                                                   :  3, // [9:7]
31*5113495bSYour Name                       tx_status_reason                                        :  3, // [12:10]
32*5113495bSYour Name                       tx_wait_ack                                             :  1, // [13:13]
33*5113495bSYour Name                       fes_tx_is_gen_frame                                     :  1, // [14:14]
34*5113495bSYour Name                       sch_tx_burst_ongoing                                    :  1, // [15:15]
35*5113495bSYour Name                       current_tx_duration                                     : 16; // [31:16]
36*5113495bSYour Name              uint32_t next_rx_active_time                                     : 16, // [15:0]
37*5113495bSYour Name                       remaining_fes_time                                      : 16; // [31:16]
38*5113495bSYour Name              uint32_t tx_antenna_mask                                         :  8, // [7:0]
39*5113495bSYour Name                       shared_ant_tx_pwr                                       :  8, // [15:8]
40*5113495bSYour Name                       other_ant_tx_pwr                                        :  8, // [23:16]
41*5113495bSYour Name                       reserved_2                                              :  8; // [31:24]
42*5113495bSYour Name              uint32_t tlv64_padding                                           : 32; // [31:0]
43*5113495bSYour Name #else
44*5113495bSYour Name              uint32_t current_tx_duration                                     : 16, // [31:16]
45*5113495bSYour Name                       sch_tx_burst_ongoing                                    :  1, // [15:15]
46*5113495bSYour Name                       fes_tx_is_gen_frame                                     :  1, // [14:14]
47*5113495bSYour Name                       tx_wait_ack                                             :  1, // [13:13]
48*5113495bSYour Name                       tx_status_reason                                        :  3, // [12:10]
49*5113495bSYour Name                       tx_bw                                                   :  3, // [9:7]
50*5113495bSYour Name                       reserved_0a                                             :  7; // [6:0]
51*5113495bSYour Name              uint32_t remaining_fes_time                                      : 16, // [31:16]
52*5113495bSYour Name                       next_rx_active_time                                     : 16; // [15:0]
53*5113495bSYour Name              uint32_t reserved_2                                              :  8, // [31:24]
54*5113495bSYour Name                       other_ant_tx_pwr                                        :  8, // [23:16]
55*5113495bSYour Name                       shared_ant_tx_pwr                                       :  8, // [15:8]
56*5113495bSYour Name                       tx_antenna_mask                                         :  8; // [7:0]
57*5113495bSYour Name              uint32_t tlv64_padding                                           : 32; // [31:0]
58*5113495bSYour Name #endif
59*5113495bSYour Name };
60*5113495bSYour Name 
61*5113495bSYour Name 
62*5113495bSYour Name /* Description		RESERVED_0A
63*5113495bSYour Name 
64*5113495bSYour Name 			<legal 0>
65*5113495bSYour Name */
66*5113495bSYour Name 
67*5113495bSYour Name #define COEX_TX_STATUS_RESERVED_0A_OFFSET                                           0x0000000000000000
68*5113495bSYour Name #define COEX_TX_STATUS_RESERVED_0A_LSB                                              0
69*5113495bSYour Name #define COEX_TX_STATUS_RESERVED_0A_MSB                                              6
70*5113495bSYour Name #define COEX_TX_STATUS_RESERVED_0A_MASK                                             0x000000000000007f
71*5113495bSYour Name 
72*5113495bSYour Name 
73*5113495bSYour Name /* Description		TX_BW
74*5113495bSYour Name 
75*5113495bSYour Name 			The BW of the upcoming transmission.
76*5113495bSYour Name 			Note: Coex might have changed this from the original request.
77*5113495bSYour Name 			See coex related fields below
78*5113495bSYour Name 
79*5113495bSYour Name 			<enum 0 20_mhz>20 Mhz BW
80*5113495bSYour Name 			<enum 1 40_mhz>40 Mhz BW
81*5113495bSYour Name 			<enum 2 80_mhz>80 Mhz BW
82*5113495bSYour Name 			<enum 3 160_mhz>160 Mhz BW
83*5113495bSYour Name 			<enum 4 320_mhz>320 Mhz BW
84*5113495bSYour Name 			<enum 5 240_mhz>240 Mhz BW
85*5113495bSYour Name */
86*5113495bSYour Name 
87*5113495bSYour Name #define COEX_TX_STATUS_TX_BW_OFFSET                                                 0x0000000000000000
88*5113495bSYour Name #define COEX_TX_STATUS_TX_BW_LSB                                                    7
89*5113495bSYour Name #define COEX_TX_STATUS_TX_BW_MSB                                                    9
90*5113495bSYour Name #define COEX_TX_STATUS_TX_BW_MASK                                                   0x0000000000000380
91*5113495bSYour Name 
92*5113495bSYour Name 
93*5113495bSYour Name /* Description		TX_STATUS_REASON
94*5113495bSYour Name 
95*5113495bSYour Name 			<enum 0     FES_tx_start> TXPCU sends this status at the
96*5113495bSYour Name 			 start of SCH initiated transmission (when the commands
97*5113495bSYour Name 			are given to the PHY). This includes the transmission of
98*5113495bSYour Name 			 RTS and CTS
99*5113495bSYour Name 			Note that based on field 'Fes_tx_is_gen_frame' COEX can
100*5113495bSYour Name 			derive if this is a protection frame or regular PPDU.
101*5113495bSYour Name 
102*5113495bSYour Name 			<enum 1     FES_tx_end> TXPCU sends this status at the end
103*5113495bSYour Name 			 of SCH initiated transmission (when PHY TX has confirmed
104*5113495bSYour Name 			 the transmit over the medium has finished)
105*5113495bSYour Name 
106*5113495bSYour Name 			<enum 2     FES_end> TXPCU sends this status at the end
107*5113495bSYour Name 			of of the entire frame exchange sequence. This includes
108*5113495bSYour Name 			reception (or lack of..) of the ACK/BA/CTS frame
109*5113495bSYour Name 			TXPCU sends this FES after it has sent the TX_FES_STATUS
110*5113495bSYour Name 			 TLV(s). This also sent in case of 11ax basic trigger response
111*5113495bSYour Name 			 transmissions, when an ACK/BA is expected, and that got
112*5113495bSYour Name 			 received.
113*5113495bSYour Name 			<enum 3     Response_tx_start> TXPCU sends this status at
114*5113495bSYour Name 			 the start of Self gen initiated response transmission (when
115*5113495bSYour Name 			 the commands are given to the PHY)
116*5113495bSYour Name 			<enum 4     Response_tx_end> TXPCU sends this status at
117*5113495bSYour Name 			the end of Self gen initiated response transmission (when
118*5113495bSYour Name 			 PHY TX has confirmed the transmit over the medium has finished)
119*5113495bSYour Name 
120*5113495bSYour Name 
121*5113495bSYour Name 			<enum 5     No_tx_ongoing> TXPCU sends this TLV when forced
122*5113495bSYour Name 			 by SW to do so. It is used to be able to get TXPCU and
123*5113495bSYour Name 			coex synchronized again in case of some error handling scenarios
124*5113495bSYour Name 
125*5113495bSYour Name 
126*5113495bSYour Name 			<legal 0-5>
127*5113495bSYour Name */
128*5113495bSYour Name 
129*5113495bSYour Name #define COEX_TX_STATUS_TX_STATUS_REASON_OFFSET                                      0x0000000000000000
130*5113495bSYour Name #define COEX_TX_STATUS_TX_STATUS_REASON_LSB                                         10
131*5113495bSYour Name #define COEX_TX_STATUS_TX_STATUS_REASON_MSB                                         12
132*5113495bSYour Name #define COEX_TX_STATUS_TX_STATUS_REASON_MASK                                        0x0000000000001c00
133*5113495bSYour Name 
134*5113495bSYour Name 
135*5113495bSYour Name /* Description		TX_WAIT_ACK
136*5113495bSYour Name 
137*5113495bSYour Name 			Field can only be set for the 'FES_tx_end' scenario.
138*5113495bSYour Name 			TXPCU sets this bit to 1 when it is waiting for an ACK/BA
139*5113495bSYour Name 			 or CTS Response.
140*5113495bSYour Name */
141*5113495bSYour Name 
142*5113495bSYour Name #define COEX_TX_STATUS_TX_WAIT_ACK_OFFSET                                           0x0000000000000000
143*5113495bSYour Name #define COEX_TX_STATUS_TX_WAIT_ACK_LSB                                              13
144*5113495bSYour Name #define COEX_TX_STATUS_TX_WAIT_ACK_MSB                                              13
145*5113495bSYour Name #define COEX_TX_STATUS_TX_WAIT_ACK_MASK                                             0x0000000000002000
146*5113495bSYour Name 
147*5113495bSYour Name 
148*5113495bSYour Name /* Description		FES_TX_IS_GEN_FRAME
149*5113495bSYour Name 
150*5113495bSYour Name 			Field only valid in case tx_status_reason indicates FES_tx_start
151*5113495bSYour Name 			 or FES_tx_end.
152*5113495bSYour Name 
153*5113495bSYour Name 			Field is set to 1 if the frame transmitted is a self generated
154*5113495bSYour Name 			 frame like RTS, CTS 2 self or NDP
155*5113495bSYour Name */
156*5113495bSYour Name 
157*5113495bSYour Name #define COEX_TX_STATUS_FES_TX_IS_GEN_FRAME_OFFSET                                   0x0000000000000000
158*5113495bSYour Name #define COEX_TX_STATUS_FES_TX_IS_GEN_FRAME_LSB                                      14
159*5113495bSYour Name #define COEX_TX_STATUS_FES_TX_IS_GEN_FRAME_MSB                                      14
160*5113495bSYour Name #define COEX_TX_STATUS_FES_TX_IS_GEN_FRAME_MASK                                     0x0000000000004000
161*5113495bSYour Name 
162*5113495bSYour Name 
163*5113495bSYour Name /* Description		SCH_TX_BURST_ONGOING
164*5113495bSYour Name 
165*5113495bSYour Name 			The proposed change by HWSCH  requires TXPCU to reflect
166*5113495bSYour Name 			TX_FES_SETUP.sch_tx_burst_ongoing field intoCOEX_TX_STATUS.sch_tx_burst_ongoing
167*5113495bSYour Name 			 field, when tx_status_reason is FES_end.
168*5113495bSYour Name 			SCH will overwrite this bit (that is set it to 1), when
169*5113495bSYour Name 			TXPCU set the tx_status_reason to FES_end, and SCH determines
170*5113495bSYour Name 			 that this FES is followed by other SIFS bursting based
171*5113495bSYour Name 			Scheduler commands.
172*5113495bSYour Name 			<legal all>
173*5113495bSYour Name */
174*5113495bSYour Name 
175*5113495bSYour Name #define COEX_TX_STATUS_SCH_TX_BURST_ONGOING_OFFSET                                  0x0000000000000000
176*5113495bSYour Name #define COEX_TX_STATUS_SCH_TX_BURST_ONGOING_LSB                                     15
177*5113495bSYour Name #define COEX_TX_STATUS_SCH_TX_BURST_ONGOING_MSB                                     15
178*5113495bSYour Name #define COEX_TX_STATUS_SCH_TX_BURST_ONGOING_MASK                                    0x0000000000008000
179*5113495bSYour Name 
180*5113495bSYour Name 
181*5113495bSYour Name /* Description		CURRENT_TX_DURATION
182*5113495bSYour Name 
183*5113495bSYour Name 			In case of FES related transmission:
184*5113495bSYour Name 			TXPCU sends current transmission time at the beginning of
185*5113495bSYour Name 			 transmission. This time covers the entire (PPDU) tx_frame.
186*5113495bSYour Name 			This field is only valid when 'tx_status_reason' is equal
187*5113495bSYour Name 			 to FES_tx_start or Response_tx_start. In other scenarios
188*5113495bSYour Name 			 it is set to 0
189*5113495bSYour Name 			In us units <legal all>
190*5113495bSYour Name */
191*5113495bSYour Name 
192*5113495bSYour Name #define COEX_TX_STATUS_CURRENT_TX_DURATION_OFFSET                                   0x0000000000000000
193*5113495bSYour Name #define COEX_TX_STATUS_CURRENT_TX_DURATION_LSB                                      16
194*5113495bSYour Name #define COEX_TX_STATUS_CURRENT_TX_DURATION_MSB                                      31
195*5113495bSYour Name #define COEX_TX_STATUS_CURRENT_TX_DURATION_MASK                                     0x00000000ffff0000
196*5113495bSYour Name 
197*5113495bSYour Name 
198*5113495bSYour Name /* Description		NEXT_RX_ACTIVE_TIME
199*5113495bSYour Name 
200*5113495bSYour Name 			In case of FES transmission:
201*5113495bSYour Name 			The expected receive duration for ACK/CTS/BA frame after
202*5113495bSYour Name 			 current transmission has finished. This field should be
203*5113495bSYour Name 			 set at both the start and end of the transmission.  When
204*5113495bSYour Name 			 no frame reception is expected, this field is 0
205*5113495bSYour Name 
206*5113495bSYour Name 			In case of Response transmission or Trigger Response transmission:
207*5113495bSYour Name 
208*5113495bSYour Name 			The expected receive duration for upcoming reception. This
209*5113495bSYour Name 			 field has the same value as the transmitted duration field.
210*5113495bSYour Name 
211*5113495bSYour Name 
212*5113495bSYour Name 			Note that for this scenario, there might be an other TX
213*5113495bSYour Name 			generated during this specified time. It is not known to
214*5113495bSYour Name 			 this device what the transmitter is planning to do in the
215*5113495bSYour Name 			 remainder of the TXOP. In other words, this value represents
216*5113495bSYour Name 			 the best guess, but might not be fully accurate.
217*5113495bSYour Name 
218*5113495bSYour Name 			In us units
219*5113495bSYour Name 			<legal all>
220*5113495bSYour Name */
221*5113495bSYour Name 
222*5113495bSYour Name #define COEX_TX_STATUS_NEXT_RX_ACTIVE_TIME_OFFSET                                   0x0000000000000000
223*5113495bSYour Name #define COEX_TX_STATUS_NEXT_RX_ACTIVE_TIME_LSB                                      32
224*5113495bSYour Name #define COEX_TX_STATUS_NEXT_RX_ACTIVE_TIME_MSB                                      47
225*5113495bSYour Name #define COEX_TX_STATUS_NEXT_RX_ACTIVE_TIME_MASK                                     0x0000ffff00000000
226*5113495bSYour Name 
227*5113495bSYour Name 
228*5113495bSYour Name /* Description		REMAINING_FES_TIME
229*5113495bSYour Name 
230*5113495bSYour Name 			In case of FES transmission:
231*5113495bSYour Name 			TXPCU sends the remaining FES time it expects to occupy
232*5113495bSYour Name 			the media.
233*5113495bSYour Name 			At the 'FES_tx_start', this value is the current_tx_duration
234*5113495bSYour Name 			 + value of inserted duration field.
235*5113495bSYour Name 			At the 'FES_tx_end', this value is equal to the duration
236*5113495bSYour Name 			 field in the just transmitted frame.
237*5113495bSYour Name 			At the 'FES_end', this value is the remaining FES duration
238*5113495bSYour Name 			 value. Note that this value should only be non zero in
239*5113495bSYour Name 			case of SIFS burting type of transmissions.
240*5113495bSYour Name 			In case of a FES failure, like reponse frame not received,
241*5113495bSYour Name 			this field is set to 0
242*5113495bSYour Name 
243*5113495bSYour Name 			In case of Self Gen response transmission (includes Trigger
244*5113495bSYour Name 			 response):
245*5113495bSYour Name 			At the 'Response_tx_start', this field has the same value
246*5113495bSYour Name 			 as the Current_tx_duration  + inserted duration field
247*5113495bSYour Name 			At the 'Response_tx_end', this field has the same value
248*5113495bSYour Name 			as the inserted duration field
249*5113495bSYour Name 			<legal all>
250*5113495bSYour Name */
251*5113495bSYour Name 
252*5113495bSYour Name #define COEX_TX_STATUS_REMAINING_FES_TIME_OFFSET                                    0x0000000000000000
253*5113495bSYour Name #define COEX_TX_STATUS_REMAINING_FES_TIME_LSB                                       48
254*5113495bSYour Name #define COEX_TX_STATUS_REMAINING_FES_TIME_MSB                                       63
255*5113495bSYour Name #define COEX_TX_STATUS_REMAINING_FES_TIME_MASK                                      0xffff000000000000
256*5113495bSYour Name 
257*5113495bSYour Name 
258*5113495bSYour Name /* Description		TX_ANTENNA_MASK
259*5113495bSYour Name 
260*5113495bSYour Name 			The actual used antennas for this transmission
261*5113495bSYour Name 
262*5113495bSYour Name 			For debug purpose only. PDG should not have modified the
263*5113495bSYour Name 			 value given by the Coex.
264*5113495bSYour Name 
265*5113495bSYour Name 			<legal all>
266*5113495bSYour Name */
267*5113495bSYour Name 
268*5113495bSYour Name #define COEX_TX_STATUS_TX_ANTENNA_MASK_OFFSET                                       0x0000000000000008
269*5113495bSYour Name #define COEX_TX_STATUS_TX_ANTENNA_MASK_LSB                                          0
270*5113495bSYour Name #define COEX_TX_STATUS_TX_ANTENNA_MASK_MSB                                          7
271*5113495bSYour Name #define COEX_TX_STATUS_TX_ANTENNA_MASK_MASK                                         0x00000000000000ff
272*5113495bSYour Name 
273*5113495bSYour Name 
274*5113495bSYour Name /* Description		SHARED_ANT_TX_PWR
275*5113495bSYour Name 
276*5113495bSYour Name 			Actual tx power on the shared antenna
277*5113495bSYour Name 			TXPCU sends at the beginning of transmission when tx_frame
278*5113495bSYour Name 			 is on.
279*5113495bSYour Name 
280*5113495bSYour Name 			For debug purpose only. PDG should not have modified the
281*5113495bSYour Name 			 value given by the Coex.
282*5113495bSYour Name 
283*5113495bSYour Name 			Transmit Power in s6.2 format.
284*5113495bSYour Name 			In units of 0.25 dBm
285*5113495bSYour Name 			<legal all>
286*5113495bSYour Name */
287*5113495bSYour Name 
288*5113495bSYour Name #define COEX_TX_STATUS_SHARED_ANT_TX_PWR_OFFSET                                     0x0000000000000008
289*5113495bSYour Name #define COEX_TX_STATUS_SHARED_ANT_TX_PWR_LSB                                        8
290*5113495bSYour Name #define COEX_TX_STATUS_SHARED_ANT_TX_PWR_MSB                                        15
291*5113495bSYour Name #define COEX_TX_STATUS_SHARED_ANT_TX_PWR_MASK                                       0x000000000000ff00
292*5113495bSYour Name 
293*5113495bSYour Name 
294*5113495bSYour Name /* Description		OTHER_ANT_TX_PWR
295*5113495bSYour Name 
296*5113495bSYour Name 			Actual tx power on the 'unshared' antenna(s)
297*5113495bSYour Name 			TXPCU sends at the beginning of transmission when tx_frame
298*5113495bSYour Name 			 is on.
299*5113495bSYour Name 
300*5113495bSYour Name 			For debug purpose only. PDG should not have modified the
301*5113495bSYour Name 			 value given by the Coex.
302*5113495bSYour Name 
303*5113495bSYour Name 			Transmit Power in s6.2 format.
304*5113495bSYour Name 			In units of 0.25 dBm
305*5113495bSYour Name 			<legal all>
306*5113495bSYour Name */
307*5113495bSYour Name 
308*5113495bSYour Name #define COEX_TX_STATUS_OTHER_ANT_TX_PWR_OFFSET                                      0x0000000000000008
309*5113495bSYour Name #define COEX_TX_STATUS_OTHER_ANT_TX_PWR_LSB                                         16
310*5113495bSYour Name #define COEX_TX_STATUS_OTHER_ANT_TX_PWR_MSB                                         23
311*5113495bSYour Name #define COEX_TX_STATUS_OTHER_ANT_TX_PWR_MASK                                        0x0000000000ff0000
312*5113495bSYour Name 
313*5113495bSYour Name 
314*5113495bSYour Name /* Description		RESERVED_2
315*5113495bSYour Name 
316*5113495bSYour Name 			Generator should set to 0, consumer shall ignore <legal
317*5113495bSYour Name 			0>
318*5113495bSYour Name */
319*5113495bSYour Name 
320*5113495bSYour Name #define COEX_TX_STATUS_RESERVED_2_OFFSET                                            0x0000000000000008
321*5113495bSYour Name #define COEX_TX_STATUS_RESERVED_2_LSB                                               24
322*5113495bSYour Name #define COEX_TX_STATUS_RESERVED_2_MSB                                               31
323*5113495bSYour Name #define COEX_TX_STATUS_RESERVED_2_MASK                                              0x00000000ff000000
324*5113495bSYour Name 
325*5113495bSYour Name 
326*5113495bSYour Name /* Description		TLV64_PADDING
327*5113495bSYour Name 
328*5113495bSYour Name 			Automatic DWORD padding inserted while converting TLV32
329*5113495bSYour Name 			to TLV64 for 64 bit ARCH
330*5113495bSYour Name 			<legal 0>
331*5113495bSYour Name */
332*5113495bSYour Name 
333*5113495bSYour Name #define COEX_TX_STATUS_TLV64_PADDING_OFFSET                                         0x0000000000000008
334*5113495bSYour Name #define COEX_TX_STATUS_TLV64_PADDING_LSB                                            32
335*5113495bSYour Name #define COEX_TX_STATUS_TLV64_PADDING_MSB                                            63
336*5113495bSYour Name #define COEX_TX_STATUS_TLV64_PADDING_MASK                                           0xffffffff00000000
337*5113495bSYour Name 
338*5113495bSYour Name 
339*5113495bSYour Name 
340*5113495bSYour Name #endif   // COEX_TX_STATUS
341