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