rx_attention.h 38 KB

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