rx_msdu_desc_info.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  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_MSDU_DESC_INFO_H_
  23. #define _RX_MSDU_DESC_INFO_H_
  24. #if !defined(__ASSEMBLER__)
  25. #endif
  26. // ################ START SUMMARY #################
  27. //
  28. // Dword Fields
  29. // 0 first_msdu_in_mpdu_flag[0], last_msdu_in_mpdu_flag[1], msdu_continuation[2], msdu_length[16:3], reo_destination_indication[21:17], msdu_drop[22], sa_is_valid[23], sa_idx_timeout[24], da_is_valid[25], da_is_mcbc[26], da_idx_timeout[27], reserved_0a[31:28]
  30. // 1 reserved_1a[31:0]
  31. //
  32. // ################ END SUMMARY #################
  33. #define NUM_OF_DWORDS_RX_MSDU_DESC_INFO 2
  34. struct rx_msdu_desc_info {
  35. uint32_t first_msdu_in_mpdu_flag : 1, //[0]
  36. last_msdu_in_mpdu_flag : 1, //[1]
  37. msdu_continuation : 1, //[2]
  38. msdu_length : 14, //[16:3]
  39. reo_destination_indication : 5, //[21:17]
  40. msdu_drop : 1, //[22]
  41. sa_is_valid : 1, //[23]
  42. sa_idx_timeout : 1, //[24]
  43. da_is_valid : 1, //[25]
  44. da_is_mcbc : 1, //[26]
  45. da_idx_timeout : 1, //[27]
  46. reserved_0a : 4; //[31:28]
  47. uint32_t reserved_1a : 32; //[31:0]
  48. };
  49. /*
  50. first_msdu_in_mpdu_flag
  51. <enum 0 Not_first_msdu> This is not the first MSDU in
  52. the MPDU.
  53. <enum 1 first_msdu> This MSDU is the first one in the
  54. MPDU. <legal all>
  55. last_msdu_in_mpdu_flag
  56. Consumer: WBM/REO/SW/FW
  57. Producer: RXDMA
  58. <enum 0 Not_last_msdu> There are more MSDUs linked to
  59. this MSDU that belongs to this MPDU
  60. <enum 1 Last_msdu> this MSDU is the last one in the
  61. MPDU. This setting is only allowed in combination with
  62. 'Msdu_continuation' set to 0. This implies that when an msdu
  63. is spread out over multiple buffers and thus
  64. msdu_continuation is set, only for the very last buffer of
  65. the msdu, can the 'last_msdu_in_mpdu_flag' be set.
  66. When both first_msdu_in_mpdu_flag and
  67. last_msdu_in_mpdu_flag are set, the MPDU that this MSDU
  68. belongs to only contains a single MSDU.
  69. <legal all>
  70. msdu_continuation
  71. When set, this MSDU buffer was not able to hold the
  72. entire MSDU. The next buffer will therefor contain
  73. additional information related to this MSDU.
  74. <legal all>
  75. msdu_length
  76. Field is only valid in combination with the
  77. 'first_msdu_in_mpdu_flag ' being set. When the
  78. 'first_msdu_in_mpdu_flag ' is not set, this field shall be
  79. 0.
  80. Full MSDU length in bytes after decapsulation.
  81. This field is still valid for MPDU frames without
  82. A-MSDU. It still represents MSDU length after decapsulation
  83. Or in case of RAW MPDUs, it indicates the length of the
  84. entire MPDU (without FCS field)
  85. <legal all>
  86. reo_destination_indication
  87. The ID of the REO exit ring where the MSDU frame shall
  88. push after (MPDU level) reordering has finished.
  89. <enum 0 reo_destination_tcl> Reo will push the frame
  90. into the REO2TCL ring
  91. <enum 1 reo_destination_sw1> Reo will push the frame
  92. into the REO2SW1 ring
  93. <enum 2 reo_destination_sw2> Reo will push the frame
  94. into the REO2SW1 ring
  95. <enum 3 reo_destination_sw3> Reo will push the frame
  96. into the REO2SW1 ring
  97. <enum 4 reo_destination_sw4> Reo will push the frame
  98. into the REO2SW1 ring
  99. <enum 5 reo_destination_release> Reo will push the frame
  100. into the REO_release ring
  101. <enum 6 reo_destination_fw> Reo will push the frame into
  102. the REO2FW ring
  103. <enum 7 reo_destination_7> REO remaps this
  104. <enum 8 reo_destination_8> REO remaps this <enum 9
  105. reo_destination_9> REO remaps this <enum 10
  106. reo_destination_10> REO remaps this
  107. <enum 11 reo_destination_11> REO remaps this
  108. <enum 12 reo_destination_12> REO remaps this <enum 13
  109. reo_destination_13> REO remaps this
  110. <enum 14 reo_destination_14> REO remaps this
  111. <enum 15 reo_destination_15> REO remaps this
  112. <enum 16 reo_destination_16> REO remaps this
  113. <enum 17 reo_destination_17> REO remaps this
  114. <enum 18 reo_destination_18> REO remaps this
  115. <enum 19 reo_destination_19> REO remaps this
  116. <enum 20 reo_destination_20> REO remaps this
  117. <enum 21 reo_destination_21> REO remaps this
  118. <enum 22 reo_destination_22> REO remaps this
  119. <enum 23 reo_destination_23> REO remaps this
  120. <enum 24 reo_destination_24> REO remaps this
  121. <enum 25 reo_destination_25> REO remaps this
  122. <enum 26 reo_destination_26> REO remaps this
  123. <enum 27 reo_destination_27> REO remaps this
  124. <enum 28 reo_destination_28> REO remaps this
  125. <enum 29 reo_destination_29> REO remaps this
  126. <enum 30 reo_destination_30> REO remaps this
  127. <enum 31 reo_destination_31> REO remaps this
  128. <legal all>
  129. msdu_drop
  130. When set, REO shall drop this MSDU and not forward it to
  131. any other ring...
  132. <legal all>
  133. sa_is_valid
  134. Indicates that OLE found a valid SA entry for this MSDU
  135. <legal all>
  136. sa_idx_timeout
  137. Indicates an unsuccessful MAC source address search due
  138. to the expiring of the search timer for this MSDU
  139. <legal all>
  140. da_is_valid
  141. Indicates that OLE found a valid DA entry for this MSDU
  142. <legal all>
  143. da_is_mcbc
  144. Field Only valid if da_is_valid is set
  145. Indicates the DA address was a Multicast of Broadcast
  146. address for this MSDU
  147. <legal all>
  148. da_idx_timeout
  149. Indicates an unsuccessful MAC destination address search
  150. due to the expiring of the search timer for this MSDU
  151. <legal all>
  152. reserved_0a
  153. <legal 0>
  154. reserved_1a
  155. <legal 0>
  156. */
  157. /* Description RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG
  158. <enum 0 Not_first_msdu> This is not the first MSDU in
  159. the MPDU.
  160. <enum 1 first_msdu> This MSDU is the first one in the
  161. MPDU. <legal all>
  162. */
  163. #define RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG_OFFSET 0x00000000
  164. #define RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG_LSB 0
  165. #define RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG_MASK 0x00000001
  166. /* Description RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG
  167. Consumer: WBM/REO/SW/FW
  168. Producer: RXDMA
  169. <enum 0 Not_last_msdu> There are more MSDUs linked to
  170. this MSDU that belongs to this MPDU
  171. <enum 1 Last_msdu> this MSDU is the last one in the
  172. MPDU. This setting is only allowed in combination with
  173. 'Msdu_continuation' set to 0. This implies that when an msdu
  174. is spread out over multiple buffers and thus
  175. msdu_continuation is set, only for the very last buffer of
  176. the msdu, can the 'last_msdu_in_mpdu_flag' be set.
  177. When both first_msdu_in_mpdu_flag and
  178. last_msdu_in_mpdu_flag are set, the MPDU that this MSDU
  179. belongs to only contains a single MSDU.
  180. <legal all>
  181. */
  182. #define RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG_OFFSET 0x00000000
  183. #define RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG_LSB 1
  184. #define RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG_MASK 0x00000002
  185. /* Description RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION
  186. When set, this MSDU buffer was not able to hold the
  187. entire MSDU. The next buffer will therefor contain
  188. additional information related to this MSDU.
  189. <legal all>
  190. */
  191. #define RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION_OFFSET 0x00000000
  192. #define RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION_LSB 2
  193. #define RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION_MASK 0x00000004
  194. /* Description RX_MSDU_DESC_INFO_0_MSDU_LENGTH
  195. Field is only valid in combination with the
  196. 'first_msdu_in_mpdu_flag ' being set. When the
  197. 'first_msdu_in_mpdu_flag ' is not set, this field shall be
  198. 0.
  199. Full MSDU length in bytes after decapsulation.
  200. This field is still valid for MPDU frames without
  201. A-MSDU. It still represents MSDU length after decapsulation
  202. Or in case of RAW MPDUs, it indicates the length of the
  203. entire MPDU (without FCS field)
  204. <legal all>
  205. */
  206. #define RX_MSDU_DESC_INFO_0_MSDU_LENGTH_OFFSET 0x00000000
  207. #define RX_MSDU_DESC_INFO_0_MSDU_LENGTH_LSB 3
  208. #define RX_MSDU_DESC_INFO_0_MSDU_LENGTH_MASK 0x0001fff8
  209. /* Description RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION
  210. The ID of the REO exit ring where the MSDU frame shall
  211. push after (MPDU level) reordering has finished.
  212. <enum 0 reo_destination_tcl> Reo will push the frame
  213. into the REO2TCL ring
  214. <enum 1 reo_destination_sw1> Reo will push the frame
  215. into the REO2SW1 ring
  216. <enum 2 reo_destination_sw2> Reo will push the frame
  217. into the REO2SW1 ring
  218. <enum 3 reo_destination_sw3> Reo will push the frame
  219. into the REO2SW1 ring
  220. <enum 4 reo_destination_sw4> Reo will push the frame
  221. into the REO2SW1 ring
  222. <enum 5 reo_destination_release> Reo will push the frame
  223. into the REO_release ring
  224. <enum 6 reo_destination_fw> Reo will push the frame into
  225. the REO2FW ring
  226. <enum 7 reo_destination_7> REO remaps this
  227. <enum 8 reo_destination_8> REO remaps this <enum 9
  228. reo_destination_9> REO remaps this <enum 10
  229. reo_destination_10> REO remaps this
  230. <enum 11 reo_destination_11> REO remaps this
  231. <enum 12 reo_destination_12> REO remaps this <enum 13
  232. reo_destination_13> REO remaps this
  233. <enum 14 reo_destination_14> REO remaps this
  234. <enum 15 reo_destination_15> REO remaps this
  235. <enum 16 reo_destination_16> REO remaps this
  236. <enum 17 reo_destination_17> REO remaps this
  237. <enum 18 reo_destination_18> REO remaps this
  238. <enum 19 reo_destination_19> REO remaps this
  239. <enum 20 reo_destination_20> REO remaps this
  240. <enum 21 reo_destination_21> REO remaps this
  241. <enum 22 reo_destination_22> REO remaps this
  242. <enum 23 reo_destination_23> REO remaps this
  243. <enum 24 reo_destination_24> REO remaps this
  244. <enum 25 reo_destination_25> REO remaps this
  245. <enum 26 reo_destination_26> REO remaps this
  246. <enum 27 reo_destination_27> REO remaps this
  247. <enum 28 reo_destination_28> REO remaps this
  248. <enum 29 reo_destination_29> REO remaps this
  249. <enum 30 reo_destination_30> REO remaps this
  250. <enum 31 reo_destination_31> REO remaps this
  251. <legal all>
  252. */
  253. #define RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION_OFFSET 0x00000000
  254. #define RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION_LSB 17
  255. #define RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION_MASK 0x003e0000
  256. /* Description RX_MSDU_DESC_INFO_0_MSDU_DROP
  257. When set, REO shall drop this MSDU and not forward it to
  258. any other ring...
  259. <legal all>
  260. */
  261. #define RX_MSDU_DESC_INFO_0_MSDU_DROP_OFFSET 0x00000000
  262. #define RX_MSDU_DESC_INFO_0_MSDU_DROP_LSB 22
  263. #define RX_MSDU_DESC_INFO_0_MSDU_DROP_MASK 0x00400000
  264. /* Description RX_MSDU_DESC_INFO_0_SA_IS_VALID
  265. Indicates that OLE found a valid SA entry for this MSDU
  266. <legal all>
  267. */
  268. #define RX_MSDU_DESC_INFO_0_SA_IS_VALID_OFFSET 0x00000000
  269. #define RX_MSDU_DESC_INFO_0_SA_IS_VALID_LSB 23
  270. #define RX_MSDU_DESC_INFO_0_SA_IS_VALID_MASK 0x00800000
  271. /* Description RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT
  272. Indicates an unsuccessful MAC source address search due
  273. to the expiring of the search timer for this MSDU
  274. <legal all>
  275. */
  276. #define RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT_OFFSET 0x00000000
  277. #define RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT_LSB 24
  278. #define RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT_MASK 0x01000000
  279. /* Description RX_MSDU_DESC_INFO_0_DA_IS_VALID
  280. Indicates that OLE found a valid DA entry for this MSDU
  281. <legal all>
  282. */
  283. #define RX_MSDU_DESC_INFO_0_DA_IS_VALID_OFFSET 0x00000000
  284. #define RX_MSDU_DESC_INFO_0_DA_IS_VALID_LSB 25
  285. #define RX_MSDU_DESC_INFO_0_DA_IS_VALID_MASK 0x02000000
  286. /* Description RX_MSDU_DESC_INFO_0_DA_IS_MCBC
  287. Field Only valid if da_is_valid is set
  288. Indicates the DA address was a Multicast of Broadcast
  289. address for this MSDU
  290. <legal all>
  291. */
  292. #define RX_MSDU_DESC_INFO_0_DA_IS_MCBC_OFFSET 0x00000000
  293. #define RX_MSDU_DESC_INFO_0_DA_IS_MCBC_LSB 26
  294. #define RX_MSDU_DESC_INFO_0_DA_IS_MCBC_MASK 0x04000000
  295. /* Description RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT
  296. Indicates an unsuccessful MAC destination address search
  297. due to the expiring of the search timer for this MSDU
  298. <legal all>
  299. */
  300. #define RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_OFFSET 0x00000000
  301. #define RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_LSB 27
  302. #define RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_MASK 0x08000000
  303. /* Description RX_MSDU_DESC_INFO_0_RESERVED_0A
  304. <legal 0>
  305. */
  306. #define RX_MSDU_DESC_INFO_0_RESERVED_0A_OFFSET 0x00000000
  307. #define RX_MSDU_DESC_INFO_0_RESERVED_0A_LSB 28
  308. #define RX_MSDU_DESC_INFO_0_RESERVED_0A_MASK 0xf0000000
  309. /* Description RX_MSDU_DESC_INFO_1_RESERVED_1A
  310. <legal 0>
  311. */
  312. #define RX_MSDU_DESC_INFO_1_RESERVED_1A_OFFSET 0x00000004
  313. #define RX_MSDU_DESC_INFO_1_RESERVED_1A_LSB 0
  314. #define RX_MSDU_DESC_INFO_1_RESERVED_1A_MASK 0xffffffff
  315. #endif // _RX_MSDU_DESC_INFO_H_