xref: /wlan-driver/fw-api/hw/qca6290/11ax/v2/rxpcu_ppdu_end_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef _RXPCU_PPDU_END_INFO_H_
20 #define _RXPCU_PPDU_END_INFO_H_
21 #if !defined(__ASSEMBLER__)
22 #endif
23 
24 #include "phyrx_abort_request_info.h"
25 #include "macrx_abort_request_info.h"
26 
27 // ################ START SUMMARY #################
28 //
29 //	Dword	Fields
30 //	0	wb_timestamp_lower_32[31:0]
31 //	1	wb_timestamp_upper_32[31:0]
32 //	2	rx_antenna[23:0], tx_ht_vht_ack[24], unsupported_mu_nc[25], otp_txbf_disable[26], previous_tlv_corrupted[27], phyrx_abort_request_info_valid[28], macrx_abort_request_info_valid[29], reserved[31:30]
33 //	3	coex_bt_tx_from_start_of_rx[0], coex_bt_tx_after_start_of_rx[1], coex_wan_tx_from_start_of_rx[2], coex_wan_tx_after_start_of_rx[3], coex_wlan_tx_from_start_of_rx[4], coex_wlan_tx_after_start_of_rx[5], mpdu_delimiter_errors_seen[6], ftm_tm[8:7], dialog_token[16:9], follow_up_dialog_token[24:17], bb_captured_channel[25], reserved_3[31:26]
34 //	4	before_mpdu_count_passing_fcs[7:0], before_mpdu_count_failing_fcs[15:8], after_mpdu_count_passing_fcs[23:16], after_mpdu_count_failing_fcs[31:24]
35 //	5	phy_timestamp_tx_lower_32[31:0]
36 //	6	phy_timestamp_tx_upper_32[31:0]
37 //	7	bb_length[15:0], bb_data[16], reserved_7[19:17], first_bt_broadcast_status_details[31:20]
38 //	8	rx_ppdu_duration[23:0], reserved_8[31:24]
39 //	9	ast_index[15:0], ast_index_valid[16], reserved_9[19:17], second_bt_broadcast_status_details[31:20]
40 //	10	struct phyrx_abort_request_info phyrx_abort_request_info_details;
41 //	11	struct macrx_abort_request_info macrx_abort_request_info_details;
42 //	12	rx_ppdu_end_marker[31:0]
43 //
44 // ################ END SUMMARY #################
45 
46 #define NUM_OF_DWORDS_RXPCU_PPDU_END_INFO 13
47 
48 struct rxpcu_ppdu_end_info {
49              uint32_t wb_timestamp_lower_32           : 32; //[31:0]
50              uint32_t wb_timestamp_upper_32           : 32; //[31:0]
51              uint32_t rx_antenna                      : 24, //[23:0]
52                       tx_ht_vht_ack                   :  1, //[24]
53                       unsupported_mu_nc               :  1, //[25]
54                       otp_txbf_disable                :  1, //[26]
55                       previous_tlv_corrupted          :  1, //[27]
56                       phyrx_abort_request_info_valid  :  1, //[28]
57                       macrx_abort_request_info_valid  :  1, //[29]
58                       reserved                        :  2; //[31:30]
59              uint32_t coex_bt_tx_from_start_of_rx     :  1, //[0]
60                       coex_bt_tx_after_start_of_rx    :  1, //[1]
61                       coex_wan_tx_from_start_of_rx    :  1, //[2]
62                       coex_wan_tx_after_start_of_rx   :  1, //[3]
63                       coex_wlan_tx_from_start_of_rx   :  1, //[4]
64                       coex_wlan_tx_after_start_of_rx  :  1, //[5]
65                       mpdu_delimiter_errors_seen      :  1, //[6]
66                       ftm_tm                          :  2, //[8:7]
67                       dialog_token                    :  8, //[16:9]
68                       follow_up_dialog_token          :  8, //[24:17]
69                       bb_captured_channel             :  1, //[25]
70                       reserved_3                      :  6; //[31:26]
71              uint32_t before_mpdu_count_passing_fcs   :  8, //[7:0]
72                       before_mpdu_count_failing_fcs   :  8, //[15:8]
73                       after_mpdu_count_passing_fcs    :  8, //[23:16]
74                       after_mpdu_count_failing_fcs    :  8; //[31:24]
75              uint32_t phy_timestamp_tx_lower_32       : 32; //[31:0]
76              uint32_t phy_timestamp_tx_upper_32       : 32; //[31:0]
77              uint32_t bb_length                       : 16, //[15:0]
78                       bb_data                         :  1, //[16]
79                       reserved_7                      :  3, //[19:17]
80                       first_bt_broadcast_status_details: 12; //[31:20]
81              uint32_t rx_ppdu_duration                : 24, //[23:0]
82                       reserved_8                      :  8; //[31:24]
83              uint32_t ast_index                       : 16, //[15:0]
84                       ast_index_valid                 :  1, //[16]
85                       reserved_9                      :  3, //[19:17]
86                       second_bt_broadcast_status_details: 12; //[31:20]
87     struct            phyrx_abort_request_info                       phyrx_abort_request_info_details;
88     struct            macrx_abort_request_info                       macrx_abort_request_info_details;
89              uint16_t pre_bt_broadcast_status_details : 12, //[27:16]
90                       reserved_11a                    :  4; //[31:28]
91              uint32_t rx_ppdu_end_marker              : 32; //[31:0]
92 };
93 
94 /*
95 
96 wb_timestamp_lower_32
97 
98 			WLAN/BT timestamp is a 1 usec resolution timestamp which
99 			does not get updated based on receive beacon like TSF.  The
100 			same rules for capturing tsf_timestamp are used to capture
101 			the wb_timestamp. This field represents the lower 32 bits of
102 			the 64-bit timestamp
103 
104 wb_timestamp_upper_32
105 
106 			WLAN/BT timestamp is a 1 usec resolution timestamp which
107 			does not get updated based on receive beacon like TSF.  The
108 			same rules for capturing tsf_timestamp are used to capture
109 			the wb_timestamp. This field represents the upper 32 bits of
110 			the 64-bit timestamp
111 
112 rx_antenna
113 
114 			Receive antenna value ???
115 
116 tx_ht_vht_ack
117 
118 			Indicates that a HT or VHT Ack/BA frame was transmitted
119 			in response to this receive packet.
120 
121 unsupported_mu_nc
122 
123 			Set if MU Nc > 2 in received NDPA.
124 
125 			If this bit is set, even though AID and BSSID are
126 			matched, MAC doesn't send tx_expect_ndp to PHY, because MU
127 			Nc > 2 is not supported in Helium.
128 
129 otp_txbf_disable
130 
131 			Set if either OTP_SUBFEE_DISABLE or OTP_TXBF_DISABLE is
132 			set and if RXPU receives directed NDPA frame. Then, RXPCU
133 			should not send TX_EXPECT_NDP TLV to SW but set this bit to
134 			inform SW.
135 
136 previous_tlv_corrupted
137 
138 			When set, the TLV preceding this RXPCU_END_INFO TLV
139 			within the RX_PPDU_END TLV, is corrupted. Not the entire TLV
140 			was received.... Likely due to an abort scenario... If abort
141 			is to blame, see the abort data datastructure for details.
142 
143 			<legal all>
144 
145 phyrx_abort_request_info_valid
146 
147 			When set, the PHY sent an PHYRX_ABORT_REQUEST TLV to
148 			RXPCU. The abort fields embedded in this TLV contain valid
149 			info.
150 
151 			<legal all>
152 
153 macrx_abort_request_info_valid
154 
155 			When set, the MAC sent an MACRX_ABORT_REQUEST TLV to
156 			PHYRX. The abort fields embedded in this TLV contain valid
157 			info.
158 
159 			<legal all>
160 
161 reserved
162 
163 			<legal 0>
164 
165 coex_bt_tx_from_start_of_rx
166 
167 			Set when BT TX was ongoing when WLAN RX started
168 
169 coex_bt_tx_after_start_of_rx
170 
171 
172 coex_wan_tx_from_start_of_rx
173 
174 			Set when WAN TX was ongoing when WLAN RX started
175 
176 coex_wan_tx_after_start_of_rx
177 
178 			Set when WAN TX started while WLAN RX was already
179 			ongoing
180 
181 coex_wlan_tx_from_start_of_rx
182 
183 			Set when other WLAN TX was ongoing when WLAN RX started
184 
185 coex_wlan_tx_after_start_of_rx
186 
187 			Set when other WLAN TX started while WLAN RX was already
188 			ongoing
189 
190 mpdu_delimiter_errors_seen
191 
192 			When set, MPDU delimiter errors have been detected
193 			during this PPDU reception
194 
195 ftm_tm
196 
197 			Indicate the timestamp is for the FTM or TM frame
198 
199 
200 
201 			0: non TM or FTM frame
202 
203 			1: FTM frame
204 
205 			2: TM frame
206 
207 			3: reserved
208 
209 			<legal all>
210 
211 dialog_token
212 
213 			The dialog token in the FTM or TM frame. Only valid when
214 			the FTM is set. Clear to 254 for a non-FTM frame
215 
216 			<legal all>
217 
218 follow_up_dialog_token
219 
220 			The follow up dialog token in the FTM or TM frame. Only
221 			valid when the FTM is set. Clear to 0 for a non-FTM frame,
222 			The follow up dialog token in the FTM frame. Only valid when
223 			the FTM is set. Clear to 255 for a non-FTM frame<legal all>
224 
225 bb_captured_channel
226 
227 			Set by RXPCU when the following conditions are met:
228 
229 
230 
231 			Directed (=> unicast) TM or FTM frame has been received
232 			with passing FCS
233 
234 			PHYRX_PKT_END. Location_info_valid is set
235 
236 
237 
238 			<legal all>
239 
240 reserved_3
241 
242 			<legal 0>
243 
244 before_mpdu_count_passing_fcs
245 
246 			Number of MPDUs received in this PPDU that passed the
247 			FCS check before the Coex TX started
248 
249 before_mpdu_count_failing_fcs
250 
251 			Number of MPDUs received in this PPDU that failed the
252 			FCS check before the Coex TX started
253 
254 after_mpdu_count_passing_fcs
255 
256 			Number of MPDUs received in this PPDU that passed the
257 			FCS check after the moment the Coex TX started
258 
259 
260 
261 			(Note: The partially received MPDU when the COEX tx
262 			start event came in falls in the after category)
263 
264 after_mpdu_count_failing_fcs
265 
266 			Number of MPDUs received in this PPDU that failed the
267 			FCS check after the moment the Coex TX started
268 
269 
270 
271 			(Note: The partially received MPDU when the COEX tx
272 			start event came in falls in the after category)
273 
274 phy_timestamp_tx_lower_32
275 
276 			The PHY timestamp in the AMPI of the most recent rising
277 			edge (TODO: of what ???) after the TX_PHY_DESC.  This field
278 			indicates the lower 32 bits of the timestamp
279 
280 phy_timestamp_tx_upper_32
281 
282 			The PHY timestamp in the AMPI of the most recent rising
283 			edge (TODO: of what ???) after the TX_PHY_DESC.  This field
284 			indicates the upper 32 bits of the timestamp
285 
286 bb_length
287 
288 			Indicates the number of bytes of baseband information
289 			for PPDUs where the BB descriptor preamble type is 0x80 to
290 			0xFF which indicates that this is not a normal PPDU but
291 			rather contains baseband debug information.
292 
293 			TODO: Is this still needed ???
294 
295 bb_data
296 
297 			Indicates that BB data associated with this PPDU will
298 			exist in the receive buffer.  The exact contents of this BB
299 			data can be found by decoding the BB TLV in the buffer
300 			associated with the BB data.  See vector_fragment in the
301 			Helium_mac_phy_interface.docx
302 
303 reserved_7
304 
305 			Reserved: HW should fill with 0, FW should ignore.
306 
307 first_bt_broadcast_status_details
308 
309 			Same contents as field bt_broadcast_status_details for
310 			the first received COEX_STATUS_BROADCAST tlv during this
311 			PPDU reception.
312 
313 
314 
315 			If no COEX_STATUS_BROADCAST tlv is received during this
316 			PPDU reception, this field will be set to 0
317 
318 
319 
320 
321 
322 			For detailed info see doc: TBD
323 
324 			<legal all>
325 
326 rx_ppdu_duration
327 
328 			The length of this PPDU reception in us
329 
330 reserved_8
331 
332 			<legal 0>
333 
334 ast_index
335 
336 			The AST index of the receive Ack/BA.  This information
337 			is provided from the TXPCU to the RXPCU for receive Ack/BA
338 			for implicit beamforming.
339 
340 			<legal all>
341 
342 ast_index_valid
343 
344 			Indicates that ast_index is valid.  Should only be set
345 			for receive Ack/BA where single stream implicit sounding is
346 			captured.
347 
348 reserved_9
349 
350 			<legal 0>
351 
352 second_bt_broadcast_status_details
353 
354 			Same contents as field bt_broadcast_status_details for
355 			the second received COEX_STATUS_BROADCAST tlv during this
356 			PPDU reception.
357 
358 
359 
360 			If no second COEX_STATUS_BROADCAST tlv is received
361 			during this PPDU reception, this field will be set to 0
362 
363 
364 
365 
366 
367 			For detailed info see doc: TBD
368 
369 			<legal all>
370 
371 struct phyrx_abort_request_info phyrx_abort_request_info_details
372 
373 			Field only valid when Phyrx_abort_request_info_valid is
374 			set
375 
376 			The reason why PHY generated an abort request
377 
378 struct macrx_abort_request_info macrx_abort_request_info_details
379 
380 			Field only valid when macrx_abort_request_info_valid is
381 			set
382 
383 			The reason why MACRX generated an abort request
384 
385 rx_ppdu_end_marker
386 
387 			Field used by SW to double check that their structure
388 			alignment is in sync with what HW has done.
389 
390 			<legal 0xAABBCCDD>
391 */
392 
393 
394 /* Description		RXPCU_PPDU_END_INFO_0_WB_TIMESTAMP_LOWER_32
395 
396 			WLAN/BT timestamp is a 1 usec resolution timestamp which
397 			does not get updated based on receive beacon like TSF.  The
398 			same rules for capturing tsf_timestamp are used to capture
399 			the wb_timestamp. This field represents the lower 32 bits of
400 			the 64-bit timestamp
401 */
402 #define RXPCU_PPDU_END_INFO_0_WB_TIMESTAMP_LOWER_32_OFFSET           0x00000000
403 #define RXPCU_PPDU_END_INFO_0_WB_TIMESTAMP_LOWER_32_LSB              0
404 #define RXPCU_PPDU_END_INFO_0_WB_TIMESTAMP_LOWER_32_MASK             0xffffffff
405 
406 /* Description		RXPCU_PPDU_END_INFO_1_WB_TIMESTAMP_UPPER_32
407 
408 			WLAN/BT timestamp is a 1 usec resolution timestamp which
409 			does not get updated based on receive beacon like TSF.  The
410 			same rules for capturing tsf_timestamp are used to capture
411 			the wb_timestamp. This field represents the upper 32 bits of
412 			the 64-bit timestamp
413 */
414 #define RXPCU_PPDU_END_INFO_1_WB_TIMESTAMP_UPPER_32_OFFSET           0x00000004
415 #define RXPCU_PPDU_END_INFO_1_WB_TIMESTAMP_UPPER_32_LSB              0
416 #define RXPCU_PPDU_END_INFO_1_WB_TIMESTAMP_UPPER_32_MASK             0xffffffff
417 
418 /* Description		RXPCU_PPDU_END_INFO_2_RX_ANTENNA
419 
420 			Receive antenna value ???
421 */
422 #define RXPCU_PPDU_END_INFO_2_RX_ANTENNA_OFFSET                      0x00000008
423 #define RXPCU_PPDU_END_INFO_2_RX_ANTENNA_LSB                         0
424 #define RXPCU_PPDU_END_INFO_2_RX_ANTENNA_MASK                        0x00ffffff
425 
426 /* Description		RXPCU_PPDU_END_INFO_2_TX_HT_VHT_ACK
427 
428 			Indicates that a HT or VHT Ack/BA frame was transmitted
429 			in response to this receive packet.
430 */
431 #define RXPCU_PPDU_END_INFO_2_TX_HT_VHT_ACK_OFFSET                   0x00000008
432 #define RXPCU_PPDU_END_INFO_2_TX_HT_VHT_ACK_LSB                      24
433 #define RXPCU_PPDU_END_INFO_2_TX_HT_VHT_ACK_MASK                     0x01000000
434 
435 /* Description		RXPCU_PPDU_END_INFO_2_UNSUPPORTED_MU_NC
436 
437 			Set if MU Nc > 2 in received NDPA.
438 
439 			If this bit is set, even though AID and BSSID are
440 			matched, MAC doesn't send tx_expect_ndp to PHY, because MU
441 			Nc > 2 is not supported in Helium.
442 */
443 #define RXPCU_PPDU_END_INFO_2_UNSUPPORTED_MU_NC_OFFSET               0x00000008
444 #define RXPCU_PPDU_END_INFO_2_UNSUPPORTED_MU_NC_LSB                  25
445 #define RXPCU_PPDU_END_INFO_2_UNSUPPORTED_MU_NC_MASK                 0x02000000
446 
447 /* Description		RXPCU_PPDU_END_INFO_2_OTP_TXBF_DISABLE
448 
449 			Set if either OTP_SUBFEE_DISABLE or OTP_TXBF_DISABLE is
450 			set and if RXPU receives directed NDPA frame. Then, RXPCU
451 			should not send TX_EXPECT_NDP TLV to SW but set this bit to
452 			inform SW.
453 */
454 #define RXPCU_PPDU_END_INFO_2_OTP_TXBF_DISABLE_OFFSET                0x00000008
455 #define RXPCU_PPDU_END_INFO_2_OTP_TXBF_DISABLE_LSB                   26
456 #define RXPCU_PPDU_END_INFO_2_OTP_TXBF_DISABLE_MASK                  0x04000000
457 
458 /* Description		RXPCU_PPDU_END_INFO_2_PREVIOUS_TLV_CORRUPTED
459 
460 			When set, the TLV preceding this RXPCU_END_INFO TLV
461 			within the RX_PPDU_END TLV, is corrupted. Not the entire TLV
462 			was received.... Likely due to an abort scenario... If abort
463 			is to blame, see the abort data datastructure for details.
464 
465 			<legal all>
466 */
467 #define RXPCU_PPDU_END_INFO_2_PREVIOUS_TLV_CORRUPTED_OFFSET          0x00000008
468 #define RXPCU_PPDU_END_INFO_2_PREVIOUS_TLV_CORRUPTED_LSB             27
469 #define RXPCU_PPDU_END_INFO_2_PREVIOUS_TLV_CORRUPTED_MASK            0x08000000
470 
471 /* Description		RXPCU_PPDU_END_INFO_2_PHYRX_ABORT_REQUEST_INFO_VALID
472 
473 			When set, the PHY sent an PHYRX_ABORT_REQUEST TLV to
474 			RXPCU. The abort fields embedded in this TLV contain valid
475 			info.
476 
477 			<legal all>
478 */
479 #define RXPCU_PPDU_END_INFO_2_PHYRX_ABORT_REQUEST_INFO_VALID_OFFSET  0x00000008
480 #define RXPCU_PPDU_END_INFO_2_PHYRX_ABORT_REQUEST_INFO_VALID_LSB     28
481 #define RXPCU_PPDU_END_INFO_2_PHYRX_ABORT_REQUEST_INFO_VALID_MASK    0x10000000
482 
483 /* Description		RXPCU_PPDU_END_INFO_2_MACRX_ABORT_REQUEST_INFO_VALID
484 
485 			When set, the MAC sent an MACRX_ABORT_REQUEST TLV to
486 			PHYRX. The abort fields embedded in this TLV contain valid
487 			info.
488 
489 			<legal all>
490 */
491 #define RXPCU_PPDU_END_INFO_2_MACRX_ABORT_REQUEST_INFO_VALID_OFFSET  0x00000008
492 #define RXPCU_PPDU_END_INFO_2_MACRX_ABORT_REQUEST_INFO_VALID_LSB     29
493 #define RXPCU_PPDU_END_INFO_2_MACRX_ABORT_REQUEST_INFO_VALID_MASK    0x20000000
494 
495 /* Description		RXPCU_PPDU_END_INFO_2_RESERVED
496 
497 			<legal 0>
498 */
499 #define RXPCU_PPDU_END_INFO_2_RESERVED_OFFSET                        0x00000008
500 #define RXPCU_PPDU_END_INFO_2_RESERVED_LSB                           30
501 #define RXPCU_PPDU_END_INFO_2_RESERVED_MASK                          0xc0000000
502 
503 /* Description		RXPCU_PPDU_END_INFO_3_COEX_BT_TX_FROM_START_OF_RX
504 
505 			Set when BT TX was ongoing when WLAN RX started
506 */
507 #define RXPCU_PPDU_END_INFO_3_COEX_BT_TX_FROM_START_OF_RX_OFFSET     0x0000000c
508 #define RXPCU_PPDU_END_INFO_3_COEX_BT_TX_FROM_START_OF_RX_LSB        0
509 #define RXPCU_PPDU_END_INFO_3_COEX_BT_TX_FROM_START_OF_RX_MASK       0x00000001
510 
511 /* Description		RXPCU_PPDU_END_INFO_3_COEX_BT_TX_AFTER_START_OF_RX
512 
513 */
514 #define RXPCU_PPDU_END_INFO_3_COEX_BT_TX_AFTER_START_OF_RX_OFFSET    0x0000000c
515 #define RXPCU_PPDU_END_INFO_3_COEX_BT_TX_AFTER_START_OF_RX_LSB       1
516 #define RXPCU_PPDU_END_INFO_3_COEX_BT_TX_AFTER_START_OF_RX_MASK      0x00000002
517 
518 /* Description		RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_FROM_START_OF_RX
519 
520 			Set when WAN TX was ongoing when WLAN RX started
521 */
522 #define RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_FROM_START_OF_RX_OFFSET    0x0000000c
523 #define RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_FROM_START_OF_RX_LSB       2
524 #define RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_FROM_START_OF_RX_MASK      0x00000004
525 
526 /* Description		RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_AFTER_START_OF_RX
527 
528 			Set when WAN TX started while WLAN RX was already
529 			ongoing
530 */
531 #define RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_AFTER_START_OF_RX_OFFSET   0x0000000c
532 #define RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_AFTER_START_OF_RX_LSB      3
533 #define RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_AFTER_START_OF_RX_MASK     0x00000008
534 
535 /* Description		RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_FROM_START_OF_RX
536 
537 			Set when other WLAN TX was ongoing when WLAN RX started
538 */
539 #define RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_FROM_START_OF_RX_OFFSET   0x0000000c
540 #define RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_FROM_START_OF_RX_LSB      4
541 #define RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_FROM_START_OF_RX_MASK     0x00000010
542 
543 /* Description		RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_AFTER_START_OF_RX
544 
545 			Set when other WLAN TX started while WLAN RX was already
546 			ongoing
547 */
548 #define RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_AFTER_START_OF_RX_OFFSET  0x0000000c
549 #define RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_AFTER_START_OF_RX_LSB     5
550 #define RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_AFTER_START_OF_RX_MASK    0x00000020
551 
552 /* Description		RXPCU_PPDU_END_INFO_3_MPDU_DELIMITER_ERRORS_SEEN
553 
554 			When set, MPDU delimiter errors have been detected
555 			during this PPDU reception
556 */
557 #define RXPCU_PPDU_END_INFO_3_MPDU_DELIMITER_ERRORS_SEEN_OFFSET      0x0000000c
558 #define RXPCU_PPDU_END_INFO_3_MPDU_DELIMITER_ERRORS_SEEN_LSB         6
559 #define RXPCU_PPDU_END_INFO_3_MPDU_DELIMITER_ERRORS_SEEN_MASK        0x00000040
560 
561 /* Description		RXPCU_PPDU_END_INFO_3_FTM_TM
562 
563 			Indicate the timestamp is for the FTM or TM frame
564 
565 
566 
567 			0: non TM or FTM frame
568 
569 			1: FTM frame
570 
571 			2: TM frame
572 
573 			3: reserved
574 
575 			<legal all>
576 */
577 #define RXPCU_PPDU_END_INFO_3_FTM_TM_OFFSET                          0x0000000c
578 #define RXPCU_PPDU_END_INFO_3_FTM_TM_LSB                             7
579 #define RXPCU_PPDU_END_INFO_3_FTM_TM_MASK                            0x00000180
580 
581 /* Description		RXPCU_PPDU_END_INFO_3_DIALOG_TOKEN
582 
583 			The dialog token in the FTM or TM frame. Only valid when
584 			the FTM is set. Clear to 254 for a non-FTM frame
585 
586 			<legal all>
587 */
588 #define RXPCU_PPDU_END_INFO_3_DIALOG_TOKEN_OFFSET                    0x0000000c
589 #define RXPCU_PPDU_END_INFO_3_DIALOG_TOKEN_LSB                       9
590 #define RXPCU_PPDU_END_INFO_3_DIALOG_TOKEN_MASK                      0x0001fe00
591 
592 /* Description		RXPCU_PPDU_END_INFO_3_FOLLOW_UP_DIALOG_TOKEN
593 
594 			The follow up dialog token in the FTM or TM frame. Only
595 			valid when the FTM is set. Clear to 0 for a non-FTM frame,
596 			The follow up dialog token in the FTM frame. Only valid when
597 			the FTM is set. Clear to 255 for a non-FTM frame<legal all>
598 */
599 #define RXPCU_PPDU_END_INFO_3_FOLLOW_UP_DIALOG_TOKEN_OFFSET          0x0000000c
600 #define RXPCU_PPDU_END_INFO_3_FOLLOW_UP_DIALOG_TOKEN_LSB             17
601 #define RXPCU_PPDU_END_INFO_3_FOLLOW_UP_DIALOG_TOKEN_MASK            0x01fe0000
602 
603 /* Description		RXPCU_PPDU_END_INFO_3_BB_CAPTURED_CHANNEL
604 
605 			Set by RXPCU when the following conditions are met:
606 
607 
608 
609 			Directed (=> unicast) TM or FTM frame has been received
610 			with passing FCS
611 
612 			PHYRX_PKT_END. Location_info_valid is set
613 
614 
615 
616 			<legal all>
617 */
618 #define RXPCU_PPDU_END_INFO_3_BB_CAPTURED_CHANNEL_OFFSET             0x0000000c
619 #define RXPCU_PPDU_END_INFO_3_BB_CAPTURED_CHANNEL_LSB                25
620 #define RXPCU_PPDU_END_INFO_3_BB_CAPTURED_CHANNEL_MASK               0x02000000
621 
622 /* Description		RXPCU_PPDU_END_INFO_3_RESERVED_3
623 
624 			<legal 0>
625 */
626 #define RXPCU_PPDU_END_INFO_3_RESERVED_3_OFFSET                      0x0000000c
627 #define RXPCU_PPDU_END_INFO_3_RESERVED_3_LSB                         26
628 #define RXPCU_PPDU_END_INFO_3_RESERVED_3_MASK                        0xfc000000
629 
630 /* Description		RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_PASSING_FCS
631 
632 			Number of MPDUs received in this PPDU that passed the
633 			FCS check before the Coex TX started
634 */
635 #define RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_PASSING_FCS_OFFSET   0x00000010
636 #define RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_PASSING_FCS_LSB      0
637 #define RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_PASSING_FCS_MASK     0x000000ff
638 
639 /* Description		RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_FAILING_FCS
640 
641 			Number of MPDUs received in this PPDU that failed the
642 			FCS check before the Coex TX started
643 */
644 #define RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_FAILING_FCS_OFFSET   0x00000010
645 #define RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_FAILING_FCS_LSB      8
646 #define RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_FAILING_FCS_MASK     0x0000ff00
647 
648 /* Description		RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_PASSING_FCS
649 
650 			Number of MPDUs received in this PPDU that passed the
651 			FCS check after the moment the Coex TX started
652 
653 
654 
655 			(Note: The partially received MPDU when the COEX tx
656 			start event came in falls in the after category)
657 */
658 #define RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_PASSING_FCS_OFFSET    0x00000010
659 #define RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_PASSING_FCS_LSB       16
660 #define RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_PASSING_FCS_MASK      0x00ff0000
661 
662 /* Description		RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_FAILING_FCS
663 
664 			Number of MPDUs received in this PPDU that failed the
665 			FCS check after the moment the Coex TX started
666 
667 
668 
669 			(Note: The partially received MPDU when the COEX tx
670 			start event came in falls in the after category)
671 */
672 #define RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_FAILING_FCS_OFFSET    0x00000010
673 #define RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_FAILING_FCS_LSB       24
674 #define RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_FAILING_FCS_MASK      0xff000000
675 
676 /* Description		RXPCU_PPDU_END_INFO_5_PHY_TIMESTAMP_TX_LOWER_32
677 
678 			The PHY timestamp in the AMPI of the most recent rising
679 			edge (TODO: of what ???) after the TX_PHY_DESC.  This field
680 			indicates the lower 32 bits of the timestamp
681 */
682 #define RXPCU_PPDU_END_INFO_5_PHY_TIMESTAMP_TX_LOWER_32_OFFSET       0x00000014
683 #define RXPCU_PPDU_END_INFO_5_PHY_TIMESTAMP_TX_LOWER_32_LSB          0
684 #define RXPCU_PPDU_END_INFO_5_PHY_TIMESTAMP_TX_LOWER_32_MASK         0xffffffff
685 
686 /* Description		RXPCU_PPDU_END_INFO_6_PHY_TIMESTAMP_TX_UPPER_32
687 
688 			The PHY timestamp in the AMPI of the most recent rising
689 			edge (TODO: of what ???) after the TX_PHY_DESC.  This field
690 			indicates the upper 32 bits of the timestamp
691 */
692 #define RXPCU_PPDU_END_INFO_6_PHY_TIMESTAMP_TX_UPPER_32_OFFSET       0x00000018
693 #define RXPCU_PPDU_END_INFO_6_PHY_TIMESTAMP_TX_UPPER_32_LSB          0
694 #define RXPCU_PPDU_END_INFO_6_PHY_TIMESTAMP_TX_UPPER_32_MASK         0xffffffff
695 
696 /* Description		RXPCU_PPDU_END_INFO_7_BB_LENGTH
697 
698 			Indicates the number of bytes of baseband information
699 			for PPDUs where the BB descriptor preamble type is 0x80 to
700 			0xFF which indicates that this is not a normal PPDU but
701 			rather contains baseband debug information.
702 
703 			TODO: Is this still needed ???
704 */
705 #define RXPCU_PPDU_END_INFO_7_BB_LENGTH_OFFSET                       0x0000001c
706 #define RXPCU_PPDU_END_INFO_7_BB_LENGTH_LSB                          0
707 #define RXPCU_PPDU_END_INFO_7_BB_LENGTH_MASK                         0x0000ffff
708 
709 /* Description		RXPCU_PPDU_END_INFO_7_BB_DATA
710 
711 			Indicates that BB data associated with this PPDU will
712 			exist in the receive buffer.  The exact contents of this BB
713 			data can be found by decoding the BB TLV in the buffer
714 			associated with the BB data.  See vector_fragment in the
715 			Helium_mac_phy_interface.docx
716 */
717 #define RXPCU_PPDU_END_INFO_7_BB_DATA_OFFSET                         0x0000001c
718 #define RXPCU_PPDU_END_INFO_7_BB_DATA_LSB                            16
719 #define RXPCU_PPDU_END_INFO_7_BB_DATA_MASK                           0x00010000
720 
721 /* Description		RXPCU_PPDU_END_INFO_7_RESERVED_7
722 
723 			Reserved: HW should fill with 0, FW should ignore.
724 */
725 #define RXPCU_PPDU_END_INFO_7_RESERVED_7_OFFSET                      0x0000001c
726 #define RXPCU_PPDU_END_INFO_7_RESERVED_7_LSB                         17
727 #define RXPCU_PPDU_END_INFO_7_RESERVED_7_MASK                        0x000e0000
728 
729 /* Description		RXPCU_PPDU_END_INFO_7_FIRST_BT_BROADCAST_STATUS_DETAILS
730 
731 			Same contents as field bt_broadcast_status_details for
732 			the first received COEX_STATUS_BROADCAST tlv during this
733 			PPDU reception.
734 
735 
736 
737 			If no COEX_STATUS_BROADCAST tlv is received during this
738 			PPDU reception, this field will be set to 0
739 
740 
741 
742 
743 
744 			For detailed info see doc: TBD
745 
746 			<legal all>
747 */
748 #define RXPCU_PPDU_END_INFO_7_FIRST_BT_BROADCAST_STATUS_DETAILS_OFFSET 0x0000001c
749 #define RXPCU_PPDU_END_INFO_7_FIRST_BT_BROADCAST_STATUS_DETAILS_LSB  20
750 #define RXPCU_PPDU_END_INFO_7_FIRST_BT_BROADCAST_STATUS_DETAILS_MASK 0xfff00000
751 
752 /* Description		RXPCU_PPDU_END_INFO_8_RX_PPDU_DURATION
753 
754 			The length of this PPDU reception in us
755 */
756 #define RXPCU_PPDU_END_INFO_8_RX_PPDU_DURATION_OFFSET                0x00000020
757 #define RXPCU_PPDU_END_INFO_8_RX_PPDU_DURATION_LSB                   0
758 #define RXPCU_PPDU_END_INFO_8_RX_PPDU_DURATION_MASK                  0x00ffffff
759 
760 /* Description		RXPCU_PPDU_END_INFO_8_RESERVED_8
761 
762 			<legal 0>
763 */
764 #define RXPCU_PPDU_END_INFO_8_RESERVED_8_OFFSET                      0x00000020
765 #define RXPCU_PPDU_END_INFO_8_RESERVED_8_LSB                         24
766 #define RXPCU_PPDU_END_INFO_8_RESERVED_8_MASK                        0xff000000
767 
768 /* Description		RXPCU_PPDU_END_INFO_9_AST_INDEX
769 
770 			The AST index of the receive Ack/BA.  This information
771 			is provided from the TXPCU to the RXPCU for receive Ack/BA
772 			for implicit beamforming.
773 
774 			<legal all>
775 */
776 #define RXPCU_PPDU_END_INFO_9_AST_INDEX_OFFSET                       0x00000024
777 #define RXPCU_PPDU_END_INFO_9_AST_INDEX_LSB                          0
778 #define RXPCU_PPDU_END_INFO_9_AST_INDEX_MASK                         0x0000ffff
779 
780 /* Description		RXPCU_PPDU_END_INFO_9_AST_INDEX_VALID
781 
782 			Indicates that ast_index is valid.  Should only be set
783 			for receive Ack/BA where single stream implicit sounding is
784 			captured.
785 */
786 #define RXPCU_PPDU_END_INFO_9_AST_INDEX_VALID_OFFSET                 0x00000024
787 #define RXPCU_PPDU_END_INFO_9_AST_INDEX_VALID_LSB                    16
788 #define RXPCU_PPDU_END_INFO_9_AST_INDEX_VALID_MASK                   0x00010000
789 
790 /* Description		RXPCU_PPDU_END_INFO_9_RESERVED_9
791 
792 			<legal 0>
793 */
794 #define RXPCU_PPDU_END_INFO_9_RESERVED_9_OFFSET                      0x00000024
795 #define RXPCU_PPDU_END_INFO_9_RESERVED_9_LSB                         17
796 #define RXPCU_PPDU_END_INFO_9_RESERVED_9_MASK                        0x000e0000
797 
798 /* Description		RXPCU_PPDU_END_INFO_9_SECOND_BT_BROADCAST_STATUS_DETAILS
799 
800 			Same contents as field bt_broadcast_status_details for
801 			the second received COEX_STATUS_BROADCAST tlv during this
802 			PPDU reception.
803 
804 
805 
806 			If no second COEX_STATUS_BROADCAST tlv is received
807 			during this PPDU reception, this field will be set to 0
808 
809 
810 
811 
812 
813 			For detailed info see doc: TBD
814 
815 			<legal all>
816 */
817 #define RXPCU_PPDU_END_INFO_9_SECOND_BT_BROADCAST_STATUS_DETAILS_OFFSET 0x00000024
818 #define RXPCU_PPDU_END_INFO_9_SECOND_BT_BROADCAST_STATUS_DETAILS_LSB 20
819 #define RXPCU_PPDU_END_INFO_9_SECOND_BT_BROADCAST_STATUS_DETAILS_MASK 0xfff00000
820 #define RXPCU_PPDU_END_INFO_10_PHYRX_ABORT_REQUEST_INFO_PHYRX_ABORT_REQUEST_INFO_DETAILS_OFFSET 0x00000028
821 #define RXPCU_PPDU_END_INFO_10_PHYRX_ABORT_REQUEST_INFO_PHYRX_ABORT_REQUEST_INFO_DETAILS_LSB 20
822 #define RXPCU_PPDU_END_INFO_10_PHYRX_ABORT_REQUEST_INFO_PHYRX_ABORT_REQUEST_INFO_DETAILS_MASK 0xffffffff
823 #define RXPCU_PPDU_END_INFO_11_MACRX_ABORT_REQUEST_INFO_MACRX_ABORT_REQUEST_INFO_DETAILS_OFFSET 0x0000002c
824 #define RXPCU_PPDU_END_INFO_11_MACRX_ABORT_REQUEST_INFO_MACRX_ABORT_REQUEST_INFO_DETAILS_LSB 20
825 #define RXPCU_PPDU_END_INFO_11_MACRX_ABORT_REQUEST_INFO_MACRX_ABORT_REQUEST_INFO_DETAILS_MASK 0xffffffff
826 
827 /* Description		RXPCU_PPDU_END_INFO_12_RX_PPDU_END_MARKER
828 
829 			Field used by SW to double check that their structure
830 			alignment is in sync with what HW has done.
831 
832 			<legal 0xAABBCCDD>
833 */
834 #define RXPCU_PPDU_END_INFO_12_RX_PPDU_END_MARKER_OFFSET             0x00000030
835 #define RXPCU_PPDU_END_INFO_12_RX_PPDU_END_MARKER_LSB                0
836 #define RXPCU_PPDU_END_INFO_12_RX_PPDU_END_MARKER_MASK               0xffffffff
837 
838 
839 #endif // _RXPCU_PPDU_END_INFO_H_
840