rx_msdu_desc_info.h 17 KB

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