rxpcu_ppdu_end_info.h 27 KB

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