rx_msdu_desc_info.h 17 KB

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