rx_attention.h 38 KB

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