rx_attention.h 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873
  1. /*
  2. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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. #ifndef _RX_ATTENTION_H_
  17. #define _RX_ATTENTION_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_RX_ATTENTION 4
  21. #define NUM_OF_QWORDS_RX_ATTENTION 2
  22. struct rx_attention {
  23. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  24. uint32_t rxpcu_mpdu_filter_in_category : 2, // [1:0]
  25. sw_frame_group_id : 7, // [8:2]
  26. reserved_0 : 7, // [15:9]
  27. phy_ppdu_id : 16; // [31:16]
  28. uint32_t first_mpdu : 1, // [0:0]
  29. reserved_1a : 1, // [1:1]
  30. mcast_bcast : 1, // [2:2]
  31. ast_index_not_found : 1, // [3:3]
  32. ast_index_timeout : 1, // [4:4]
  33. power_mgmt : 1, // [5:5]
  34. non_qos : 1, // [6:6]
  35. null_data : 1, // [7:7]
  36. mgmt_type : 1, // [8:8]
  37. ctrl_type : 1, // [9:9]
  38. more_data : 1, // [10:10]
  39. eosp : 1, // [11:11]
  40. a_msdu_error : 1, // [12:12]
  41. fragment_flag : 1, // [13:13]
  42. order : 1, // [14:14]
  43. cce_match : 1, // [15:15]
  44. overflow_err : 1, // [16:16]
  45. msdu_length_err : 1, // [17:17]
  46. tcp_udp_chksum_fail : 1, // [18:18]
  47. ip_chksum_fail : 1, // [19:19]
  48. sa_idx_invalid : 1, // [20:20]
  49. da_idx_invalid : 1, // [21:21]
  50. reserved_1b : 1, // [22:22]
  51. rx_in_tx_decrypt_byp : 1, // [23:23]
  52. encrypt_required : 1, // [24:24]
  53. directed : 1, // [25:25]
  54. buffer_fragment : 1, // [26:26]
  55. mpdu_length_err : 1, // [27:27]
  56. tkip_mic_err : 1, // [28:28]
  57. decrypt_err : 1, // [29:29]
  58. unencrypted_frame_err : 1, // [30:30]
  59. fcs_err : 1; // [31:31]
  60. uint32_t flow_idx_timeout : 1, // [0:0]
  61. flow_idx_invalid : 1, // [1:1]
  62. wifi_parser_error : 1, // [2:2]
  63. amsdu_parser_error : 1, // [3:3]
  64. sa_idx_timeout : 1, // [4:4]
  65. da_idx_timeout : 1, // [5:5]
  66. msdu_limit_error : 1, // [6:6]
  67. da_is_valid : 1, // [7:7]
  68. da_is_mcbc : 1, // [8:8]
  69. sa_is_valid : 1, // [9:9]
  70. decrypt_status_code : 3, // [12:10]
  71. rx_bitmap_not_updated : 1, // [13:13]
  72. reserved_2 : 17, // [30:14]
  73. msdu_done : 1; // [31:31]
  74. uint32_t tlv64_padding : 32; // [31:0]
  75. #else
  76. uint32_t phy_ppdu_id : 16, // [31:16]
  77. reserved_0 : 7, // [15:9]
  78. sw_frame_group_id : 7, // [8:2]
  79. rxpcu_mpdu_filter_in_category : 2; // [1:0]
  80. uint32_t fcs_err : 1, // [31:31]
  81. unencrypted_frame_err : 1, // [30:30]
  82. decrypt_err : 1, // [29:29]
  83. tkip_mic_err : 1, // [28:28]
  84. mpdu_length_err : 1, // [27:27]
  85. buffer_fragment : 1, // [26:26]
  86. directed : 1, // [25:25]
  87. encrypt_required : 1, // [24:24]
  88. rx_in_tx_decrypt_byp : 1, // [23:23]
  89. reserved_1b : 1, // [22:22]
  90. da_idx_invalid : 1, // [21:21]
  91. sa_idx_invalid : 1, // [20:20]
  92. ip_chksum_fail : 1, // [19:19]
  93. tcp_udp_chksum_fail : 1, // [18:18]
  94. msdu_length_err : 1, // [17:17]
  95. overflow_err : 1, // [16:16]
  96. cce_match : 1, // [15:15]
  97. order : 1, // [14:14]
  98. fragment_flag : 1, // [13:13]
  99. a_msdu_error : 1, // [12:12]
  100. eosp : 1, // [11:11]
  101. more_data : 1, // [10:10]
  102. ctrl_type : 1, // [9:9]
  103. mgmt_type : 1, // [8:8]
  104. null_data : 1, // [7:7]
  105. non_qos : 1, // [6:6]
  106. power_mgmt : 1, // [5:5]
  107. ast_index_timeout : 1, // [4:4]
  108. ast_index_not_found : 1, // [3:3]
  109. mcast_bcast : 1, // [2:2]
  110. reserved_1a : 1, // [1:1]
  111. first_mpdu : 1; // [0:0]
  112. uint32_t msdu_done : 1, // [31:31]
  113. reserved_2 : 17, // [30:14]
  114. rx_bitmap_not_updated : 1, // [13:13]
  115. decrypt_status_code : 3, // [12:10]
  116. sa_is_valid : 1, // [9:9]
  117. da_is_mcbc : 1, // [8:8]
  118. da_is_valid : 1, // [7:7]
  119. msdu_limit_error : 1, // [6:6]
  120. da_idx_timeout : 1, // [5:5]
  121. sa_idx_timeout : 1, // [4:4]
  122. amsdu_parser_error : 1, // [3:3]
  123. wifi_parser_error : 1, // [2:2]
  124. flow_idx_invalid : 1, // [1:1]
  125. flow_idx_timeout : 1; // [0:0]
  126. uint32_t tlv64_padding : 32; // [31:0]
  127. #endif
  128. };
  129. /* Description RXPCU_MPDU_FILTER_IN_CATEGORY
  130. Field indicates what the reason was that this MPDU frame
  131. was allowed to come into the receive path by RXPCU
  132. <enum 0 rxpcu_filter_pass> This MPDU passed the normal frame
  133. filter programming of rxpcu
  134. <enum 1 rxpcu_monitor_client> This MPDU did NOT pass the
  135. regular frame filter and would have been dropped, were
  136. it not for the frame fitting into the 'monitor_client' category.
  137. <enum 2 rxpcu_monitor_other> This MPDU did NOT pass the
  138. regular frame filter and also did not pass the rxpcu_monitor_client
  139. filter. It would have been dropped accept that it did pass
  140. the 'monitor_other' category.
  141. <enum 3 rxpcu_filter_pass_monitor_ovrd> This MPDU passed
  142. the normal frame filter programming of RXPCU but additionally
  143. fit into the 'monitor_override_client' category.
  144. <legal 0-3>
  145. */
  146. #define RX_ATTENTION_RXPCU_MPDU_FILTER_IN_CATEGORY_OFFSET 0x0000000000000000
  147. #define RX_ATTENTION_RXPCU_MPDU_FILTER_IN_CATEGORY_LSB 0
  148. #define RX_ATTENTION_RXPCU_MPDU_FILTER_IN_CATEGORY_MSB 1
  149. #define RX_ATTENTION_RXPCU_MPDU_FILTER_IN_CATEGORY_MASK 0x0000000000000003
  150. /* Description SW_FRAME_GROUP_ID
  151. SW processes frames based on certain classifications. This
  152. field indicates to what sw classification this MPDU is
  153. mapped.
  154. The classification is given in priority order
  155. <enum 0 sw_frame_group_NDP_frame>
  156. <enum 1 sw_frame_group_Multicast_data>
  157. <enum 2 sw_frame_group_Unicast_data>
  158. <enum 3 sw_frame_group_Null_data > This includes mpdus of
  159. type Data Null.
  160. <enum 38 sw_frame_group_QoS_Null_data> This includes QoS
  161. Null frames except in UL MU or TB PPDUs.
  162. <enum 39 sw_frame_group_QoS_Null_data_TB> This includes
  163. QoS Null frames in UL MU or TB PPDUs.
  164. <enum 4 sw_frame_group_mgmt_0000 >
  165. <enum 5 sw_frame_group_mgmt_0001 >
  166. <enum 6 sw_frame_group_mgmt_0010 >
  167. <enum 7 sw_frame_group_mgmt_0011 >
  168. <enum 8 sw_frame_group_mgmt_0100 >
  169. <enum 9 sw_frame_group_mgmt_0101 >
  170. <enum 10 sw_frame_group_mgmt_0110 >
  171. <enum 11 sw_frame_group_mgmt_0111 >
  172. <enum 12 sw_frame_group_mgmt_1000 >
  173. <enum 13 sw_frame_group_mgmt_1001 >
  174. <enum 14 sw_frame_group_mgmt_1010 >
  175. <enum 15 sw_frame_group_mgmt_1011 >
  176. <enum 16 sw_frame_group_mgmt_1100 >
  177. <enum 17 sw_frame_group_mgmt_1101 >
  178. <enum 18 sw_frame_group_mgmt_1110 >
  179. <enum 19 sw_frame_group_mgmt_1111 >
  180. <enum 20 sw_frame_group_ctrl_0000 >
  181. <enum 21 sw_frame_group_ctrl_0001 >
  182. <enum 22 sw_frame_group_ctrl_0010 >
  183. <enum 23 sw_frame_group_ctrl_0011 >
  184. <enum 24 sw_frame_group_ctrl_0100 >
  185. <enum 25 sw_frame_group_ctrl_0101 >
  186. <enum 26 sw_frame_group_ctrl_0110 >
  187. <enum 27 sw_frame_group_ctrl_0111 >
  188. <enum 28 sw_frame_group_ctrl_1000 >
  189. <enum 29 sw_frame_group_ctrl_1001 >
  190. <enum 30 sw_frame_group_ctrl_1010 >
  191. <enum 31 sw_frame_group_ctrl_1011 >
  192. <enum 32 sw_frame_group_ctrl_1100 >
  193. <enum 33 sw_frame_group_ctrl_1101 >
  194. <enum 34 sw_frame_group_ctrl_1110 >
  195. <enum 35 sw_frame_group_ctrl_1111 >
  196. <enum 36 sw_frame_group_unsupported> This covers type 3
  197. and protocol version != 0
  198. <enum 37 sw_frame_group_phy_error> PHY reported an error
  199. <legal 0-39>
  200. */
  201. #define RX_ATTENTION_SW_FRAME_GROUP_ID_OFFSET 0x0000000000000000
  202. #define RX_ATTENTION_SW_FRAME_GROUP_ID_LSB 2
  203. #define RX_ATTENTION_SW_FRAME_GROUP_ID_MSB 8
  204. #define RX_ATTENTION_SW_FRAME_GROUP_ID_MASK 0x00000000000001fc
  205. /* Description RESERVED_0
  206. <legal 0>
  207. */
  208. #define RX_ATTENTION_RESERVED_0_OFFSET 0x0000000000000000
  209. #define RX_ATTENTION_RESERVED_0_LSB 9
  210. #define RX_ATTENTION_RESERVED_0_MSB 15
  211. #define RX_ATTENTION_RESERVED_0_MASK 0x000000000000fe00
  212. /* Description PHY_PPDU_ID
  213. A ppdu counter value that PHY increments for every PPDU
  214. received. The counter value wraps around
  215. <legal all>
  216. */
  217. #define RX_ATTENTION_PHY_PPDU_ID_OFFSET 0x0000000000000000
  218. #define RX_ATTENTION_PHY_PPDU_ID_LSB 16
  219. #define RX_ATTENTION_PHY_PPDU_ID_MSB 31
  220. #define RX_ATTENTION_PHY_PPDU_ID_MASK 0x00000000ffff0000
  221. /* Description FIRST_MPDU
  222. Indicates the first MSDU of the PPDU. If both first_mpdu
  223. and last_mpdu are set in the MSDU then this is a not an
  224. A-MPDU frame but a stand alone MPDU. Interior MPDU in
  225. an A-MPDU shall have both first_mpdu and last_mpdu bits
  226. set to 0. The PPDU start status will only be valid when
  227. this bit is set.
  228. */
  229. #define RX_ATTENTION_FIRST_MPDU_OFFSET 0x0000000000000000
  230. #define RX_ATTENTION_FIRST_MPDU_LSB 32
  231. #define RX_ATTENTION_FIRST_MPDU_MSB 32
  232. #define RX_ATTENTION_FIRST_MPDU_MASK 0x0000000100000000
  233. /* Description RESERVED_1A
  234. <legal 0>
  235. */
  236. #define RX_ATTENTION_RESERVED_1A_OFFSET 0x0000000000000000
  237. #define RX_ATTENTION_RESERVED_1A_LSB 33
  238. #define RX_ATTENTION_RESERVED_1A_MSB 33
  239. #define RX_ATTENTION_RESERVED_1A_MASK 0x0000000200000000
  240. /* Description MCAST_BCAST
  241. Multicast / broadcast indicator. Only set when the MAC
  242. address 1 bit 0 is set indicating mcast/bcast and the BSSID
  243. matches one of the 4 BSSID registers. Only set when first_msdu
  244. is set.
  245. */
  246. #define RX_ATTENTION_MCAST_BCAST_OFFSET 0x0000000000000000
  247. #define RX_ATTENTION_MCAST_BCAST_LSB 34
  248. #define RX_ATTENTION_MCAST_BCAST_MSB 34
  249. #define RX_ATTENTION_MCAST_BCAST_MASK 0x0000000400000000
  250. /* Description AST_INDEX_NOT_FOUND
  251. Only valid when first_msdu is set.
  252. Indicates no AST matching entries within the the max search
  253. count.
  254. */
  255. #define RX_ATTENTION_AST_INDEX_NOT_FOUND_OFFSET 0x0000000000000000
  256. #define RX_ATTENTION_AST_INDEX_NOT_FOUND_LSB 35
  257. #define RX_ATTENTION_AST_INDEX_NOT_FOUND_MSB 35
  258. #define RX_ATTENTION_AST_INDEX_NOT_FOUND_MASK 0x0000000800000000
  259. /* Description AST_INDEX_TIMEOUT
  260. Only valid when first_msdu is set.
  261. Indicates an unsuccessful search in the address seach table
  262. due to timeout.
  263. */
  264. #define RX_ATTENTION_AST_INDEX_TIMEOUT_OFFSET 0x0000000000000000
  265. #define RX_ATTENTION_AST_INDEX_TIMEOUT_LSB 36
  266. #define RX_ATTENTION_AST_INDEX_TIMEOUT_MSB 36
  267. #define RX_ATTENTION_AST_INDEX_TIMEOUT_MASK 0x0000001000000000
  268. /* Description POWER_MGMT
  269. Power management bit set in the 802.11 header. Only set
  270. when first_msdu is set.
  271. */
  272. #define RX_ATTENTION_POWER_MGMT_OFFSET 0x0000000000000000
  273. #define RX_ATTENTION_POWER_MGMT_LSB 37
  274. #define RX_ATTENTION_POWER_MGMT_MSB 37
  275. #define RX_ATTENTION_POWER_MGMT_MASK 0x0000002000000000
  276. /* Description NON_QOS
  277. Set if packet is not a non-QoS data frame. Only set when
  278. first_msdu is set.
  279. */
  280. #define RX_ATTENTION_NON_QOS_OFFSET 0x0000000000000000
  281. #define RX_ATTENTION_NON_QOS_LSB 38
  282. #define RX_ATTENTION_NON_QOS_MSB 38
  283. #define RX_ATTENTION_NON_QOS_MASK 0x0000004000000000
  284. /* Description NULL_DATA
  285. Set if frame type indicates either null data or QoS null
  286. data format. Only set when first_msdu is set.
  287. */
  288. #define RX_ATTENTION_NULL_DATA_OFFSET 0x0000000000000000
  289. #define RX_ATTENTION_NULL_DATA_LSB 39
  290. #define RX_ATTENTION_NULL_DATA_MSB 39
  291. #define RX_ATTENTION_NULL_DATA_MASK 0x0000008000000000
  292. /* Description MGMT_TYPE
  293. Set if packet is a management packet. Only set when first_msdu
  294. is set.
  295. */
  296. #define RX_ATTENTION_MGMT_TYPE_OFFSET 0x0000000000000000
  297. #define RX_ATTENTION_MGMT_TYPE_LSB 40
  298. #define RX_ATTENTION_MGMT_TYPE_MSB 40
  299. #define RX_ATTENTION_MGMT_TYPE_MASK 0x0000010000000000
  300. /* Description CTRL_TYPE
  301. Set if packet is a control packet. Only set when first_msdu
  302. is set.
  303. */
  304. #define RX_ATTENTION_CTRL_TYPE_OFFSET 0x0000000000000000
  305. #define RX_ATTENTION_CTRL_TYPE_LSB 41
  306. #define RX_ATTENTION_CTRL_TYPE_MSB 41
  307. #define RX_ATTENTION_CTRL_TYPE_MASK 0x0000020000000000
  308. /* Description MORE_DATA
  309. Set if more bit in frame control is set. Only set when
  310. first_msdu is set.
  311. */
  312. #define RX_ATTENTION_MORE_DATA_OFFSET 0x0000000000000000
  313. #define RX_ATTENTION_MORE_DATA_LSB 42
  314. #define RX_ATTENTION_MORE_DATA_MSB 42
  315. #define RX_ATTENTION_MORE_DATA_MASK 0x0000040000000000
  316. /* Description EOSP
  317. Set if the EOSP (end of service period) bit in the QoS control
  318. field is set. Only set when first_msdu is set.
  319. */
  320. #define RX_ATTENTION_EOSP_OFFSET 0x0000000000000000
  321. #define RX_ATTENTION_EOSP_LSB 43
  322. #define RX_ATTENTION_EOSP_MSB 43
  323. #define RX_ATTENTION_EOSP_MASK 0x0000080000000000
  324. /* Description A_MSDU_ERROR
  325. Set if number of MSDUs in A-MSDU is above a threshold or
  326. if the size of the MSDU is invalid. This receive buffer
  327. will contain all of the remainder of the MSDUs in this
  328. MPDU without decapsulation.
  329. */
  330. #define RX_ATTENTION_A_MSDU_ERROR_OFFSET 0x0000000000000000
  331. #define RX_ATTENTION_A_MSDU_ERROR_LSB 44
  332. #define RX_ATTENTION_A_MSDU_ERROR_MSB 44
  333. #define RX_ATTENTION_A_MSDU_ERROR_MASK 0x0000100000000000
  334. /* Description FRAGMENT_FLAG
  335. Indicates that this is an 802.11 fragment frame. This is
  336. set when either the more_frag bit is set in the frame control
  337. or the fragment number is not zero. Only set when first_msdu
  338. is set.
  339. */
  340. #define RX_ATTENTION_FRAGMENT_FLAG_OFFSET 0x0000000000000000
  341. #define RX_ATTENTION_FRAGMENT_FLAG_LSB 45
  342. #define RX_ATTENTION_FRAGMENT_FLAG_MSB 45
  343. #define RX_ATTENTION_FRAGMENT_FLAG_MASK 0x0000200000000000
  344. /* Description ORDER
  345. Set if the order bit in the frame control is set. Only
  346. set when first_msdu is set.
  347. */
  348. #define RX_ATTENTION_ORDER_OFFSET 0x0000000000000000
  349. #define RX_ATTENTION_ORDER_LSB 46
  350. #define RX_ATTENTION_ORDER_MSB 46
  351. #define RX_ATTENTION_ORDER_MASK 0x0000400000000000
  352. /* Description CCE_MATCH
  353. Indicates that this status has a corresponding MSDU that
  354. requires FW processing. The OLE will have classification
  355. ring mask registers which will indicate the ring(s) for
  356. packets and descriptors which need FW attention.
  357. */
  358. #define RX_ATTENTION_CCE_MATCH_OFFSET 0x0000000000000000
  359. #define RX_ATTENTION_CCE_MATCH_LSB 47
  360. #define RX_ATTENTION_CCE_MATCH_MSB 47
  361. #define RX_ATTENTION_CCE_MATCH_MASK 0x0000800000000000
  362. /* Description OVERFLOW_ERR
  363. RXPCU Receive FIFO ran out of space to receive the full
  364. MPDU. Therefor this MPDU is terminated early and is thus
  365. corrupted.
  366. This MPDU will not be ACKed.
  367. RXPCU might still be able to correctly receive the following
  368. MPDUs in the PPDU if enough fifo space became available
  369. in time
  370. */
  371. #define RX_ATTENTION_OVERFLOW_ERR_OFFSET 0x0000000000000000
  372. #define RX_ATTENTION_OVERFLOW_ERR_LSB 48
  373. #define RX_ATTENTION_OVERFLOW_ERR_MSB 48
  374. #define RX_ATTENTION_OVERFLOW_ERR_MASK 0x0001000000000000
  375. /* Description MSDU_LENGTH_ERR
  376. Indicates that the MSDU length from the 802.3 encapsulated
  377. length field extends beyond the MPDU boundary or if the
  378. length is less than 14 bytes.
  379. Merged with original "other_msdu_err": Indicates that the
  380. MSDU threshold was exceeded and thus all the rest of the
  381. MSDUs will not be scattered and will not be decasulated
  382. but will be DMA'ed in RAW format as a single MSDU buffer
  383. */
  384. #define RX_ATTENTION_MSDU_LENGTH_ERR_OFFSET 0x0000000000000000
  385. #define RX_ATTENTION_MSDU_LENGTH_ERR_LSB 49
  386. #define RX_ATTENTION_MSDU_LENGTH_ERR_MSB 49
  387. #define RX_ATTENTION_MSDU_LENGTH_ERR_MASK 0x0002000000000000
  388. /* Description TCP_UDP_CHKSUM_FAIL
  389. Indicates that the computed checksum (tcp_udp_chksum in 'RX_MSDU_END')
  390. did not match the checksum in the TCP/UDP header.
  391. */
  392. #define RX_ATTENTION_TCP_UDP_CHKSUM_FAIL_OFFSET 0x0000000000000000
  393. #define RX_ATTENTION_TCP_UDP_CHKSUM_FAIL_LSB 50
  394. #define RX_ATTENTION_TCP_UDP_CHKSUM_FAIL_MSB 50
  395. #define RX_ATTENTION_TCP_UDP_CHKSUM_FAIL_MASK 0x0004000000000000
  396. /* Description IP_CHKSUM_FAIL
  397. Indicates that the computed checksum (ip_hdr_chksum in 'RX_MSDU_END')
  398. did not match the checksum in the IP header.
  399. */
  400. #define RX_ATTENTION_IP_CHKSUM_FAIL_OFFSET 0x0000000000000000
  401. #define RX_ATTENTION_IP_CHKSUM_FAIL_LSB 51
  402. #define RX_ATTENTION_IP_CHKSUM_FAIL_MSB 51
  403. #define RX_ATTENTION_IP_CHKSUM_FAIL_MASK 0x0008000000000000
  404. /* Description SA_IDX_INVALID
  405. Indicates no matching entry was found in the address search
  406. table for the source MAC address.
  407. */
  408. #define RX_ATTENTION_SA_IDX_INVALID_OFFSET 0x0000000000000000
  409. #define RX_ATTENTION_SA_IDX_INVALID_LSB 52
  410. #define RX_ATTENTION_SA_IDX_INVALID_MSB 52
  411. #define RX_ATTENTION_SA_IDX_INVALID_MASK 0x0010000000000000
  412. /* Description DA_IDX_INVALID
  413. Indicates no matching entry was found in the address search
  414. table for the destination MAC address.
  415. */
  416. #define RX_ATTENTION_DA_IDX_INVALID_OFFSET 0x0000000000000000
  417. #define RX_ATTENTION_DA_IDX_INVALID_LSB 53
  418. #define RX_ATTENTION_DA_IDX_INVALID_MSB 53
  419. #define RX_ATTENTION_DA_IDX_INVALID_MASK 0x0020000000000000
  420. /* Description RESERVED_1B
  421. <legal 0>
  422. */
  423. #define RX_ATTENTION_RESERVED_1B_OFFSET 0x0000000000000000
  424. #define RX_ATTENTION_RESERVED_1B_LSB 54
  425. #define RX_ATTENTION_RESERVED_1B_MSB 54
  426. #define RX_ATTENTION_RESERVED_1B_MASK 0x0040000000000000
  427. /* Description RX_IN_TX_DECRYPT_BYP
  428. Indicates that RX packet is not decrypted as Crypto is busy
  429. with TX packet processing.
  430. */
  431. #define RX_ATTENTION_RX_IN_TX_DECRYPT_BYP_OFFSET 0x0000000000000000
  432. #define RX_ATTENTION_RX_IN_TX_DECRYPT_BYP_LSB 55
  433. #define RX_ATTENTION_RX_IN_TX_DECRYPT_BYP_MSB 55
  434. #define RX_ATTENTION_RX_IN_TX_DECRYPT_BYP_MASK 0x0080000000000000
  435. /* Description ENCRYPT_REQUIRED
  436. Indicates that this data type frame is not encrypted even
  437. if the policy for this MPDU requires encryption as indicated
  438. in the peer entry key type.
  439. */
  440. #define RX_ATTENTION_ENCRYPT_REQUIRED_OFFSET 0x0000000000000000
  441. #define RX_ATTENTION_ENCRYPT_REQUIRED_LSB 56
  442. #define RX_ATTENTION_ENCRYPT_REQUIRED_MSB 56
  443. #define RX_ATTENTION_ENCRYPT_REQUIRED_MASK 0x0100000000000000
  444. /* Description DIRECTED
  445. MPDU is a directed packet which means that the RA matched
  446. our STA addresses. In proxySTA it means that the TA matched
  447. an entry in our address search table with the corresponding
  448. "no_ack" bit is the address search entry cleared.
  449. */
  450. #define RX_ATTENTION_DIRECTED_OFFSET 0x0000000000000000
  451. #define RX_ATTENTION_DIRECTED_LSB 57
  452. #define RX_ATTENTION_DIRECTED_MSB 57
  453. #define RX_ATTENTION_DIRECTED_MASK 0x0200000000000000
  454. /* Description BUFFER_FRAGMENT
  455. Indicates that at least one of the rx buffers has been fragmented.
  456. If set the FW should look at the rx_frag_info descriptor
  457. described below.
  458. */
  459. #define RX_ATTENTION_BUFFER_FRAGMENT_OFFSET 0x0000000000000000
  460. #define RX_ATTENTION_BUFFER_FRAGMENT_LSB 58
  461. #define RX_ATTENTION_BUFFER_FRAGMENT_MSB 58
  462. #define RX_ATTENTION_BUFFER_FRAGMENT_MASK 0x0400000000000000
  463. /* Description MPDU_LENGTH_ERR
  464. Indicates that the MPDU was pre-maturely terminated resulting
  465. in a truncated MPDU. Don't trust the MPDU length field.
  466. */
  467. #define RX_ATTENTION_MPDU_LENGTH_ERR_OFFSET 0x0000000000000000
  468. #define RX_ATTENTION_MPDU_LENGTH_ERR_LSB 59
  469. #define RX_ATTENTION_MPDU_LENGTH_ERR_MSB 59
  470. #define RX_ATTENTION_MPDU_LENGTH_ERR_MASK 0x0800000000000000
  471. /* Description TKIP_MIC_ERR
  472. Indicates that the MPDU Michael integrity check failed
  473. */
  474. #define RX_ATTENTION_TKIP_MIC_ERR_OFFSET 0x0000000000000000
  475. #define RX_ATTENTION_TKIP_MIC_ERR_LSB 60
  476. #define RX_ATTENTION_TKIP_MIC_ERR_MSB 60
  477. #define RX_ATTENTION_TKIP_MIC_ERR_MASK 0x1000000000000000
  478. /* Description DECRYPT_ERR
  479. Indicates that the MPDU decrypt integrity check failed or
  480. CRYPTO received an encrypted frame, but did not get a valid
  481. corresponding key id in the peer entry.
  482. */
  483. #define RX_ATTENTION_DECRYPT_ERR_OFFSET 0x0000000000000000
  484. #define RX_ATTENTION_DECRYPT_ERR_LSB 61
  485. #define RX_ATTENTION_DECRYPT_ERR_MSB 61
  486. #define RX_ATTENTION_DECRYPT_ERR_MASK 0x2000000000000000
  487. /* Description UNENCRYPTED_FRAME_ERR
  488. Copied here by RX OLE from the RX_MPDU_END TLV
  489. */
  490. #define RX_ATTENTION_UNENCRYPTED_FRAME_ERR_OFFSET 0x0000000000000000
  491. #define RX_ATTENTION_UNENCRYPTED_FRAME_ERR_LSB 62
  492. #define RX_ATTENTION_UNENCRYPTED_FRAME_ERR_MSB 62
  493. #define RX_ATTENTION_UNENCRYPTED_FRAME_ERR_MASK 0x4000000000000000
  494. /* Description FCS_ERR
  495. Indicates that the MPDU FCS check failed
  496. */
  497. #define RX_ATTENTION_FCS_ERR_OFFSET 0x0000000000000000
  498. #define RX_ATTENTION_FCS_ERR_LSB 63
  499. #define RX_ATTENTION_FCS_ERR_MSB 63
  500. #define RX_ATTENTION_FCS_ERR_MASK 0x8000000000000000
  501. /* Description FLOW_IDX_TIMEOUT
  502. Indicates an unsuccessful flow search due to the expiring
  503. of the search timer.
  504. <legal all>
  505. */
  506. #define RX_ATTENTION_FLOW_IDX_TIMEOUT_OFFSET 0x0000000000000008
  507. #define RX_ATTENTION_FLOW_IDX_TIMEOUT_LSB 0
  508. #define RX_ATTENTION_FLOW_IDX_TIMEOUT_MSB 0
  509. #define RX_ATTENTION_FLOW_IDX_TIMEOUT_MASK 0x0000000000000001
  510. /* Description FLOW_IDX_INVALID
  511. flow id is not valid
  512. <legal all>
  513. */
  514. #define RX_ATTENTION_FLOW_IDX_INVALID_OFFSET 0x0000000000000008
  515. #define RX_ATTENTION_FLOW_IDX_INVALID_LSB 1
  516. #define RX_ATTENTION_FLOW_IDX_INVALID_MSB 1
  517. #define RX_ATTENTION_FLOW_IDX_INVALID_MASK 0x0000000000000002
  518. /* Description WIFI_PARSER_ERROR
  519. Indicates that the WiFi frame has one of the following errors
  520. o has less than minimum allowed bytes as per standard
  521. o has incomplete VLAN LLC/SNAP (only for non A-MSDUs)
  522. <legal all>
  523. */
  524. #define RX_ATTENTION_WIFI_PARSER_ERROR_OFFSET 0x0000000000000008
  525. #define RX_ATTENTION_WIFI_PARSER_ERROR_LSB 2
  526. #define RX_ATTENTION_WIFI_PARSER_ERROR_MSB 2
  527. #define RX_ATTENTION_WIFI_PARSER_ERROR_MASK 0x0000000000000004
  528. /* Description AMSDU_PARSER_ERROR
  529. A-MSDU could not be properly de-agregated.
  530. <legal all>
  531. */
  532. #define RX_ATTENTION_AMSDU_PARSER_ERROR_OFFSET 0x0000000000000008
  533. #define RX_ATTENTION_AMSDU_PARSER_ERROR_LSB 3
  534. #define RX_ATTENTION_AMSDU_PARSER_ERROR_MSB 3
  535. #define RX_ATTENTION_AMSDU_PARSER_ERROR_MASK 0x0000000000000008
  536. /* Description SA_IDX_TIMEOUT
  537. Indicates an unsuccessful MAC source address search due
  538. to the expiring of the search timer.
  539. */
  540. #define RX_ATTENTION_SA_IDX_TIMEOUT_OFFSET 0x0000000000000008
  541. #define RX_ATTENTION_SA_IDX_TIMEOUT_LSB 4
  542. #define RX_ATTENTION_SA_IDX_TIMEOUT_MSB 4
  543. #define RX_ATTENTION_SA_IDX_TIMEOUT_MASK 0x0000000000000010
  544. /* Description DA_IDX_TIMEOUT
  545. Indicates an unsuccessful MAC destination address search
  546. due to the expiring of the search timer.
  547. */
  548. #define RX_ATTENTION_DA_IDX_TIMEOUT_OFFSET 0x0000000000000008
  549. #define RX_ATTENTION_DA_IDX_TIMEOUT_LSB 5
  550. #define RX_ATTENTION_DA_IDX_TIMEOUT_MSB 5
  551. #define RX_ATTENTION_DA_IDX_TIMEOUT_MASK 0x0000000000000020
  552. /* Description MSDU_LIMIT_ERROR
  553. Indicates that the MSDU threshold was exceeded and thus
  554. all the rest of the MSDUs will not be scattered and will
  555. not be decasulated but will be DMA'ed in RAW format as
  556. a single MSDU buffer
  557. */
  558. #define RX_ATTENTION_MSDU_LIMIT_ERROR_OFFSET 0x0000000000000008
  559. #define RX_ATTENTION_MSDU_LIMIT_ERROR_LSB 6
  560. #define RX_ATTENTION_MSDU_LIMIT_ERROR_MSB 6
  561. #define RX_ATTENTION_MSDU_LIMIT_ERROR_MASK 0x0000000000000040
  562. /* Description DA_IS_VALID
  563. Indicates that OLE found a valid DA entry
  564. */
  565. #define RX_ATTENTION_DA_IS_VALID_OFFSET 0x0000000000000008
  566. #define RX_ATTENTION_DA_IS_VALID_LSB 7
  567. #define RX_ATTENTION_DA_IS_VALID_MSB 7
  568. #define RX_ATTENTION_DA_IS_VALID_MASK 0x0000000000000080
  569. /* Description DA_IS_MCBC
  570. Field Only valid if "da_is_valid" is set
  571. Indicates the DA address was a Multicast of Broadcast address.
  572. */
  573. #define RX_ATTENTION_DA_IS_MCBC_OFFSET 0x0000000000000008
  574. #define RX_ATTENTION_DA_IS_MCBC_LSB 8
  575. #define RX_ATTENTION_DA_IS_MCBC_MSB 8
  576. #define RX_ATTENTION_DA_IS_MCBC_MASK 0x0000000000000100
  577. /* Description SA_IS_VALID
  578. Indicates that OLE found a valid SA entry
  579. */
  580. #define RX_ATTENTION_SA_IS_VALID_OFFSET 0x0000000000000008
  581. #define RX_ATTENTION_SA_IS_VALID_LSB 9
  582. #define RX_ATTENTION_SA_IS_VALID_MSB 9
  583. #define RX_ATTENTION_SA_IS_VALID_MASK 0x0000000000000200
  584. /* Description DECRYPT_STATUS_CODE
  585. Field provides insight into the decryption performed
  586. <enum 0 decrypt_ok> Frame had protection enabled and decrypted
  587. properly
  588. <enum 1 decrypt_unprotected_frame > Frame is unprotected
  589. and hence bypassed
  590. <enum 2 decrypt_data_err > Frame has protection enabled
  591. and could not be properly decrypted due to MIC/ICV mismatch
  592. etc.
  593. <enum 3 decrypt_key_invalid > Frame has protection enabled
  594. but the key that was required to decrypt this frame was
  595. not valid
  596. <enum 4 decrypt_peer_entry_invalid > Frame has protection
  597. enabled but the key that was required to decrypt this frame
  598. was not valid
  599. <enum 5 decrypt_other > Reserved for other indications
  600. <legal 0 - 5>
  601. */
  602. #define RX_ATTENTION_DECRYPT_STATUS_CODE_OFFSET 0x0000000000000008
  603. #define RX_ATTENTION_DECRYPT_STATUS_CODE_LSB 10
  604. #define RX_ATTENTION_DECRYPT_STATUS_CODE_MSB 12
  605. #define RX_ATTENTION_DECRYPT_STATUS_CODE_MASK 0x0000000000001c00
  606. /* Description RX_BITMAP_NOT_UPDATED
  607. Frame is received, but RXPCU could not update the receive
  608. bitmap due to (temporary) fifo contraints.
  609. <legal all>
  610. */
  611. #define RX_ATTENTION_RX_BITMAP_NOT_UPDATED_OFFSET 0x0000000000000008
  612. #define RX_ATTENTION_RX_BITMAP_NOT_UPDATED_LSB 13
  613. #define RX_ATTENTION_RX_BITMAP_NOT_UPDATED_MSB 13
  614. #define RX_ATTENTION_RX_BITMAP_NOT_UPDATED_MASK 0x0000000000002000
  615. /* Description RESERVED_2
  616. <legal 0>
  617. */
  618. #define RX_ATTENTION_RESERVED_2_OFFSET 0x0000000000000008
  619. #define RX_ATTENTION_RESERVED_2_LSB 14
  620. #define RX_ATTENTION_RESERVED_2_MSB 30
  621. #define RX_ATTENTION_RESERVED_2_MASK 0x000000007fffc000
  622. /* Description MSDU_DONE
  623. If set indicates that the RX packet data, RX header data,
  624. RX PPDU start descriptor, RX MPDU start/end descriptor,
  625. RX MSDU start/end descriptors and RX Attention descriptor
  626. are all valid. This bit must be in the last octet of the
  627. descriptor.
  628. */
  629. #define RX_ATTENTION_MSDU_DONE_OFFSET 0x0000000000000008
  630. #define RX_ATTENTION_MSDU_DONE_LSB 31
  631. #define RX_ATTENTION_MSDU_DONE_MSB 31
  632. #define RX_ATTENTION_MSDU_DONE_MASK 0x0000000080000000
  633. /* Description TLV64_PADDING
  634. Automatic DWORD padding inserted while converting TLV32
  635. to TLV64 for 64 bit ARCH
  636. <legal 0>
  637. */
  638. #define RX_ATTENTION_TLV64_PADDING_OFFSET 0x0000000000000008
  639. #define RX_ATTENTION_TLV64_PADDING_LSB 32
  640. #define RX_ATTENTION_TLV64_PADDING_MSB 63
  641. #define RX_ATTENTION_TLV64_PADDING_MASK 0xffffffff00000000
  642. #endif // RX_ATTENTION