rx_mpdu_desc_info.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. /*
  2. * Copyright (c) 2021 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. // $ATH_LICENSE_HW_HDR_C$
  17. //
  18. // DO NOT EDIT! This file is automatically generated
  19. // These definitions are tied to a particular hardware layout
  20. #ifndef _RX_MPDU_DESC_INFO_H_
  21. #define _RX_MPDU_DESC_INFO_H_
  22. #if !defined(__ASSEMBLER__)
  23. #endif
  24. // ################ START SUMMARY #################
  25. //
  26. // Dword Fields
  27. // 0 msdu_count[7:0], mpdu_sequence_number[19:8], fragment_flag[20], mpdu_retry_bit[21], ampdu_flag[22], bar_frame[23], pn_fields_contain_valid_info[24], sa_is_valid[25], sa_idx_timeout[26], da_is_valid[27], da_is_mcbc[28], da_idx_timeout[29], raw_mpdu[30], more_fragment_flag[31]
  28. // 1 peer_meta_data[31:0]
  29. //
  30. // ################ END SUMMARY #################
  31. #define NUM_OF_DWORDS_RX_MPDU_DESC_INFO 2
  32. struct rx_mpdu_desc_info {
  33. uint32_t msdu_count : 8, //[7:0]
  34. mpdu_sequence_number : 12, //[19:8]
  35. fragment_flag : 1, //[20]
  36. mpdu_retry_bit : 1, //[21]
  37. ampdu_flag : 1, //[22]
  38. bar_frame : 1, //[23]
  39. pn_fields_contain_valid_info : 1, //[24]
  40. sa_is_valid : 1, //[25]
  41. sa_idx_timeout : 1, //[26]
  42. da_is_valid : 1, //[27]
  43. da_is_mcbc : 1, //[28]
  44. da_idx_timeout : 1, //[29]
  45. raw_mpdu : 1, //[30]
  46. more_fragment_flag : 1; //[31]
  47. uint32_t peer_meta_data : 32; //[31:0]
  48. };
  49. /*
  50. msdu_count
  51. Consumer: REO/SW/FW
  52. Producer: RXDMA
  53. The number of MSDUs within the MPDU
  54. <legal all>
  55. mpdu_sequence_number
  56. Consumer: REO/SW/FW
  57. Producer: RXDMA
  58. The field can have two different meanings based on the
  59. setting of field 'BAR_frame':
  60. 'BAR_frame' is NOT set:
  61. The MPDU sequence number of the received frame.
  62. 'BAR_frame' is set.
  63. The MPDU Start sequence number from the BAR frame
  64. <legal all>
  65. fragment_flag
  66. Consumer: REO/SW/FW
  67. Producer: RXDMA
  68. When set, this MPDU is a fragment and REO should forward
  69. this fragment MPDU to the REO destination ring without any
  70. reorder checks, pn checks or bitmap update. This implies
  71. that REO is forwarding the pointer to the MSDU link
  72. descriptor. The destination ring is coming from a
  73. programmable register setting in REO
  74. <legal all>
  75. mpdu_retry_bit
  76. Consumer: REO/SW/FW
  77. Producer: RXDMA
  78. The retry bit setting from the MPDU header of the
  79. received frame
  80. <legal all>
  81. ampdu_flag
  82. Consumer: REO/SW/FW
  83. Producer: RXDMA
  84. When set, the MPDU was received as part of an A-MPDU.
  85. <legal all>
  86. bar_frame
  87. Consumer: REO/SW/FW
  88. Producer: RXDMA
  89. When set, the received frame is a BAR frame. After
  90. processing, this frame shall be pushed to SW or deleted.
  91. <legal all>
  92. pn_fields_contain_valid_info
  93. Consumer: REO/SW/FW
  94. Producer: RXDMA
  95. Copied here by RXDMA from RX_MPDU_END
  96. When not set, REO will Not perform a PN sequence number
  97. check
  98. sa_is_valid
  99. When set, OLE found a valid SA entry for all MSDUs in
  100. this MPDU
  101. <legal all>
  102. sa_idx_timeout
  103. When set, at least 1 MSDU within the MPDU has an
  104. unsuccessful MAC source address search due to the expiration
  105. of the search timer.
  106. <legal all>
  107. da_is_valid
  108. When set, OLE found a valid DA entry for all MSDUs in
  109. this MPDU
  110. <legal all>
  111. da_is_mcbc
  112. Field Only valid if da_is_valid is set
  113. When set, at least one of the DA addresses is a
  114. Multicast or Broadcast address.
  115. <legal all>
  116. da_idx_timeout
  117. When set, at least 1 MSDU within the MPDU has an
  118. unsuccessful MAC destination address search due to the
  119. expiration of the search timer.
  120. <legal all>
  121. raw_mpdu
  122. Field only valid when first_msdu_in_mpdu_flag is set.
  123. When set, the contents in the MSDU buffer contains a
  124. 'RAW' MPDU. This 'RAW' MPDU might be spread out over
  125. multiple MSDU buffers.
  126. <legal all>
  127. more_fragment_flag
  128. The More Fragment bit setting from the MPDU header of
  129. the received frame
  130. <legal all>
  131. peer_meta_data
  132. Meta data that SW has programmed in the Peer table entry
  133. of the transmitting STA.
  134. <legal all>
  135. */
  136. /* Description RX_MPDU_DESC_INFO_0_MSDU_COUNT
  137. Consumer: REO/SW/FW
  138. Producer: RXDMA
  139. The number of MSDUs within the MPDU
  140. <legal all>
  141. */
  142. #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_OFFSET 0x00000000
  143. #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_LSB 0
  144. #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_MASK 0x000000ff
  145. /* Description RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER
  146. Consumer: REO/SW/FW
  147. Producer: RXDMA
  148. The field can have two different meanings based on the
  149. setting of field 'BAR_frame':
  150. 'BAR_frame' is NOT set:
  151. The MPDU sequence number of the received frame.
  152. 'BAR_frame' is set.
  153. The MPDU Start sequence number from the BAR frame
  154. <legal all>
  155. */
  156. #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_OFFSET 0x00000000
  157. #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_LSB 8
  158. #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_MASK 0x000fff00
  159. /* Description RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG
  160. Consumer: REO/SW/FW
  161. Producer: RXDMA
  162. When set, this MPDU is a fragment and REO should forward
  163. this fragment MPDU to the REO destination ring without any
  164. reorder checks, pn checks or bitmap update. This implies
  165. that REO is forwarding the pointer to the MSDU link
  166. descriptor. The destination ring is coming from a
  167. programmable register setting in REO
  168. <legal all>
  169. */
  170. #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_OFFSET 0x00000000
  171. #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_LSB 20
  172. #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_MASK 0x00100000
  173. /* Description RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT
  174. Consumer: REO/SW/FW
  175. Producer: RXDMA
  176. The retry bit setting from the MPDU header of the
  177. received frame
  178. <legal all>
  179. */
  180. #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_OFFSET 0x00000000
  181. #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_LSB 21
  182. #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_MASK 0x00200000
  183. /* Description RX_MPDU_DESC_INFO_0_AMPDU_FLAG
  184. Consumer: REO/SW/FW
  185. Producer: RXDMA
  186. When set, the MPDU was received as part of an A-MPDU.
  187. <legal all>
  188. */
  189. #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_OFFSET 0x00000000
  190. #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_LSB 22
  191. #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_MASK 0x00400000
  192. /* Description RX_MPDU_DESC_INFO_0_BAR_FRAME
  193. Consumer: REO/SW/FW
  194. Producer: RXDMA
  195. When set, the received frame is a BAR frame. After
  196. processing, this frame shall be pushed to SW or deleted.
  197. <legal all>
  198. */
  199. #define RX_MPDU_DESC_INFO_0_BAR_FRAME_OFFSET 0x00000000
  200. #define RX_MPDU_DESC_INFO_0_BAR_FRAME_LSB 23
  201. #define RX_MPDU_DESC_INFO_0_BAR_FRAME_MASK 0x00800000
  202. /* Description RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO
  203. Consumer: REO/SW/FW
  204. Producer: RXDMA
  205. Copied here by RXDMA from RX_MPDU_END
  206. When not set, REO will Not perform a PN sequence number
  207. check
  208. */
  209. #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET 0x00000000
  210. #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_LSB 24
  211. #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_MASK 0x01000000
  212. /* Description RX_MPDU_DESC_INFO_0_SA_IS_VALID
  213. When set, OLE found a valid SA entry for all MSDUs in
  214. this MPDU
  215. <legal all>
  216. */
  217. #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_OFFSET 0x00000000
  218. #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_LSB 25
  219. #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_MASK 0x02000000
  220. /* Description RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT
  221. When set, at least 1 MSDU within the MPDU has an
  222. unsuccessful MAC source address search due to the expiration
  223. of the search timer.
  224. <legal all>
  225. */
  226. #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_OFFSET 0x00000000
  227. #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_LSB 26
  228. #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_MASK 0x04000000
  229. /* Description RX_MPDU_DESC_INFO_0_DA_IS_VALID
  230. When set, OLE found a valid DA entry for all MSDUs in
  231. this MPDU
  232. <legal all>
  233. */
  234. #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_OFFSET 0x00000000
  235. #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_LSB 27
  236. #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_MASK 0x08000000
  237. /* Description RX_MPDU_DESC_INFO_0_DA_IS_MCBC
  238. Field Only valid if da_is_valid is set
  239. When set, at least one of the DA addresses is a
  240. Multicast or Broadcast address.
  241. <legal all>
  242. */
  243. #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_OFFSET 0x00000000
  244. #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_LSB 28
  245. #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_MASK 0x10000000
  246. /* Description RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT
  247. When set, at least 1 MSDU within the MPDU has an
  248. unsuccessful MAC destination address search due to the
  249. expiration of the search timer.
  250. <legal all>
  251. */
  252. #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_OFFSET 0x00000000
  253. #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_LSB 29
  254. #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_MASK 0x20000000
  255. /* Description RX_MPDU_DESC_INFO_0_RAW_MPDU
  256. Field only valid when first_msdu_in_mpdu_flag is set.
  257. When set, the contents in the MSDU buffer contains a
  258. 'RAW' MPDU. This 'RAW' MPDU might be spread out over
  259. multiple MSDU buffers.
  260. <legal all>
  261. */
  262. #define RX_MPDU_DESC_INFO_0_RAW_MPDU_OFFSET 0x00000000
  263. #define RX_MPDU_DESC_INFO_0_RAW_MPDU_LSB 30
  264. #define RX_MPDU_DESC_INFO_0_RAW_MPDU_MASK 0x40000000
  265. /* Description RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG
  266. The More Fragment bit setting from the MPDU header of
  267. the received frame
  268. <legal all>
  269. */
  270. #define RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG_OFFSET 0x00000000
  271. #define RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG_LSB 31
  272. #define RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG_MASK 0x80000000
  273. /* Description RX_MPDU_DESC_INFO_1_PEER_META_DATA
  274. Meta data that SW has programmed in the Peer table entry
  275. of the transmitting STA.
  276. <legal all>
  277. */
  278. #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_OFFSET 0x00000004
  279. #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_LSB 0
  280. #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_MASK 0xffffffff
  281. #endif // _RX_MPDU_DESC_INFO_H_