rxpcu_ppdu_end_info.h 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839
  1. /*
  2. * Copyright (c) 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. #ifndef _RXPCU_PPDU_END_INFO_H_
  19. #define _RXPCU_PPDU_END_INFO_H_
  20. #if !defined(__ASSEMBLER__)
  21. #endif
  22. #include "phyrx_abort_request_info.h"
  23. #include "macrx_abort_request_info.h"
  24. // ################ START SUMMARY #################
  25. //
  26. // Dword Fields
  27. // 0 wb_timestamp_lower_32[31:0]
  28. // 1 wb_timestamp_upper_32[31:0]
  29. // 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]
  30. // 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]
  31. // 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]
  32. // 5 phy_timestamp_tx_lower_32[31:0]
  33. // 6 phy_timestamp_tx_upper_32[31:0]
  34. // 7 bb_length[15:0], bb_data[16], reserved_7[19:17], first_bt_broadcast_status_details[31:20]
  35. // 8 rx_ppdu_duration[23:0], reserved_8[31:24]
  36. // 9 ast_index[15:0], ast_index_valid[16], reserved_9[19:17], second_bt_broadcast_status_details[31:20]
  37. // 10 struct phyrx_abort_request_info phyrx_abort_request_info_details;
  38. // 11 struct macrx_abort_request_info macrx_abort_request_info_details;
  39. // 12 rx_ppdu_end_marker[31:0]
  40. //
  41. // ################ END SUMMARY #################
  42. #define NUM_OF_DWORDS_RXPCU_PPDU_END_INFO 13
  43. struct rxpcu_ppdu_end_info {
  44. uint32_t wb_timestamp_lower_32 : 32; //[31:0]
  45. uint32_t wb_timestamp_upper_32 : 32; //[31:0]
  46. uint32_t rx_antenna : 24, //[23:0]
  47. tx_ht_vht_ack : 1, //[24]
  48. unsupported_mu_nc : 1, //[25]
  49. otp_txbf_disable : 1, //[26]
  50. previous_tlv_corrupted : 1, //[27]
  51. phyrx_abort_request_info_valid : 1, //[28]
  52. macrx_abort_request_info_valid : 1, //[29]
  53. reserved : 2; //[31:30]
  54. uint32_t coex_bt_tx_from_start_of_rx : 1, //[0]
  55. coex_bt_tx_after_start_of_rx : 1, //[1]
  56. coex_wan_tx_from_start_of_rx : 1, //[2]
  57. coex_wan_tx_after_start_of_rx : 1, //[3]
  58. coex_wlan_tx_from_start_of_rx : 1, //[4]
  59. coex_wlan_tx_after_start_of_rx : 1, //[5]
  60. mpdu_delimiter_errors_seen : 1, //[6]
  61. ftm_tm : 2, //[8:7]
  62. dialog_token : 8, //[16:9]
  63. follow_up_dialog_token : 8, //[24:17]
  64. bb_captured_channel : 1, //[25]
  65. reserved_3 : 6; //[31:26]
  66. uint32_t before_mpdu_count_passing_fcs : 8, //[7:0]
  67. before_mpdu_count_failing_fcs : 8, //[15:8]
  68. after_mpdu_count_passing_fcs : 8, //[23:16]
  69. after_mpdu_count_failing_fcs : 8; //[31:24]
  70. uint32_t phy_timestamp_tx_lower_32 : 32; //[31:0]
  71. uint32_t phy_timestamp_tx_upper_32 : 32; //[31:0]
  72. uint32_t bb_length : 16, //[15:0]
  73. bb_data : 1, //[16]
  74. reserved_7 : 3, //[19:17]
  75. first_bt_broadcast_status_details: 12; //[31:20]
  76. uint32_t rx_ppdu_duration : 24, //[23:0]
  77. reserved_8 : 8; //[31:24]
  78. uint32_t ast_index : 16, //[15:0]
  79. ast_index_valid : 1, //[16]
  80. reserved_9 : 3, //[19:17]
  81. second_bt_broadcast_status_details: 12; //[31:20]
  82. struct phyrx_abort_request_info phyrx_abort_request_info_details;
  83. struct macrx_abort_request_info macrx_abort_request_info_details;
  84. uint16_t pre_bt_broadcast_status_details : 12, //[27:16]
  85. reserved_11a : 4; //[31:28]
  86. uint32_t rx_ppdu_end_marker : 32; //[31:0]
  87. };
  88. /*
  89. wb_timestamp_lower_32
  90. WLAN/BT timestamp is a 1 usec resolution timestamp which
  91. does not get updated based on receive beacon like TSF. The
  92. same rules for capturing tsf_timestamp are used to capture
  93. the wb_timestamp. This field represents the lower 32 bits of
  94. the 64-bit timestamp
  95. wb_timestamp_upper_32
  96. WLAN/BT timestamp is a 1 usec resolution timestamp which
  97. does not get updated based on receive beacon like TSF. The
  98. same rules for capturing tsf_timestamp are used to capture
  99. the wb_timestamp. This field represents the upper 32 bits of
  100. the 64-bit timestamp
  101. rx_antenna
  102. Receive antenna value ???
  103. tx_ht_vht_ack
  104. Indicates that a HT or VHT Ack/BA frame was transmitted
  105. in response to this receive packet.
  106. unsupported_mu_nc
  107. Set if MU Nc > 2 in received NDPA.
  108. If this bit is set, even though AID and BSSID are
  109. matched, MAC doesn't send tx_expect_ndp to PHY, because MU
  110. Nc > 2 is not supported in Helium.
  111. otp_txbf_disable
  112. Set if either OTP_SUBFEE_DISABLE or OTP_TXBF_DISABLE is
  113. set and if RXPU receives directed NDPA frame. Then, RXPCU
  114. should not send TX_EXPECT_NDP TLV to SW but set this bit to
  115. inform SW.
  116. previous_tlv_corrupted
  117. When set, the TLV preceding this RXPCU_END_INFO TLV
  118. within the RX_PPDU_END TLV, is corrupted. Not the entire TLV
  119. was received.... Likely due to an abort scenario... If abort
  120. is to blame, see the abort data datastructure for details.
  121. <legal all>
  122. phyrx_abort_request_info_valid
  123. When set, the PHY sent an PHYRX_ABORT_REQUEST TLV to
  124. RXPCU. The abort fields embedded in this TLV contain valid
  125. info.
  126. <legal all>
  127. macrx_abort_request_info_valid
  128. When set, the MAC sent an MACRX_ABORT_REQUEST TLV to
  129. PHYRX. The abort fields embedded in this TLV contain valid
  130. info.
  131. <legal all>
  132. reserved
  133. <legal 0>
  134. coex_bt_tx_from_start_of_rx
  135. Set when BT TX was ongoing when WLAN RX started
  136. coex_bt_tx_after_start_of_rx
  137. coex_wan_tx_from_start_of_rx
  138. Set when WAN TX was ongoing when WLAN RX started
  139. coex_wan_tx_after_start_of_rx
  140. Set when WAN TX started while WLAN RX was already
  141. ongoing
  142. coex_wlan_tx_from_start_of_rx
  143. Set when other WLAN TX was ongoing when WLAN RX started
  144. coex_wlan_tx_after_start_of_rx
  145. Set when other WLAN TX started while WLAN RX was already
  146. ongoing
  147. mpdu_delimiter_errors_seen
  148. When set, MPDU delimiter errors have been detected
  149. during this PPDU reception
  150. ftm_tm
  151. Indicate the timestamp is for the FTM or TM frame
  152. 0: non TM or FTM frame
  153. 1: FTM frame
  154. 2: TM frame
  155. 3: reserved
  156. <legal all>
  157. dialog_token
  158. The dialog token in the FTM or TM frame. Only valid when
  159. the FTM is set. Clear to 254 for a non-FTM frame
  160. <legal all>
  161. follow_up_dialog_token
  162. The follow up dialog token in the FTM or TM frame. Only
  163. valid when the FTM is set. Clear to 0 for a non-FTM frame,
  164. The follow up dialog token in the FTM frame. Only valid when
  165. the FTM is set. Clear to 255 for a non-FTM frame<legal all>
  166. bb_captured_channel
  167. Set by RXPCU when the following conditions are met:
  168. Directed (=> unicast) TM or FTM frame has been received
  169. with passing FCS
  170. PHYRX_PKT_END. Location_info_valid is set
  171. <legal all>
  172. reserved_3
  173. <legal 0>
  174. before_mpdu_count_passing_fcs
  175. Number of MPDUs received in this PPDU that passed the
  176. FCS check before the Coex TX started
  177. before_mpdu_count_failing_fcs
  178. Number of MPDUs received in this PPDU that failed the
  179. FCS check before the Coex TX started
  180. after_mpdu_count_passing_fcs
  181. Number of MPDUs received in this PPDU that passed the
  182. FCS check after the moment the Coex TX started
  183. (Note: The partially received MPDU when the COEX tx
  184. start event came in falls in the after category)
  185. after_mpdu_count_failing_fcs
  186. Number of MPDUs received in this PPDU that failed the
  187. FCS check after the moment the Coex TX started
  188. (Note: The partially received MPDU when the COEX tx
  189. start event came in falls in the after category)
  190. phy_timestamp_tx_lower_32
  191. The PHY timestamp in the AMPI of the most recent rising
  192. edge (TODO: of what ???) after the TX_PHY_DESC.  This field
  193. indicates the lower 32 bits of the timestamp
  194. phy_timestamp_tx_upper_32
  195. The PHY timestamp in the AMPI of the most recent rising
  196. edge (TODO: of what ???) after the TX_PHY_DESC.  This field
  197. indicates the upper 32 bits of the timestamp
  198. bb_length
  199. Indicates the number of bytes of baseband information
  200. for PPDUs where the BB descriptor preamble type is 0x80 to
  201. 0xFF which indicates that this is not a normal PPDU but
  202. rather contains baseband debug information.
  203. TODO: Is this still needed ???
  204. bb_data
  205. Indicates that BB data associated with this PPDU will
  206. exist in the receive buffer. The exact contents of this BB
  207. data can be found by decoding the BB TLV in the buffer
  208. associated with the BB data. See vector_fragment in the
  209. Helium_mac_phy_interface.docx
  210. reserved_7
  211. Reserved: HW should fill with 0, FW should ignore.
  212. first_bt_broadcast_status_details
  213. Same contents as field bt_broadcast_status_details for
  214. the first received COEX_STATUS_BROADCAST tlv during this
  215. PPDU reception.
  216. If no COEX_STATUS_BROADCAST tlv is received during this
  217. PPDU reception, this field will be set to 0
  218. For detailed info see doc: TBD
  219. <legal all>
  220. rx_ppdu_duration
  221. The length of this PPDU reception in us
  222. reserved_8
  223. <legal 0>
  224. ast_index
  225. The AST index of the receive Ack/BA. This information
  226. is provided from the TXPCU to the RXPCU for receive Ack/BA
  227. for implicit beamforming.
  228. <legal all>
  229. ast_index_valid
  230. Indicates that ast_index is valid. Should only be set
  231. for receive Ack/BA where single stream implicit sounding is
  232. captured.
  233. reserved_9
  234. <legal 0>
  235. second_bt_broadcast_status_details
  236. Same contents as field bt_broadcast_status_details for
  237. the second received COEX_STATUS_BROADCAST tlv during this
  238. PPDU reception.
  239. If no second COEX_STATUS_BROADCAST tlv is received
  240. during this PPDU reception, this field will be set to 0
  241. For detailed info see doc: TBD
  242. <legal all>
  243. struct phyrx_abort_request_info phyrx_abort_request_info_details
  244. Field only valid when Phyrx_abort_request_info_valid is
  245. set
  246. The reason why PHY generated an abort request
  247. struct macrx_abort_request_info macrx_abort_request_info_details
  248. Field only valid when macrx_abort_request_info_valid is
  249. set
  250. The reason why MACRX generated an abort request
  251. rx_ppdu_end_marker
  252. Field used by SW to double check that their structure
  253. alignment is in sync with what HW has done.
  254. <legal 0xAABBCCDD>
  255. */
  256. /* Description RXPCU_PPDU_END_INFO_0_WB_TIMESTAMP_LOWER_32
  257. WLAN/BT timestamp is a 1 usec resolution timestamp which
  258. does not get updated based on receive beacon like TSF. The
  259. same rules for capturing tsf_timestamp are used to capture
  260. the wb_timestamp. This field represents the lower 32 bits of
  261. the 64-bit timestamp
  262. */
  263. #define RXPCU_PPDU_END_INFO_0_WB_TIMESTAMP_LOWER_32_OFFSET 0x00000000
  264. #define RXPCU_PPDU_END_INFO_0_WB_TIMESTAMP_LOWER_32_LSB 0
  265. #define RXPCU_PPDU_END_INFO_0_WB_TIMESTAMP_LOWER_32_MASK 0xffffffff
  266. /* Description RXPCU_PPDU_END_INFO_1_WB_TIMESTAMP_UPPER_32
  267. WLAN/BT timestamp is a 1 usec resolution timestamp which
  268. does not get updated based on receive beacon like TSF. The
  269. same rules for capturing tsf_timestamp are used to capture
  270. the wb_timestamp. This field represents the upper 32 bits of
  271. the 64-bit timestamp
  272. */
  273. #define RXPCU_PPDU_END_INFO_1_WB_TIMESTAMP_UPPER_32_OFFSET 0x00000004
  274. #define RXPCU_PPDU_END_INFO_1_WB_TIMESTAMP_UPPER_32_LSB 0
  275. #define RXPCU_PPDU_END_INFO_1_WB_TIMESTAMP_UPPER_32_MASK 0xffffffff
  276. /* Description RXPCU_PPDU_END_INFO_2_RX_ANTENNA
  277. Receive antenna value ???
  278. */
  279. #define RXPCU_PPDU_END_INFO_2_RX_ANTENNA_OFFSET 0x00000008
  280. #define RXPCU_PPDU_END_INFO_2_RX_ANTENNA_LSB 0
  281. #define RXPCU_PPDU_END_INFO_2_RX_ANTENNA_MASK 0x00ffffff
  282. /* Description RXPCU_PPDU_END_INFO_2_TX_HT_VHT_ACK
  283. Indicates that a HT or VHT Ack/BA frame was transmitted
  284. in response to this receive packet.
  285. */
  286. #define RXPCU_PPDU_END_INFO_2_TX_HT_VHT_ACK_OFFSET 0x00000008
  287. #define RXPCU_PPDU_END_INFO_2_TX_HT_VHT_ACK_LSB 24
  288. #define RXPCU_PPDU_END_INFO_2_TX_HT_VHT_ACK_MASK 0x01000000
  289. /* Description RXPCU_PPDU_END_INFO_2_UNSUPPORTED_MU_NC
  290. Set if MU Nc > 2 in received NDPA.
  291. If this bit is set, even though AID and BSSID are
  292. matched, MAC doesn't send tx_expect_ndp to PHY, because MU
  293. Nc > 2 is not supported in Helium.
  294. */
  295. #define RXPCU_PPDU_END_INFO_2_UNSUPPORTED_MU_NC_OFFSET 0x00000008
  296. #define RXPCU_PPDU_END_INFO_2_UNSUPPORTED_MU_NC_LSB 25
  297. #define RXPCU_PPDU_END_INFO_2_UNSUPPORTED_MU_NC_MASK 0x02000000
  298. /* Description RXPCU_PPDU_END_INFO_2_OTP_TXBF_DISABLE
  299. Set if either OTP_SUBFEE_DISABLE or OTP_TXBF_DISABLE is
  300. set and if RXPU receives directed NDPA frame. Then, RXPCU
  301. should not send TX_EXPECT_NDP TLV to SW but set this bit to
  302. inform SW.
  303. */
  304. #define RXPCU_PPDU_END_INFO_2_OTP_TXBF_DISABLE_OFFSET 0x00000008
  305. #define RXPCU_PPDU_END_INFO_2_OTP_TXBF_DISABLE_LSB 26
  306. #define RXPCU_PPDU_END_INFO_2_OTP_TXBF_DISABLE_MASK 0x04000000
  307. /* Description RXPCU_PPDU_END_INFO_2_PREVIOUS_TLV_CORRUPTED
  308. When set, the TLV preceding this RXPCU_END_INFO TLV
  309. within the RX_PPDU_END TLV, is corrupted. Not the entire TLV
  310. was received.... Likely due to an abort scenario... If abort
  311. is to blame, see the abort data datastructure for details.
  312. <legal all>
  313. */
  314. #define RXPCU_PPDU_END_INFO_2_PREVIOUS_TLV_CORRUPTED_OFFSET 0x00000008
  315. #define RXPCU_PPDU_END_INFO_2_PREVIOUS_TLV_CORRUPTED_LSB 27
  316. #define RXPCU_PPDU_END_INFO_2_PREVIOUS_TLV_CORRUPTED_MASK 0x08000000
  317. /* Description RXPCU_PPDU_END_INFO_2_PHYRX_ABORT_REQUEST_INFO_VALID
  318. When set, the PHY sent an PHYRX_ABORT_REQUEST TLV to
  319. RXPCU. The abort fields embedded in this TLV contain valid
  320. info.
  321. <legal all>
  322. */
  323. #define RXPCU_PPDU_END_INFO_2_PHYRX_ABORT_REQUEST_INFO_VALID_OFFSET 0x00000008
  324. #define RXPCU_PPDU_END_INFO_2_PHYRX_ABORT_REQUEST_INFO_VALID_LSB 28
  325. #define RXPCU_PPDU_END_INFO_2_PHYRX_ABORT_REQUEST_INFO_VALID_MASK 0x10000000
  326. /* Description RXPCU_PPDU_END_INFO_2_MACRX_ABORT_REQUEST_INFO_VALID
  327. When set, the MAC sent an MACRX_ABORT_REQUEST TLV to
  328. PHYRX. The abort fields embedded in this TLV contain valid
  329. info.
  330. <legal all>
  331. */
  332. #define RXPCU_PPDU_END_INFO_2_MACRX_ABORT_REQUEST_INFO_VALID_OFFSET 0x00000008
  333. #define RXPCU_PPDU_END_INFO_2_MACRX_ABORT_REQUEST_INFO_VALID_LSB 29
  334. #define RXPCU_PPDU_END_INFO_2_MACRX_ABORT_REQUEST_INFO_VALID_MASK 0x20000000
  335. /* Description RXPCU_PPDU_END_INFO_2_RESERVED
  336. <legal 0>
  337. */
  338. #define RXPCU_PPDU_END_INFO_2_RESERVED_OFFSET 0x00000008
  339. #define RXPCU_PPDU_END_INFO_2_RESERVED_LSB 30
  340. #define RXPCU_PPDU_END_INFO_2_RESERVED_MASK 0xc0000000
  341. /* Description RXPCU_PPDU_END_INFO_3_COEX_BT_TX_FROM_START_OF_RX
  342. Set when BT TX was ongoing when WLAN RX started
  343. */
  344. #define RXPCU_PPDU_END_INFO_3_COEX_BT_TX_FROM_START_OF_RX_OFFSET 0x0000000c
  345. #define RXPCU_PPDU_END_INFO_3_COEX_BT_TX_FROM_START_OF_RX_LSB 0
  346. #define RXPCU_PPDU_END_INFO_3_COEX_BT_TX_FROM_START_OF_RX_MASK 0x00000001
  347. /* Description RXPCU_PPDU_END_INFO_3_COEX_BT_TX_AFTER_START_OF_RX
  348. */
  349. #define RXPCU_PPDU_END_INFO_3_COEX_BT_TX_AFTER_START_OF_RX_OFFSET 0x0000000c
  350. #define RXPCU_PPDU_END_INFO_3_COEX_BT_TX_AFTER_START_OF_RX_LSB 1
  351. #define RXPCU_PPDU_END_INFO_3_COEX_BT_TX_AFTER_START_OF_RX_MASK 0x00000002
  352. /* Description RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_FROM_START_OF_RX
  353. Set when WAN TX was ongoing when WLAN RX started
  354. */
  355. #define RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_FROM_START_OF_RX_OFFSET 0x0000000c
  356. #define RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_FROM_START_OF_RX_LSB 2
  357. #define RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_FROM_START_OF_RX_MASK 0x00000004
  358. /* Description RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_AFTER_START_OF_RX
  359. Set when WAN TX started while WLAN RX was already
  360. ongoing
  361. */
  362. #define RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_AFTER_START_OF_RX_OFFSET 0x0000000c
  363. #define RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_AFTER_START_OF_RX_LSB 3
  364. #define RXPCU_PPDU_END_INFO_3_COEX_WAN_TX_AFTER_START_OF_RX_MASK 0x00000008
  365. /* Description RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_FROM_START_OF_RX
  366. Set when other WLAN TX was ongoing when WLAN RX started
  367. */
  368. #define RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_FROM_START_OF_RX_OFFSET 0x0000000c
  369. #define RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_FROM_START_OF_RX_LSB 4
  370. #define RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_FROM_START_OF_RX_MASK 0x00000010
  371. /* Description RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_AFTER_START_OF_RX
  372. Set when other WLAN TX started while WLAN RX was already
  373. ongoing
  374. */
  375. #define RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_AFTER_START_OF_RX_OFFSET 0x0000000c
  376. #define RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_AFTER_START_OF_RX_LSB 5
  377. #define RXPCU_PPDU_END_INFO_3_COEX_WLAN_TX_AFTER_START_OF_RX_MASK 0x00000020
  378. /* Description RXPCU_PPDU_END_INFO_3_MPDU_DELIMITER_ERRORS_SEEN
  379. When set, MPDU delimiter errors have been detected
  380. during this PPDU reception
  381. */
  382. #define RXPCU_PPDU_END_INFO_3_MPDU_DELIMITER_ERRORS_SEEN_OFFSET 0x0000000c
  383. #define RXPCU_PPDU_END_INFO_3_MPDU_DELIMITER_ERRORS_SEEN_LSB 6
  384. #define RXPCU_PPDU_END_INFO_3_MPDU_DELIMITER_ERRORS_SEEN_MASK 0x00000040
  385. /* Description RXPCU_PPDU_END_INFO_3_FTM_TM
  386. Indicate the timestamp is for the FTM or TM frame
  387. 0: non TM or FTM frame
  388. 1: FTM frame
  389. 2: TM frame
  390. 3: reserved
  391. <legal all>
  392. */
  393. #define RXPCU_PPDU_END_INFO_3_FTM_TM_OFFSET 0x0000000c
  394. #define RXPCU_PPDU_END_INFO_3_FTM_TM_LSB 7
  395. #define RXPCU_PPDU_END_INFO_3_FTM_TM_MASK 0x00000180
  396. /* Description RXPCU_PPDU_END_INFO_3_DIALOG_TOKEN
  397. The dialog token in the FTM or TM frame. Only valid when
  398. the FTM is set. Clear to 254 for a non-FTM frame
  399. <legal all>
  400. */
  401. #define RXPCU_PPDU_END_INFO_3_DIALOG_TOKEN_OFFSET 0x0000000c
  402. #define RXPCU_PPDU_END_INFO_3_DIALOG_TOKEN_LSB 9
  403. #define RXPCU_PPDU_END_INFO_3_DIALOG_TOKEN_MASK 0x0001fe00
  404. /* Description RXPCU_PPDU_END_INFO_3_FOLLOW_UP_DIALOG_TOKEN
  405. The follow up dialog token in the FTM or TM frame. Only
  406. valid when the FTM is set. Clear to 0 for a non-FTM frame,
  407. The follow up dialog token in the FTM frame. Only valid when
  408. the FTM is set. Clear to 255 for a non-FTM frame<legal all>
  409. */
  410. #define RXPCU_PPDU_END_INFO_3_FOLLOW_UP_DIALOG_TOKEN_OFFSET 0x0000000c
  411. #define RXPCU_PPDU_END_INFO_3_FOLLOW_UP_DIALOG_TOKEN_LSB 17
  412. #define RXPCU_PPDU_END_INFO_3_FOLLOW_UP_DIALOG_TOKEN_MASK 0x01fe0000
  413. /* Description RXPCU_PPDU_END_INFO_3_BB_CAPTURED_CHANNEL
  414. Set by RXPCU when the following conditions are met:
  415. Directed (=> unicast) TM or FTM frame has been received
  416. with passing FCS
  417. PHYRX_PKT_END. Location_info_valid is set
  418. <legal all>
  419. */
  420. #define RXPCU_PPDU_END_INFO_3_BB_CAPTURED_CHANNEL_OFFSET 0x0000000c
  421. #define RXPCU_PPDU_END_INFO_3_BB_CAPTURED_CHANNEL_LSB 25
  422. #define RXPCU_PPDU_END_INFO_3_BB_CAPTURED_CHANNEL_MASK 0x02000000
  423. /* Description RXPCU_PPDU_END_INFO_3_RESERVED_3
  424. <legal 0>
  425. */
  426. #define RXPCU_PPDU_END_INFO_3_RESERVED_3_OFFSET 0x0000000c
  427. #define RXPCU_PPDU_END_INFO_3_RESERVED_3_LSB 26
  428. #define RXPCU_PPDU_END_INFO_3_RESERVED_3_MASK 0xfc000000
  429. /* Description RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_PASSING_FCS
  430. Number of MPDUs received in this PPDU that passed the
  431. FCS check before the Coex TX started
  432. */
  433. #define RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_PASSING_FCS_OFFSET 0x00000010
  434. #define RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_PASSING_FCS_LSB 0
  435. #define RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_PASSING_FCS_MASK 0x000000ff
  436. /* Description RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_FAILING_FCS
  437. Number of MPDUs received in this PPDU that failed the
  438. FCS check before the Coex TX started
  439. */
  440. #define RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_FAILING_FCS_OFFSET 0x00000010
  441. #define RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_FAILING_FCS_LSB 8
  442. #define RXPCU_PPDU_END_INFO_4_BEFORE_MPDU_COUNT_FAILING_FCS_MASK 0x0000ff00
  443. /* Description RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_PASSING_FCS
  444. Number of MPDUs received in this PPDU that passed the
  445. FCS check after the moment the Coex TX started
  446. (Note: The partially received MPDU when the COEX tx
  447. start event came in falls in the after category)
  448. */
  449. #define RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_PASSING_FCS_OFFSET 0x00000010
  450. #define RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_PASSING_FCS_LSB 16
  451. #define RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_PASSING_FCS_MASK 0x00ff0000
  452. /* Description RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_FAILING_FCS
  453. Number of MPDUs received in this PPDU that failed the
  454. FCS check after the moment the Coex TX started
  455. (Note: The partially received MPDU when the COEX tx
  456. start event came in falls in the after category)
  457. */
  458. #define RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_FAILING_FCS_OFFSET 0x00000010
  459. #define RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_FAILING_FCS_LSB 24
  460. #define RXPCU_PPDU_END_INFO_4_AFTER_MPDU_COUNT_FAILING_FCS_MASK 0xff000000
  461. /* Description RXPCU_PPDU_END_INFO_5_PHY_TIMESTAMP_TX_LOWER_32
  462. The PHY timestamp in the AMPI of the most recent rising
  463. edge (TODO: of what ???) after the TX_PHY_DESC.  This field
  464. indicates the lower 32 bits of the timestamp
  465. */
  466. #define RXPCU_PPDU_END_INFO_5_PHY_TIMESTAMP_TX_LOWER_32_OFFSET 0x00000014
  467. #define RXPCU_PPDU_END_INFO_5_PHY_TIMESTAMP_TX_LOWER_32_LSB 0
  468. #define RXPCU_PPDU_END_INFO_5_PHY_TIMESTAMP_TX_LOWER_32_MASK 0xffffffff
  469. /* Description RXPCU_PPDU_END_INFO_6_PHY_TIMESTAMP_TX_UPPER_32
  470. The PHY timestamp in the AMPI of the most recent rising
  471. edge (TODO: of what ???) after the TX_PHY_DESC.  This field
  472. indicates the upper 32 bits of the timestamp
  473. */
  474. #define RXPCU_PPDU_END_INFO_6_PHY_TIMESTAMP_TX_UPPER_32_OFFSET 0x00000018
  475. #define RXPCU_PPDU_END_INFO_6_PHY_TIMESTAMP_TX_UPPER_32_LSB 0
  476. #define RXPCU_PPDU_END_INFO_6_PHY_TIMESTAMP_TX_UPPER_32_MASK 0xffffffff
  477. /* Description RXPCU_PPDU_END_INFO_7_BB_LENGTH
  478. Indicates the number of bytes of baseband information
  479. for PPDUs where the BB descriptor preamble type is 0x80 to
  480. 0xFF which indicates that this is not a normal PPDU but
  481. rather contains baseband debug information.
  482. TODO: Is this still needed ???
  483. */
  484. #define RXPCU_PPDU_END_INFO_7_BB_LENGTH_OFFSET 0x0000001c
  485. #define RXPCU_PPDU_END_INFO_7_BB_LENGTH_LSB 0
  486. #define RXPCU_PPDU_END_INFO_7_BB_LENGTH_MASK 0x0000ffff
  487. /* Description RXPCU_PPDU_END_INFO_7_BB_DATA
  488. Indicates that BB data associated with this PPDU will
  489. exist in the receive buffer. The exact contents of this BB
  490. data can be found by decoding the BB TLV in the buffer
  491. associated with the BB data. See vector_fragment in the
  492. Helium_mac_phy_interface.docx
  493. */
  494. #define RXPCU_PPDU_END_INFO_7_BB_DATA_OFFSET 0x0000001c
  495. #define RXPCU_PPDU_END_INFO_7_BB_DATA_LSB 16
  496. #define RXPCU_PPDU_END_INFO_7_BB_DATA_MASK 0x00010000
  497. /* Description RXPCU_PPDU_END_INFO_7_RESERVED_7
  498. Reserved: HW should fill with 0, FW should ignore.
  499. */
  500. #define RXPCU_PPDU_END_INFO_7_RESERVED_7_OFFSET 0x0000001c
  501. #define RXPCU_PPDU_END_INFO_7_RESERVED_7_LSB 17
  502. #define RXPCU_PPDU_END_INFO_7_RESERVED_7_MASK 0x000e0000
  503. /* Description RXPCU_PPDU_END_INFO_7_FIRST_BT_BROADCAST_STATUS_DETAILS
  504. Same contents as field bt_broadcast_status_details for
  505. the first received COEX_STATUS_BROADCAST tlv during this
  506. PPDU reception.
  507. If no COEX_STATUS_BROADCAST tlv is received during this
  508. PPDU reception, this field will be set to 0
  509. For detailed info see doc: TBD
  510. <legal all>
  511. */
  512. #define RXPCU_PPDU_END_INFO_7_FIRST_BT_BROADCAST_STATUS_DETAILS_OFFSET 0x0000001c
  513. #define RXPCU_PPDU_END_INFO_7_FIRST_BT_BROADCAST_STATUS_DETAILS_LSB 20
  514. #define RXPCU_PPDU_END_INFO_7_FIRST_BT_BROADCAST_STATUS_DETAILS_MASK 0xfff00000
  515. /* Description RXPCU_PPDU_END_INFO_8_RX_PPDU_DURATION
  516. The length of this PPDU reception in us
  517. */
  518. #define RXPCU_PPDU_END_INFO_8_RX_PPDU_DURATION_OFFSET 0x00000020
  519. #define RXPCU_PPDU_END_INFO_8_RX_PPDU_DURATION_LSB 0
  520. #define RXPCU_PPDU_END_INFO_8_RX_PPDU_DURATION_MASK 0x00ffffff
  521. /* Description RXPCU_PPDU_END_INFO_8_RESERVED_8
  522. <legal 0>
  523. */
  524. #define RXPCU_PPDU_END_INFO_8_RESERVED_8_OFFSET 0x00000020
  525. #define RXPCU_PPDU_END_INFO_8_RESERVED_8_LSB 24
  526. #define RXPCU_PPDU_END_INFO_8_RESERVED_8_MASK 0xff000000
  527. /* Description RXPCU_PPDU_END_INFO_9_AST_INDEX
  528. The AST index of the receive Ack/BA. This information
  529. is provided from the TXPCU to the RXPCU for receive Ack/BA
  530. for implicit beamforming.
  531. <legal all>
  532. */
  533. #define RXPCU_PPDU_END_INFO_9_AST_INDEX_OFFSET 0x00000024
  534. #define RXPCU_PPDU_END_INFO_9_AST_INDEX_LSB 0
  535. #define RXPCU_PPDU_END_INFO_9_AST_INDEX_MASK 0x0000ffff
  536. /* Description RXPCU_PPDU_END_INFO_9_AST_INDEX_VALID
  537. Indicates that ast_index is valid. Should only be set
  538. for receive Ack/BA where single stream implicit sounding is
  539. captured.
  540. */
  541. #define RXPCU_PPDU_END_INFO_9_AST_INDEX_VALID_OFFSET 0x00000024
  542. #define RXPCU_PPDU_END_INFO_9_AST_INDEX_VALID_LSB 16
  543. #define RXPCU_PPDU_END_INFO_9_AST_INDEX_VALID_MASK 0x00010000
  544. /* Description RXPCU_PPDU_END_INFO_9_RESERVED_9
  545. <legal 0>
  546. */
  547. #define RXPCU_PPDU_END_INFO_9_RESERVED_9_OFFSET 0x00000024
  548. #define RXPCU_PPDU_END_INFO_9_RESERVED_9_LSB 17
  549. #define RXPCU_PPDU_END_INFO_9_RESERVED_9_MASK 0x000e0000
  550. /* Description RXPCU_PPDU_END_INFO_9_SECOND_BT_BROADCAST_STATUS_DETAILS
  551. Same contents as field bt_broadcast_status_details for
  552. the second received COEX_STATUS_BROADCAST tlv during this
  553. PPDU reception.
  554. If no second COEX_STATUS_BROADCAST tlv is received
  555. during this PPDU reception, this field will be set to 0
  556. For detailed info see doc: TBD
  557. <legal all>
  558. */
  559. #define RXPCU_PPDU_END_INFO_9_SECOND_BT_BROADCAST_STATUS_DETAILS_OFFSET 0x00000024
  560. #define RXPCU_PPDU_END_INFO_9_SECOND_BT_BROADCAST_STATUS_DETAILS_LSB 20
  561. #define RXPCU_PPDU_END_INFO_9_SECOND_BT_BROADCAST_STATUS_DETAILS_MASK 0xfff00000
  562. #define RXPCU_PPDU_END_INFO_10_PHYRX_ABORT_REQUEST_INFO_PHYRX_ABORT_REQUEST_INFO_DETAILS_OFFSET 0x00000028
  563. #define RXPCU_PPDU_END_INFO_10_PHYRX_ABORT_REQUEST_INFO_PHYRX_ABORT_REQUEST_INFO_DETAILS_LSB 20
  564. #define RXPCU_PPDU_END_INFO_10_PHYRX_ABORT_REQUEST_INFO_PHYRX_ABORT_REQUEST_INFO_DETAILS_MASK 0xffffffff
  565. #define RXPCU_PPDU_END_INFO_11_MACRX_ABORT_REQUEST_INFO_MACRX_ABORT_REQUEST_INFO_DETAILS_OFFSET 0x0000002c
  566. #define RXPCU_PPDU_END_INFO_11_MACRX_ABORT_REQUEST_INFO_MACRX_ABORT_REQUEST_INFO_DETAILS_LSB 20
  567. #define RXPCU_PPDU_END_INFO_11_MACRX_ABORT_REQUEST_INFO_MACRX_ABORT_REQUEST_INFO_DETAILS_MASK 0xffffffff
  568. /* Description RXPCU_PPDU_END_INFO_12_RX_PPDU_END_MARKER
  569. Field used by SW to double check that their structure
  570. alignment is in sync with what HW has done.
  571. <legal 0xAABBCCDD>
  572. */
  573. #define RXPCU_PPDU_END_INFO_12_RX_PPDU_END_MARKER_OFFSET 0x00000030
  574. #define RXPCU_PPDU_END_INFO_12_RX_PPDU_END_MARKER_LSB 0
  575. #define RXPCU_PPDU_END_INFO_12_RX_PPDU_END_MARKER_MASK 0xffffffff
  576. #endif // _RXPCU_PPDU_END_INFO_H_