rx_attention.h 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180
  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_ATTENTION_H_
  21. #define _RX_ATTENTION_H_
  22. #if !defined(__ASSEMBLER__)
  23. #endif
  24. // ################ START SUMMARY #################
  25. //
  26. // Dword Fields
  27. // 0 rxpcu_mpdu_filter_in_category[1:0], sw_frame_group_id[8:2], reserved_0[15:9], phy_ppdu_id[31:16]
  28. // 1 first_mpdu[0], reserved_1a[1], mcast_bcast[2], ast_index_not_found[3], ast_index_timeout[4], power_mgmt[5], non_qos[6], null_data[7], mgmt_type[8], ctrl_type[9], more_data[10], eosp[11], a_msdu_error[12], fragment_flag[13], order[14], cce_match[15], overflow_err[16], msdu_length_err[17], tcp_udp_chksum_fail[18], ip_chksum_fail[19], sa_idx_invalid[20], da_idx_invalid[21], reserved_1b[22], rx_in_tx_decrypt_byp[23], encrypt_required[24], directed[25], buffer_fragment[26], mpdu_length_err[27], tkip_mic_err[28], decrypt_err[29], unencrypted_frame_err[30], fcs_err[31]
  29. // 2 flow_idx_timeout[0], flow_idx_invalid[1], wifi_parser_error[2], amsdu_parser_error[3], sa_idx_timeout[4], da_idx_timeout[5], msdu_limit_error[6], da_is_valid[7], da_is_mcbc[8], sa_is_valid[9], decrypt_status_code[12:10], rx_bitmap_not_updated[13], reserved_2[30:14], msdu_done[31]
  30. //
  31. // ################ END SUMMARY #################
  32. #define NUM_OF_DWORDS_RX_ATTENTION 3
  33. struct rx_attention {
  34. uint32_t rxpcu_mpdu_filter_in_category : 2, //[1:0]
  35. sw_frame_group_id : 7, //[8:2]
  36. reserved_0 : 7, //[15:9]
  37. phy_ppdu_id : 16; //[31:16]
  38. uint32_t first_mpdu : 1, //[0]
  39. reserved_1a : 1, //[1]
  40. mcast_bcast : 1, //[2]
  41. ast_index_not_found : 1, //[3]
  42. ast_index_timeout : 1, //[4]
  43. power_mgmt : 1, //[5]
  44. non_qos : 1, //[6]
  45. null_data : 1, //[7]
  46. mgmt_type : 1, //[8]
  47. ctrl_type : 1, //[9]
  48. more_data : 1, //[10]
  49. eosp : 1, //[11]
  50. a_msdu_error : 1, //[12]
  51. fragment_flag : 1, //[13]
  52. order : 1, //[14]
  53. cce_match : 1, //[15]
  54. overflow_err : 1, //[16]
  55. msdu_length_err : 1, //[17]
  56. tcp_udp_chksum_fail : 1, //[18]
  57. ip_chksum_fail : 1, //[19]
  58. sa_idx_invalid : 1, //[20]
  59. da_idx_invalid : 1, //[21]
  60. reserved_1b : 1, //[22]
  61. rx_in_tx_decrypt_byp : 1, //[23]
  62. encrypt_required : 1, //[24]
  63. directed : 1, //[25]
  64. buffer_fragment : 1, //[26]
  65. mpdu_length_err : 1, //[27]
  66. tkip_mic_err : 1, //[28]
  67. decrypt_err : 1, //[29]
  68. unencrypted_frame_err : 1, //[30]
  69. fcs_err : 1; //[31]
  70. uint32_t flow_idx_timeout : 1, //[0]
  71. flow_idx_invalid : 1, //[1]
  72. wifi_parser_error : 1, //[2]
  73. amsdu_parser_error : 1, //[3]
  74. sa_idx_timeout : 1, //[4]
  75. da_idx_timeout : 1, //[5]
  76. msdu_limit_error : 1, //[6]
  77. da_is_valid : 1, //[7]
  78. da_is_mcbc : 1, //[8]
  79. sa_is_valid : 1, //[9]
  80. decrypt_status_code : 3, //[12:10]
  81. rx_bitmap_not_updated : 1, //[13]
  82. reserved_2 : 17, //[30:14]
  83. msdu_done : 1; //[31]
  84. };
  85. /*
  86. rxpcu_mpdu_filter_in_category
  87. Field indicates what the reason was that this MPDU frame
  88. was allowed to come into the receive path by RXPCU
  89. <enum 0 rxpcu_filter_pass> This MPDU passed the normal
  90. frame filter programming of rxpcu
  91. <enum 1 rxpcu_monitor_client> This MPDU did NOT pass the
  92. regular frame filter and would have been dropped, were it
  93. not for the frame fitting into the 'monitor_client'
  94. category.
  95. <enum 2 rxpcu_monitor_other> This MPDU did NOT pass the
  96. regular frame filter and also did not pass the
  97. rxpcu_monitor_client filter. It would have been dropped
  98. accept that it did pass the 'monitor_other' category.
  99. <legal 0-2>
  100. sw_frame_group_id
  101. SW processes frames based on certain classifications.
  102. This field indicates to what sw classification this MPDU is
  103. mapped.
  104. The classification is given in priority order
  105. <enum 0 sw_frame_group_NDP_frame>
  106. <enum 1 sw_frame_group_Multicast_data>
  107. <enum 2 sw_frame_group_Unicast_data>
  108. <enum 3 sw_frame_group_Null_data > This includes mpdus
  109. of type Data Null as well as QoS Data Null
  110. <enum 4 sw_frame_group_mgmt_0000 >
  111. <enum 5 sw_frame_group_mgmt_0001 >
  112. <enum 6 sw_frame_group_mgmt_0010 >
  113. <enum 7 sw_frame_group_mgmt_0011 >
  114. <enum 8 sw_frame_group_mgmt_0100 >
  115. <enum 9 sw_frame_group_mgmt_0101 >
  116. <enum 10 sw_frame_group_mgmt_0110 >
  117. <enum 11 sw_frame_group_mgmt_0111 >
  118. <enum 12 sw_frame_group_mgmt_1000 >
  119. <enum 13 sw_frame_group_mgmt_1001 >
  120. <enum 14 sw_frame_group_mgmt_1010 >
  121. <enum 15 sw_frame_group_mgmt_1011 >
  122. <enum 16 sw_frame_group_mgmt_1100 >
  123. <enum 17 sw_frame_group_mgmt_1101 >
  124. <enum 18 sw_frame_group_mgmt_1110 >
  125. <enum 19 sw_frame_group_mgmt_1111 >
  126. <enum 20 sw_frame_group_ctrl_0000 >
  127. <enum 21 sw_frame_group_ctrl_0001 >
  128. <enum 22 sw_frame_group_ctrl_0010 >
  129. <enum 23 sw_frame_group_ctrl_0011 >
  130. <enum 24 sw_frame_group_ctrl_0100 >
  131. <enum 25 sw_frame_group_ctrl_0101 >
  132. <enum 26 sw_frame_group_ctrl_0110 >
  133. <enum 27 sw_frame_group_ctrl_0111 >
  134. <enum 28 sw_frame_group_ctrl_1000 >
  135. <enum 29 sw_frame_group_ctrl_1001 >
  136. <enum 30 sw_frame_group_ctrl_1010 >
  137. <enum 31 sw_frame_group_ctrl_1011 >
  138. <enum 32 sw_frame_group_ctrl_1100 >
  139. <enum 33 sw_frame_group_ctrl_1101 >
  140. <enum 34 sw_frame_group_ctrl_1110 >
  141. <enum 35 sw_frame_group_ctrl_1111 >
  142. <enum 36 sw_frame_group_unsupported> This covers type 3
  143. and protocol version != 0
  144. <legal 0-37>
  145. reserved_0
  146. <legal 0>
  147. phy_ppdu_id
  148. A ppdu counter value that PHY increments for every PPDU
  149. received. The counter value wraps around
  150. <legal all>
  151. first_mpdu
  152. Indicates the first MSDU of the PPDU. If both
  153. first_mpdu and last_mpdu are set in the MSDU then this is a
  154. not an A-MPDU frame but a stand alone MPDU. Interior MPDU
  155. in an A-MPDU shall have both first_mpdu and last_mpdu bits
  156. set to 0. The PPDU start status will only be valid when
  157. this bit is set.
  158. reserved_1a
  159. <legal 0>
  160. mcast_bcast
  161. Multicast / broadcast indicator. Only set when the MAC
  162. address 1 bit 0 is set indicating mcast/bcast and the BSSID
  163. matches one of the 4 BSSID registers. Only set when
  164. first_msdu is set.
  165. ast_index_not_found
  166. Only valid when first_msdu is set.
  167. Indicates no AST matching entries within the the max
  168. search count.
  169. ast_index_timeout
  170. Only valid when first_msdu is set.
  171. Indicates an unsuccessful search in the address seach
  172. table due to timeout.
  173. power_mgmt
  174. Power management bit set in the 802.11 header. Only set
  175. when first_msdu is set.
  176. non_qos
  177. Set if packet is not a non-QoS data frame. Only set
  178. when first_msdu is set.
  179. null_data
  180. Set if frame type indicates either null data or QoS null
  181. data format. Only set when first_msdu is set.
  182. mgmt_type
  183. Set if packet is a management packet. Only set when
  184. first_msdu is set.
  185. ctrl_type
  186. Set if packet is a control packet. Only set when
  187. first_msdu is set.
  188. more_data
  189. Set if more bit in frame control is set. Only set when
  190. first_msdu is set.
  191. eosp
  192. Set if the EOSP (end of service period) bit in the QoS
  193. control field is set. Only set when first_msdu is set.
  194. a_msdu_error
  195. Set if number of MSDUs in A-MSDU is above a threshold or
  196. if the size of the MSDU is invalid. This receive buffer
  197. will contain all of the remainder of the MSDUs in this MPDU
  198. without decapsulation.
  199. fragment_flag
  200. Indicates that this is an 802.11 fragment frame. This
  201. is set when either the more_frag bit is set in the frame
  202. control or the fragment number is not zero. Only set when
  203. first_msdu is set.
  204. order
  205. Set if the order bit in the frame control is set. Only
  206. set when first_msdu is set.
  207. cce_match
  208. Indicates that this status has a corresponding MSDU that
  209. requires FW processing. The OLE will have classification
  210. ring mask registers which will indicate the ring(s) for
  211. packets and descriptors which need FW attention.
  212. overflow_err
  213. RXPCU Receive FIFO ran out of space to receive the full
  214. MPDU. Therefor this MPDU is terminated early and is thus
  215. corrupted.
  216. This MPDU will not be ACKed.
  217. RXPCU might still be able to correctly receive the
  218. following MPDUs in the PPDU if enough fifo space became
  219. available in time
  220. msdu_length_err
  221. Indicates that the MSDU length from the 802.3
  222. encapsulated length field extends beyond the MPDU boundary
  223. or if the length is less than 14 bytes.
  224. Merged with original other_msdu_err: Indicates that the
  225. MSDU threshold was exceeded and thus all the rest of the
  226. MSDUs will not be scattered and will not be decasulated but
  227. will be DMA'ed in RAW format as a single MSDU buffer
  228. tcp_udp_chksum_fail
  229. Indicates that the computed checksum (tcp_udp_chksum)
  230. did not match the checksum in the TCP/UDP header.
  231. ip_chksum_fail
  232. Indicates that the computed checksum did not match the
  233. checksum in the IP header.
  234. sa_idx_invalid
  235. Indicates no matching entry was found in the address
  236. search table for the source MAC address.
  237. da_idx_invalid
  238. Indicates no matching entry was found in the address
  239. search table for the destination MAC address.
  240. reserved_1b
  241. rx_in_tx_decrypt_byp
  242. Indicates that RX packet is not decrypted as Crypto is
  243. busy with TX packet processing.
  244. encrypt_required
  245. Indicates that this data type frame is not encrypted
  246. even if the policy for this MPDU requires encryption as
  247. indicated in the peer entry key type.
  248. directed
  249. MPDU is a directed packet which means that the RA
  250. matched our STA addresses. In proxySTA it means that the TA
  251. matched an entry in our address search table with the
  252. corresponding no_ack bit is the address search entry
  253. cleared.
  254. buffer_fragment
  255. Indicates that at least one of the rx buffers has been
  256. fragmented. If set the FW should look at the rx_frag_info
  257. descriptor described below.
  258. mpdu_length_err
  259. Indicates that the MPDU was pre-maturely terminated
  260. resulting in a truncated MPDU. Don't trust the MPDU length
  261. field.
  262. tkip_mic_err
  263. Indicates that the MPDU Michael integrity check failed
  264. decrypt_err
  265. Indicates that the MPDU decrypt integrity check failed
  266. or CRYPTO received an encrypted frame, but did not get a
  267. valid corresponding key id in the peer entry.
  268. unencrypted_frame_err
  269. Copied here by RX OLE from the RX_MPDU_END TLV
  270. fcs_err
  271. Indicates that the MPDU FCS check failed
  272. flow_idx_timeout
  273. Indicates an unsuccessful flow search due to the
  274. expiring of the search timer.
  275. <legal all>
  276. flow_idx_invalid
  277. flow id is not valid
  278. <legal all>
  279. wifi_parser_error
  280. Indicates that the WiFi frame has one of the following
  281. errors
  282. o has less than minimum allowed bytes as per standard
  283. o has incomplete VLAN LLC/SNAP (only for non A-MSDUs)
  284. <legal all>
  285. amsdu_parser_error
  286. A-MSDU could not be properly de-agregated.
  287. <legal all>
  288. sa_idx_timeout
  289. Indicates an unsuccessful MAC source address search due
  290. to the expiring of the search timer.
  291. da_idx_timeout
  292. Indicates an unsuccessful MAC destination address search
  293. due to the expiring of the search timer.
  294. msdu_limit_error
  295. Indicates that the MSDU threshold was exceeded and thus
  296. all the rest of the MSDUs will not be scattered and will not
  297. be decasulated but will be DMA'ed in RAW format as a single
  298. MSDU buffer
  299. da_is_valid
  300. Indicates that OLE found a valid DA entry
  301. da_is_mcbc
  302. Field Only valid if da_is_valid is set
  303. Indicates the DA address was a Multicast of Broadcast
  304. address.
  305. sa_is_valid
  306. Indicates that OLE found a valid SA entry
  307. decrypt_status_code
  308. Field provides insight into the decryption performed
  309. <enum 0 decrypt_ok> Frame had protection enabled and
  310. decrypted properly
  311. <enum 1 decrypt_unprotected_frame > Frame is unprotected
  312. and hence bypassed
  313. <enum 2 decrypt_data_err > Frame has protection enabled
  314. and could not be properly decrypted due to MIC/ICV mismatch
  315. etc.
  316. <enum 3 decrypt_key_invalid > Frame has protection
  317. enabled but the key that was required to decrypt this frame
  318. was not valid
  319. <enum 4 decrypt_peer_entry_invalid > Frame has
  320. protection enabled but the key that was required to decrypt
  321. this frame was not valid
  322. <enum 5 decrypt_other > Reserved for other indications
  323. <legal 0 - 5>
  324. rx_bitmap_not_updated
  325. Frame is received, but RXPCU could not update the
  326. receive bitmap due to (temporary) fifo contraints.
  327. <legal all>
  328. reserved_2
  329. <legal 0>
  330. msdu_done
  331. If set indicates that the RX packet data, RX header
  332. data, RX PPDU start descriptor, RX MPDU start/end
  333. descriptor, RX MSDU start/end descriptors and RX Attention
  334. descriptor are all valid. This bit must be in the last
  335. octet of the descriptor.
  336. */
  337. /* Description RX_ATTENTION_0_RXPCU_MPDU_FILTER_IN_CATEGORY
  338. Field indicates what the reason was that this MPDU frame
  339. was allowed to come into the receive path by RXPCU
  340. <enum 0 rxpcu_filter_pass> This MPDU passed the normal
  341. frame filter programming of rxpcu
  342. <enum 1 rxpcu_monitor_client> This MPDU did NOT pass the
  343. regular frame filter and would have been dropped, were it
  344. not for the frame fitting into the 'monitor_client'
  345. category.
  346. <enum 2 rxpcu_monitor_other> This MPDU did NOT pass the
  347. regular frame filter and also did not pass the
  348. rxpcu_monitor_client filter. It would have been dropped
  349. accept that it did pass the 'monitor_other' category.
  350. <legal 0-2>
  351. */
  352. #define RX_ATTENTION_0_RXPCU_MPDU_FILTER_IN_CATEGORY_OFFSET 0x00000000
  353. #define RX_ATTENTION_0_RXPCU_MPDU_FILTER_IN_CATEGORY_LSB 0
  354. #define RX_ATTENTION_0_RXPCU_MPDU_FILTER_IN_CATEGORY_MASK 0x00000003
  355. /* Description RX_ATTENTION_0_SW_FRAME_GROUP_ID
  356. SW processes frames based on certain classifications.
  357. This field indicates to what sw classification this MPDU is
  358. mapped.
  359. The classification is given in priority order
  360. <enum 0 sw_frame_group_NDP_frame>
  361. <enum 1 sw_frame_group_Multicast_data>
  362. <enum 2 sw_frame_group_Unicast_data>
  363. <enum 3 sw_frame_group_Null_data > This includes mpdus
  364. of type Data Null as well as QoS Data Null
  365. <enum 4 sw_frame_group_mgmt_0000 >
  366. <enum 5 sw_frame_group_mgmt_0001 >
  367. <enum 6 sw_frame_group_mgmt_0010 >
  368. <enum 7 sw_frame_group_mgmt_0011 >
  369. <enum 8 sw_frame_group_mgmt_0100 >
  370. <enum 9 sw_frame_group_mgmt_0101 >
  371. <enum 10 sw_frame_group_mgmt_0110 >
  372. <enum 11 sw_frame_group_mgmt_0111 >
  373. <enum 12 sw_frame_group_mgmt_1000 >
  374. <enum 13 sw_frame_group_mgmt_1001 >
  375. <enum 14 sw_frame_group_mgmt_1010 >
  376. <enum 15 sw_frame_group_mgmt_1011 >
  377. <enum 16 sw_frame_group_mgmt_1100 >
  378. <enum 17 sw_frame_group_mgmt_1101 >
  379. <enum 18 sw_frame_group_mgmt_1110 >
  380. <enum 19 sw_frame_group_mgmt_1111 >
  381. <enum 20 sw_frame_group_ctrl_0000 >
  382. <enum 21 sw_frame_group_ctrl_0001 >
  383. <enum 22 sw_frame_group_ctrl_0010 >
  384. <enum 23 sw_frame_group_ctrl_0011 >
  385. <enum 24 sw_frame_group_ctrl_0100 >
  386. <enum 25 sw_frame_group_ctrl_0101 >
  387. <enum 26 sw_frame_group_ctrl_0110 >
  388. <enum 27 sw_frame_group_ctrl_0111 >
  389. <enum 28 sw_frame_group_ctrl_1000 >
  390. <enum 29 sw_frame_group_ctrl_1001 >
  391. <enum 30 sw_frame_group_ctrl_1010 >
  392. <enum 31 sw_frame_group_ctrl_1011 >
  393. <enum 32 sw_frame_group_ctrl_1100 >
  394. <enum 33 sw_frame_group_ctrl_1101 >
  395. <enum 34 sw_frame_group_ctrl_1110 >
  396. <enum 35 sw_frame_group_ctrl_1111 >
  397. <enum 36 sw_frame_group_unsupported> This covers type 3
  398. and protocol version != 0
  399. <legal 0-37>
  400. */
  401. #define RX_ATTENTION_0_SW_FRAME_GROUP_ID_OFFSET 0x00000000
  402. #define RX_ATTENTION_0_SW_FRAME_GROUP_ID_LSB 2
  403. #define RX_ATTENTION_0_SW_FRAME_GROUP_ID_MASK 0x000001fc
  404. /* Description RX_ATTENTION_0_RESERVED_0
  405. <legal 0>
  406. */
  407. #define RX_ATTENTION_0_RESERVED_0_OFFSET 0x00000000
  408. #define RX_ATTENTION_0_RESERVED_0_LSB 9
  409. #define RX_ATTENTION_0_RESERVED_0_MASK 0x0000fe00
  410. /* Description RX_ATTENTION_0_PHY_PPDU_ID
  411. A ppdu counter value that PHY increments for every PPDU
  412. received. The counter value wraps around
  413. <legal all>
  414. */
  415. #define RX_ATTENTION_0_PHY_PPDU_ID_OFFSET 0x00000000
  416. #define RX_ATTENTION_0_PHY_PPDU_ID_LSB 16
  417. #define RX_ATTENTION_0_PHY_PPDU_ID_MASK 0xffff0000
  418. /* Description RX_ATTENTION_1_FIRST_MPDU
  419. Indicates the first MSDU of the PPDU. If both
  420. first_mpdu and last_mpdu are set in the MSDU then this is a
  421. not an A-MPDU frame but a stand alone MPDU. Interior MPDU
  422. in an A-MPDU shall have both first_mpdu and last_mpdu bits
  423. set to 0. The PPDU start status will only be valid when
  424. this bit is set.
  425. */
  426. #define RX_ATTENTION_1_FIRST_MPDU_OFFSET 0x00000004
  427. #define RX_ATTENTION_1_FIRST_MPDU_LSB 0
  428. #define RX_ATTENTION_1_FIRST_MPDU_MASK 0x00000001
  429. /* Description RX_ATTENTION_1_RESERVED_1A
  430. <legal 0>
  431. */
  432. #define RX_ATTENTION_1_RESERVED_1A_OFFSET 0x00000004
  433. #define RX_ATTENTION_1_RESERVED_1A_LSB 1
  434. #define RX_ATTENTION_1_RESERVED_1A_MASK 0x00000002
  435. /* Description RX_ATTENTION_1_MCAST_BCAST
  436. Multicast / broadcast indicator. Only set when the MAC
  437. address 1 bit 0 is set indicating mcast/bcast and the BSSID
  438. matches one of the 4 BSSID registers. Only set when
  439. first_msdu is set.
  440. */
  441. #define RX_ATTENTION_1_MCAST_BCAST_OFFSET 0x00000004
  442. #define RX_ATTENTION_1_MCAST_BCAST_LSB 2
  443. #define RX_ATTENTION_1_MCAST_BCAST_MASK 0x00000004
  444. /* Description RX_ATTENTION_1_AST_INDEX_NOT_FOUND
  445. Only valid when first_msdu is set.
  446. Indicates no AST matching entries within the the max
  447. search count.
  448. */
  449. #define RX_ATTENTION_1_AST_INDEX_NOT_FOUND_OFFSET 0x00000004
  450. #define RX_ATTENTION_1_AST_INDEX_NOT_FOUND_LSB 3
  451. #define RX_ATTENTION_1_AST_INDEX_NOT_FOUND_MASK 0x00000008
  452. /* Description RX_ATTENTION_1_AST_INDEX_TIMEOUT
  453. Only valid when first_msdu is set.
  454. Indicates an unsuccessful search in the address seach
  455. table due to timeout.
  456. */
  457. #define RX_ATTENTION_1_AST_INDEX_TIMEOUT_OFFSET 0x00000004
  458. #define RX_ATTENTION_1_AST_INDEX_TIMEOUT_LSB 4
  459. #define RX_ATTENTION_1_AST_INDEX_TIMEOUT_MASK 0x00000010
  460. /* Description RX_ATTENTION_1_POWER_MGMT
  461. Power management bit set in the 802.11 header. Only set
  462. when first_msdu is set.
  463. */
  464. #define RX_ATTENTION_1_POWER_MGMT_OFFSET 0x00000004
  465. #define RX_ATTENTION_1_POWER_MGMT_LSB 5
  466. #define RX_ATTENTION_1_POWER_MGMT_MASK 0x00000020
  467. /* Description RX_ATTENTION_1_NON_QOS
  468. Set if packet is not a non-QoS data frame. Only set
  469. when first_msdu is set.
  470. */
  471. #define RX_ATTENTION_1_NON_QOS_OFFSET 0x00000004
  472. #define RX_ATTENTION_1_NON_QOS_LSB 6
  473. #define RX_ATTENTION_1_NON_QOS_MASK 0x00000040
  474. /* Description RX_ATTENTION_1_NULL_DATA
  475. Set if frame type indicates either null data or QoS null
  476. data format. Only set when first_msdu is set.
  477. */
  478. #define RX_ATTENTION_1_NULL_DATA_OFFSET 0x00000004
  479. #define RX_ATTENTION_1_NULL_DATA_LSB 7
  480. #define RX_ATTENTION_1_NULL_DATA_MASK 0x00000080
  481. /* Description RX_ATTENTION_1_MGMT_TYPE
  482. Set if packet is a management packet. Only set when
  483. first_msdu is set.
  484. */
  485. #define RX_ATTENTION_1_MGMT_TYPE_OFFSET 0x00000004
  486. #define RX_ATTENTION_1_MGMT_TYPE_LSB 8
  487. #define RX_ATTENTION_1_MGMT_TYPE_MASK 0x00000100
  488. /* Description RX_ATTENTION_1_CTRL_TYPE
  489. Set if packet is a control packet. Only set when
  490. first_msdu is set.
  491. */
  492. #define RX_ATTENTION_1_CTRL_TYPE_OFFSET 0x00000004
  493. #define RX_ATTENTION_1_CTRL_TYPE_LSB 9
  494. #define RX_ATTENTION_1_CTRL_TYPE_MASK 0x00000200
  495. /* Description RX_ATTENTION_1_MORE_DATA
  496. Set if more bit in frame control is set. Only set when
  497. first_msdu is set.
  498. */
  499. #define RX_ATTENTION_1_MORE_DATA_OFFSET 0x00000004
  500. #define RX_ATTENTION_1_MORE_DATA_LSB 10
  501. #define RX_ATTENTION_1_MORE_DATA_MASK 0x00000400
  502. /* Description RX_ATTENTION_1_EOSP
  503. Set if the EOSP (end of service period) bit in the QoS
  504. control field is set. Only set when first_msdu is set.
  505. */
  506. #define RX_ATTENTION_1_EOSP_OFFSET 0x00000004
  507. #define RX_ATTENTION_1_EOSP_LSB 11
  508. #define RX_ATTENTION_1_EOSP_MASK 0x00000800
  509. /* Description RX_ATTENTION_1_A_MSDU_ERROR
  510. Set if number of MSDUs in A-MSDU is above a threshold or
  511. if the size of the MSDU is invalid. This receive buffer
  512. will contain all of the remainder of the MSDUs in this MPDU
  513. without decapsulation.
  514. */
  515. #define RX_ATTENTION_1_A_MSDU_ERROR_OFFSET 0x00000004
  516. #define RX_ATTENTION_1_A_MSDU_ERROR_LSB 12
  517. #define RX_ATTENTION_1_A_MSDU_ERROR_MASK 0x00001000
  518. /* Description RX_ATTENTION_1_FRAGMENT_FLAG
  519. Indicates that this is an 802.11 fragment frame. This
  520. is set when either the more_frag bit is set in the frame
  521. control or the fragment number is not zero. Only set when
  522. first_msdu is set.
  523. */
  524. #define RX_ATTENTION_1_FRAGMENT_FLAG_OFFSET 0x00000004
  525. #define RX_ATTENTION_1_FRAGMENT_FLAG_LSB 13
  526. #define RX_ATTENTION_1_FRAGMENT_FLAG_MASK 0x00002000
  527. /* Description RX_ATTENTION_1_ORDER
  528. Set if the order bit in the frame control is set. Only
  529. set when first_msdu is set.
  530. */
  531. #define RX_ATTENTION_1_ORDER_OFFSET 0x00000004
  532. #define RX_ATTENTION_1_ORDER_LSB 14
  533. #define RX_ATTENTION_1_ORDER_MASK 0x00004000
  534. /* Description RX_ATTENTION_1_CCE_MATCH
  535. Indicates that this status has a corresponding MSDU that
  536. requires FW processing. The OLE will have classification
  537. ring mask registers which will indicate the ring(s) for
  538. packets and descriptors which need FW attention.
  539. */
  540. #define RX_ATTENTION_1_CCE_MATCH_OFFSET 0x00000004
  541. #define RX_ATTENTION_1_CCE_MATCH_LSB 15
  542. #define RX_ATTENTION_1_CCE_MATCH_MASK 0x00008000
  543. /* Description RX_ATTENTION_1_OVERFLOW_ERR
  544. RXPCU Receive FIFO ran out of space to receive the full
  545. MPDU. Therefor this MPDU is terminated early and is thus
  546. corrupted.
  547. This MPDU will not be ACKed.
  548. RXPCU might still be able to correctly receive the
  549. following MPDUs in the PPDU if enough fifo space became
  550. available in time
  551. */
  552. #define RX_ATTENTION_1_OVERFLOW_ERR_OFFSET 0x00000004
  553. #define RX_ATTENTION_1_OVERFLOW_ERR_LSB 16
  554. #define RX_ATTENTION_1_OVERFLOW_ERR_MASK 0x00010000
  555. /* Description RX_ATTENTION_1_MSDU_LENGTH_ERR
  556. Indicates that the MSDU length from the 802.3
  557. encapsulated length field extends beyond the MPDU boundary
  558. or if the length is less than 14 bytes.
  559. Merged with original other_msdu_err: Indicates that the
  560. MSDU threshold was exceeded and thus all the rest of the
  561. MSDUs will not be scattered and will not be decasulated but
  562. will be DMA'ed in RAW format as a single MSDU buffer
  563. */
  564. #define RX_ATTENTION_1_MSDU_LENGTH_ERR_OFFSET 0x00000004
  565. #define RX_ATTENTION_1_MSDU_LENGTH_ERR_LSB 17
  566. #define RX_ATTENTION_1_MSDU_LENGTH_ERR_MASK 0x00020000
  567. /* Description RX_ATTENTION_1_TCP_UDP_CHKSUM_FAIL
  568. Indicates that the computed checksum (tcp_udp_chksum)
  569. did not match the checksum in the TCP/UDP header.
  570. */
  571. #define RX_ATTENTION_1_TCP_UDP_CHKSUM_FAIL_OFFSET 0x00000004
  572. #define RX_ATTENTION_1_TCP_UDP_CHKSUM_FAIL_LSB 18
  573. #define RX_ATTENTION_1_TCP_UDP_CHKSUM_FAIL_MASK 0x00040000
  574. /* Description RX_ATTENTION_1_IP_CHKSUM_FAIL
  575. Indicates that the computed checksum did not match the
  576. checksum in the IP header.
  577. */
  578. #define RX_ATTENTION_1_IP_CHKSUM_FAIL_OFFSET 0x00000004
  579. #define RX_ATTENTION_1_IP_CHKSUM_FAIL_LSB 19
  580. #define RX_ATTENTION_1_IP_CHKSUM_FAIL_MASK 0x00080000
  581. /* Description RX_ATTENTION_1_SA_IDX_INVALID
  582. Indicates no matching entry was found in the address
  583. search table for the source MAC address.
  584. */
  585. #define RX_ATTENTION_1_SA_IDX_INVALID_OFFSET 0x00000004
  586. #define RX_ATTENTION_1_SA_IDX_INVALID_LSB 20
  587. #define RX_ATTENTION_1_SA_IDX_INVALID_MASK 0x00100000
  588. /* Description RX_ATTENTION_1_DA_IDX_INVALID
  589. Indicates no matching entry was found in the address
  590. search table for the destination MAC address.
  591. */
  592. #define RX_ATTENTION_1_DA_IDX_INVALID_OFFSET 0x00000004
  593. #define RX_ATTENTION_1_DA_IDX_INVALID_LSB 21
  594. #define RX_ATTENTION_1_DA_IDX_INVALID_MASK 0x00200000
  595. /* Description RX_ATTENTION_1_RESERVED_1B
  596. */
  597. #define RX_ATTENTION_1_RESERVED_1B_OFFSET 0x00000004
  598. #define RX_ATTENTION_1_RESERVED_1B_LSB 22
  599. #define RX_ATTENTION_1_RESERVED_1B_MASK 0x00400000
  600. /* Description RX_ATTENTION_1_RX_IN_TX_DECRYPT_BYP
  601. Indicates that RX packet is not decrypted as Crypto is
  602. busy with TX packet processing.
  603. */
  604. #define RX_ATTENTION_1_RX_IN_TX_DECRYPT_BYP_OFFSET 0x00000004
  605. #define RX_ATTENTION_1_RX_IN_TX_DECRYPT_BYP_LSB 23
  606. #define RX_ATTENTION_1_RX_IN_TX_DECRYPT_BYP_MASK 0x00800000
  607. /* Description RX_ATTENTION_1_ENCRYPT_REQUIRED
  608. Indicates that this data type frame is not encrypted
  609. even if the policy for this MPDU requires encryption as
  610. indicated in the peer entry key type.
  611. */
  612. #define RX_ATTENTION_1_ENCRYPT_REQUIRED_OFFSET 0x00000004
  613. #define RX_ATTENTION_1_ENCRYPT_REQUIRED_LSB 24
  614. #define RX_ATTENTION_1_ENCRYPT_REQUIRED_MASK 0x01000000
  615. /* Description RX_ATTENTION_1_DIRECTED
  616. MPDU is a directed packet which means that the RA
  617. matched our STA addresses. In proxySTA it means that the TA
  618. matched an entry in our address search table with the
  619. corresponding no_ack bit is the address search entry
  620. cleared.
  621. */
  622. #define RX_ATTENTION_1_DIRECTED_OFFSET 0x00000004
  623. #define RX_ATTENTION_1_DIRECTED_LSB 25
  624. #define RX_ATTENTION_1_DIRECTED_MASK 0x02000000
  625. /* Description RX_ATTENTION_1_BUFFER_FRAGMENT
  626. Indicates that at least one of the rx buffers has been
  627. fragmented. If set the FW should look at the rx_frag_info
  628. descriptor described below.
  629. */
  630. #define RX_ATTENTION_1_BUFFER_FRAGMENT_OFFSET 0x00000004
  631. #define RX_ATTENTION_1_BUFFER_FRAGMENT_LSB 26
  632. #define RX_ATTENTION_1_BUFFER_FRAGMENT_MASK 0x04000000
  633. /* Description RX_ATTENTION_1_MPDU_LENGTH_ERR
  634. Indicates that the MPDU was pre-maturely terminated
  635. resulting in a truncated MPDU. Don't trust the MPDU length
  636. field.
  637. */
  638. #define RX_ATTENTION_1_MPDU_LENGTH_ERR_OFFSET 0x00000004
  639. #define RX_ATTENTION_1_MPDU_LENGTH_ERR_LSB 27
  640. #define RX_ATTENTION_1_MPDU_LENGTH_ERR_MASK 0x08000000
  641. /* Description RX_ATTENTION_1_TKIP_MIC_ERR
  642. Indicates that the MPDU Michael integrity check failed
  643. */
  644. #define RX_ATTENTION_1_TKIP_MIC_ERR_OFFSET 0x00000004
  645. #define RX_ATTENTION_1_TKIP_MIC_ERR_LSB 28
  646. #define RX_ATTENTION_1_TKIP_MIC_ERR_MASK 0x10000000
  647. /* Description RX_ATTENTION_1_DECRYPT_ERR
  648. Indicates that the MPDU decrypt integrity check failed
  649. or CRYPTO received an encrypted frame, but did not get a
  650. valid corresponding key id in the peer entry.
  651. */
  652. #define RX_ATTENTION_1_DECRYPT_ERR_OFFSET 0x00000004
  653. #define RX_ATTENTION_1_DECRYPT_ERR_LSB 29
  654. #define RX_ATTENTION_1_DECRYPT_ERR_MASK 0x20000000
  655. /* Description RX_ATTENTION_1_UNENCRYPTED_FRAME_ERR
  656. Copied here by RX OLE from the RX_MPDU_END TLV
  657. */
  658. #define RX_ATTENTION_1_UNENCRYPTED_FRAME_ERR_OFFSET 0x00000004
  659. #define RX_ATTENTION_1_UNENCRYPTED_FRAME_ERR_LSB 30
  660. #define RX_ATTENTION_1_UNENCRYPTED_FRAME_ERR_MASK 0x40000000
  661. /* Description RX_ATTENTION_1_FCS_ERR
  662. Indicates that the MPDU FCS check failed
  663. */
  664. #define RX_ATTENTION_1_FCS_ERR_OFFSET 0x00000004
  665. #define RX_ATTENTION_1_FCS_ERR_LSB 31
  666. #define RX_ATTENTION_1_FCS_ERR_MASK 0x80000000
  667. /* Description RX_ATTENTION_2_FLOW_IDX_TIMEOUT
  668. Indicates an unsuccessful flow search due to the
  669. expiring of the search timer.
  670. <legal all>
  671. */
  672. #define RX_ATTENTION_2_FLOW_IDX_TIMEOUT_OFFSET 0x00000008
  673. #define RX_ATTENTION_2_FLOW_IDX_TIMEOUT_LSB 0
  674. #define RX_ATTENTION_2_FLOW_IDX_TIMEOUT_MASK 0x00000001
  675. /* Description RX_ATTENTION_2_FLOW_IDX_INVALID
  676. flow id is not valid
  677. <legal all>
  678. */
  679. #define RX_ATTENTION_2_FLOW_IDX_INVALID_OFFSET 0x00000008
  680. #define RX_ATTENTION_2_FLOW_IDX_INVALID_LSB 1
  681. #define RX_ATTENTION_2_FLOW_IDX_INVALID_MASK 0x00000002
  682. /* Description RX_ATTENTION_2_WIFI_PARSER_ERROR
  683. Indicates that the WiFi frame has one of the following
  684. errors
  685. o has less than minimum allowed bytes as per standard
  686. o has incomplete VLAN LLC/SNAP (only for non A-MSDUs)
  687. <legal all>
  688. */
  689. #define RX_ATTENTION_2_WIFI_PARSER_ERROR_OFFSET 0x00000008
  690. #define RX_ATTENTION_2_WIFI_PARSER_ERROR_LSB 2
  691. #define RX_ATTENTION_2_WIFI_PARSER_ERROR_MASK 0x00000004
  692. /* Description RX_ATTENTION_2_AMSDU_PARSER_ERROR
  693. A-MSDU could not be properly de-agregated.
  694. <legal all>
  695. */
  696. #define RX_ATTENTION_2_AMSDU_PARSER_ERROR_OFFSET 0x00000008
  697. #define RX_ATTENTION_2_AMSDU_PARSER_ERROR_LSB 3
  698. #define RX_ATTENTION_2_AMSDU_PARSER_ERROR_MASK 0x00000008
  699. /* Description RX_ATTENTION_2_SA_IDX_TIMEOUT
  700. Indicates an unsuccessful MAC source address search due
  701. to the expiring of the search timer.
  702. */
  703. #define RX_ATTENTION_2_SA_IDX_TIMEOUT_OFFSET 0x00000008
  704. #define RX_ATTENTION_2_SA_IDX_TIMEOUT_LSB 4
  705. #define RX_ATTENTION_2_SA_IDX_TIMEOUT_MASK 0x00000010
  706. /* Description RX_ATTENTION_2_DA_IDX_TIMEOUT
  707. Indicates an unsuccessful MAC destination address search
  708. due to the expiring of the search timer.
  709. */
  710. #define RX_ATTENTION_2_DA_IDX_TIMEOUT_OFFSET 0x00000008
  711. #define RX_ATTENTION_2_DA_IDX_TIMEOUT_LSB 5
  712. #define RX_ATTENTION_2_DA_IDX_TIMEOUT_MASK 0x00000020
  713. /* Description RX_ATTENTION_2_MSDU_LIMIT_ERROR
  714. Indicates that the MSDU threshold was exceeded and thus
  715. all the rest of the MSDUs will not be scattered and will not
  716. be decasulated but will be DMA'ed in RAW format as a single
  717. MSDU buffer
  718. */
  719. #define RX_ATTENTION_2_MSDU_LIMIT_ERROR_OFFSET 0x00000008
  720. #define RX_ATTENTION_2_MSDU_LIMIT_ERROR_LSB 6
  721. #define RX_ATTENTION_2_MSDU_LIMIT_ERROR_MASK 0x00000040
  722. /* Description RX_ATTENTION_2_DA_IS_VALID
  723. Indicates that OLE found a valid DA entry
  724. */
  725. #define RX_ATTENTION_2_DA_IS_VALID_OFFSET 0x00000008
  726. #define RX_ATTENTION_2_DA_IS_VALID_LSB 7
  727. #define RX_ATTENTION_2_DA_IS_VALID_MASK 0x00000080
  728. /* Description RX_ATTENTION_2_DA_IS_MCBC
  729. Field Only valid if da_is_valid is set
  730. Indicates the DA address was a Multicast of Broadcast
  731. address.
  732. */
  733. #define RX_ATTENTION_2_DA_IS_MCBC_OFFSET 0x00000008
  734. #define RX_ATTENTION_2_DA_IS_MCBC_LSB 8
  735. #define RX_ATTENTION_2_DA_IS_MCBC_MASK 0x00000100
  736. /* Description RX_ATTENTION_2_SA_IS_VALID
  737. Indicates that OLE found a valid SA entry
  738. */
  739. #define RX_ATTENTION_2_SA_IS_VALID_OFFSET 0x00000008
  740. #define RX_ATTENTION_2_SA_IS_VALID_LSB 9
  741. #define RX_ATTENTION_2_SA_IS_VALID_MASK 0x00000200
  742. /* Description RX_ATTENTION_2_DECRYPT_STATUS_CODE
  743. Field provides insight into the decryption performed
  744. <enum 0 decrypt_ok> Frame had protection enabled and
  745. decrypted properly
  746. <enum 1 decrypt_unprotected_frame > Frame is unprotected
  747. and hence bypassed
  748. <enum 2 decrypt_data_err > Frame has protection enabled
  749. and could not be properly decrypted due to MIC/ICV mismatch
  750. etc.
  751. <enum 3 decrypt_key_invalid > Frame has protection
  752. enabled but the key that was required to decrypt this frame
  753. was not valid
  754. <enum 4 decrypt_peer_entry_invalid > Frame has
  755. protection enabled but the key that was required to decrypt
  756. this frame was not valid
  757. <enum 5 decrypt_other > Reserved for other indications
  758. <legal 0 - 5>
  759. */
  760. #define RX_ATTENTION_2_DECRYPT_STATUS_CODE_OFFSET 0x00000008
  761. #define RX_ATTENTION_2_DECRYPT_STATUS_CODE_LSB 10
  762. #define RX_ATTENTION_2_DECRYPT_STATUS_CODE_MASK 0x00001c00
  763. /* Description RX_ATTENTION_2_RX_BITMAP_NOT_UPDATED
  764. Frame is received, but RXPCU could not update the
  765. receive bitmap due to (temporary) fifo contraints.
  766. <legal all>
  767. */
  768. #define RX_ATTENTION_2_RX_BITMAP_NOT_UPDATED_OFFSET 0x00000008
  769. #define RX_ATTENTION_2_RX_BITMAP_NOT_UPDATED_LSB 13
  770. #define RX_ATTENTION_2_RX_BITMAP_NOT_UPDATED_MASK 0x00002000
  771. /* Description RX_ATTENTION_2_RESERVED_2
  772. <legal 0>
  773. */
  774. #define RX_ATTENTION_2_RESERVED_2_OFFSET 0x00000008
  775. #define RX_ATTENTION_2_RESERVED_2_LSB 14
  776. #define RX_ATTENTION_2_RESERVED_2_MASK 0x7fffc000
  777. /* Description RX_ATTENTION_2_MSDU_DONE
  778. If set indicates that the RX packet data, RX header
  779. data, RX PPDU start descriptor, RX MPDU start/end
  780. descriptor, RX MSDU start/end descriptors and RX Attention
  781. descriptor are all valid. This bit must be in the last
  782. octet of the descriptor.
  783. */
  784. #define RX_ATTENTION_2_MSDU_DONE_OFFSET 0x00000008
  785. #define RX_ATTENTION_2_MSDU_DONE_LSB 31
  786. #define RX_ATTENTION_2_MSDU_DONE_MASK 0x80000000
  787. #endif // _RX_ATTENTION_H_