rx_mpdu_desc_info.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. /*
  2. * Copyright (c) 2016-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. // $ATH_LICENSE_HW_HDR_C$
  19. //
  20. // DO NOT EDIT! This file is automatically generated
  21. // These definitions are tied to a particular hardware layout
  22. #ifndef _RX_MPDU_DESC_INFO_H_
  23. #define _RX_MPDU_DESC_INFO_H_
  24. #if !defined(__ASSEMBLER__)
  25. #endif
  26. // ################ START SUMMARY #################
  27. //
  28. // Dword Fields
  29. // 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], reserved[31]
  30. // 1 peer_meta_data[31:0]
  31. //
  32. // ################ END SUMMARY #################
  33. #define NUM_OF_DWORDS_RX_MPDU_DESC_INFO 2
  34. struct rx_mpdu_desc_info {
  35. uint32_t msdu_count : 8, //[7:0]
  36. mpdu_sequence_number : 12, //[19:8]
  37. fragment_flag : 1, //[20]
  38. mpdu_retry_bit : 1, //[21]
  39. ampdu_flag : 1, //[22]
  40. bar_frame : 1, //[23]
  41. pn_fields_contain_valid_info : 1, //[24]
  42. sa_is_valid : 1, //[25]
  43. sa_idx_timeout : 1, //[26]
  44. da_is_valid : 1, //[27]
  45. da_is_mcbc : 1, //[28]
  46. da_idx_timeout : 1, //[29]
  47. raw_mpdu : 1, //[30]
  48. reserved : 1; //[31]
  49. uint32_t peer_meta_data : 32; //[31:0]
  50. };
  51. /*
  52. msdu_count
  53. Consumer: REO/SW/FW
  54. Producer: RXDMA
  55. The number of MSDUs within the MPDU
  56. <legal all>
  57. mpdu_sequence_number
  58. Consumer: REO/SW/FW
  59. Producer: RXDMA
  60. The field can have two different meanings based on the
  61. setting of field 'BAR_frame':
  62. 'BAR_frame' is NOT set:
  63. The MPDU sequence number of the received frame.
  64. 'BAR_frame' is set.
  65. The MPDU Start sequence number from the BAR frame
  66. <legal all>
  67. fragment_flag
  68. Consumer: REO/SW/FW
  69. Producer: RXDMA
  70. When set, this MPDU is a fragment and REO should forward
  71. this fragment MPDU to the REO destination ring without any
  72. reorder checks, pn checks or bitmap update. This implies
  73. that REO is forwarding the pointer to the MSDU link
  74. descriptor. The destination ring is coming from a
  75. programmable register setting in REO
  76. <legal all>
  77. mpdu_retry_bit
  78. Consumer: REO/SW/FW
  79. Producer: RXDMA
  80. The retry bit setting from the MPDU header of the
  81. received frame
  82. <legal all>
  83. ampdu_flag
  84. Consumer: REO/SW/FW
  85. Producer: RXDMA
  86. When set, the MPDU was received as part of an A-MPDU.
  87. <legal all>
  88. bar_frame
  89. Consumer: REO/SW/FW
  90. Producer: RXDMA
  91. When set, the received frame is a BAR frame. After
  92. processing, this frame shall be pushed to SW or deleted.
  93. <legal all>
  94. pn_fields_contain_valid_info
  95. Consumer: REO/SW/FW
  96. Producer: RXDMA
  97. Copied here by RXDMA from RX_MPDU_END
  98. When not set, REO will Not perform a PN sequence number
  99. check
  100. sa_is_valid
  101. When set, OLE found a valid SA entry for all MSDUs in
  102. this MPDU
  103. <legal all>
  104. sa_idx_timeout
  105. When set, at least 1 MSDU within the MPDU has an
  106. unsuccessful MAC source address search due to the expiration
  107. of the search timer.
  108. <legal all>
  109. da_is_valid
  110. When set, OLE found a valid DA entry for all MSDUs in
  111. this MPDU
  112. <legal all>
  113. da_is_mcbc
  114. Field Only valid if da_is_valid is set
  115. When set, at least one of the DA addresses is a
  116. Multicast or Broadcast address.
  117. <legal all>
  118. da_idx_timeout
  119. When set, at least 1 MSDU within the MPDU has an
  120. unsuccessful MAC destination address search due to the
  121. expiration of the search timer.
  122. <legal all>
  123. raw_mpdu
  124. Field only valid when first_msdu_in_mpdu_flag is set.
  125. When set, the contents in the MSDU buffer contains a
  126. 'RAW' MPDU. This 'RAW' MPDU might be spread out over
  127. multiple MSDU buffers.
  128. <legal all>
  129. reserved
  130. <legal 0>
  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_RESERVED
  266. <legal 0>
  267. */
  268. #define RX_MPDU_DESC_INFO_0_RESERVED_OFFSET 0x00000000
  269. #define RX_MPDU_DESC_INFO_0_RESERVED_LSB 31
  270. #define RX_MPDU_DESC_INFO_0_RESERVED_MASK 0x80000000
  271. /* Description RX_MPDU_DESC_INFO_1_PEER_META_DATA
  272. Meta data that SW has programmed in the Peer table entry
  273. of the transmitting STA.
  274. <legal all>
  275. */
  276. #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_OFFSET 0x00000004
  277. #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_LSB 0
  278. #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_MASK 0xffffffff
  279. #endif // _RX_MPDU_DESC_INFO_H_