rx_attention.h 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176
  1. /*
  2. * Copyright (c) 2019, 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. #ifndef _RX_ATTENTION_H_
  17. #define _RX_ATTENTION_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. // ################ START SUMMARY #################
  21. //
  22. // Dword Fields
  23. // 0 rxpcu_mpdu_filter_in_category[1:0], sw_frame_group_id[8:2], reserved_0[15:9], phy_ppdu_id[31:16]
  24. // 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]
  25. // 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]
  26. //
  27. // ################ END SUMMARY #################
  28. #define NUM_OF_DWORDS_RX_ATTENTION 3
  29. struct rx_attention {
  30. uint32_t rxpcu_mpdu_filter_in_category : 2, //[1:0]
  31. sw_frame_group_id : 7, //[8:2]
  32. reserved_0 : 7, //[15:9]
  33. phy_ppdu_id : 16; //[31:16]
  34. uint32_t first_mpdu : 1, //[0]
  35. reserved_1a : 1, //[1]
  36. mcast_bcast : 1, //[2]
  37. ast_index_not_found : 1, //[3]
  38. ast_index_timeout : 1, //[4]
  39. power_mgmt : 1, //[5]
  40. non_qos : 1, //[6]
  41. null_data : 1, //[7]
  42. mgmt_type : 1, //[8]
  43. ctrl_type : 1, //[9]
  44. more_data : 1, //[10]
  45. eosp : 1, //[11]
  46. a_msdu_error : 1, //[12]
  47. fragment_flag : 1, //[13]
  48. order : 1, //[14]
  49. cce_match : 1, //[15]
  50. overflow_err : 1, //[16]
  51. msdu_length_err : 1, //[17]
  52. tcp_udp_chksum_fail : 1, //[18]
  53. ip_chksum_fail : 1, //[19]
  54. sa_idx_invalid : 1, //[20]
  55. da_idx_invalid : 1, //[21]
  56. reserved_1b : 1, //[22]
  57. rx_in_tx_decrypt_byp : 1, //[23]
  58. encrypt_required : 1, //[24]
  59. directed : 1, //[25]
  60. buffer_fragment : 1, //[26]
  61. mpdu_length_err : 1, //[27]
  62. tkip_mic_err : 1, //[28]
  63. decrypt_err : 1, //[29]
  64. unencrypted_frame_err : 1, //[30]
  65. fcs_err : 1; //[31]
  66. uint32_t flow_idx_timeout : 1, //[0]
  67. flow_idx_invalid : 1, //[1]
  68. wifi_parser_error : 1, //[2]
  69. amsdu_parser_error : 1, //[3]
  70. sa_idx_timeout : 1, //[4]
  71. da_idx_timeout : 1, //[5]
  72. msdu_limit_error : 1, //[6]
  73. da_is_valid : 1, //[7]
  74. da_is_mcbc : 1, //[8]
  75. sa_is_valid : 1, //[9]
  76. decrypt_status_code : 3, //[12:10]
  77. rx_bitmap_not_updated : 1, //[13]
  78. reserved_2 : 17, //[30:14]
  79. msdu_done : 1; //[31]
  80. };
  81. /*
  82. rxpcu_mpdu_filter_in_category
  83. Field indicates what the reason was that this MPDU frame
  84. was allowed to come into the receive path by RXPCU
  85. <enum 0 rxpcu_filter_pass> This MPDU passed the normal
  86. frame filter programming of rxpcu
  87. <enum 1 rxpcu_monitor_client> This MPDU did NOT pass the
  88. regular frame filter and would have been dropped, were it
  89. not for the frame fitting into the 'monitor_client'
  90. category.
  91. <enum 2 rxpcu_monitor_other> This MPDU did NOT pass the
  92. regular frame filter and also did not pass the
  93. rxpcu_monitor_client filter. It would have been dropped
  94. accept that it did pass the 'monitor_other' category.
  95. <legal 0-2>
  96. sw_frame_group_id
  97. SW processes frames based on certain classifications.
  98. This field indicates to what sw classification this MPDU is
  99. mapped.
  100. The classification is given in priority order
  101. <enum 0 sw_frame_group_NDP_frame>
  102. <enum 1 sw_frame_group_Multicast_data>
  103. <enum 2 sw_frame_group_Unicast_data>
  104. <enum 3 sw_frame_group_Null_data > This includes mpdus
  105. of type Data Null as well as QoS Data Null
  106. <enum 4 sw_frame_group_mgmt_0000 >
  107. <enum 5 sw_frame_group_mgmt_0001 >
  108. <enum 6 sw_frame_group_mgmt_0010 >
  109. <enum 7 sw_frame_group_mgmt_0011 >
  110. <enum 8 sw_frame_group_mgmt_0100 >
  111. <enum 9 sw_frame_group_mgmt_0101 >
  112. <enum 10 sw_frame_group_mgmt_0110 >
  113. <enum 11 sw_frame_group_mgmt_0111 >
  114. <enum 12 sw_frame_group_mgmt_1000 >
  115. <enum 13 sw_frame_group_mgmt_1001 >
  116. <enum 14 sw_frame_group_mgmt_1010 >
  117. <enum 15 sw_frame_group_mgmt_1011 >
  118. <enum 16 sw_frame_group_mgmt_1100 >
  119. <enum 17 sw_frame_group_mgmt_1101 >
  120. <enum 18 sw_frame_group_mgmt_1110 >
  121. <enum 19 sw_frame_group_mgmt_1111 >
  122. <enum 20 sw_frame_group_ctrl_0000 >
  123. <enum 21 sw_frame_group_ctrl_0001 >
  124. <enum 22 sw_frame_group_ctrl_0010 >
  125. <enum 23 sw_frame_group_ctrl_0011 >
  126. <enum 24 sw_frame_group_ctrl_0100 >
  127. <enum 25 sw_frame_group_ctrl_0101 >
  128. <enum 26 sw_frame_group_ctrl_0110 >
  129. <enum 27 sw_frame_group_ctrl_0111 >
  130. <enum 28 sw_frame_group_ctrl_1000 >
  131. <enum 29 sw_frame_group_ctrl_1001 >
  132. <enum 30 sw_frame_group_ctrl_1010 >
  133. <enum 31 sw_frame_group_ctrl_1011 >
  134. <enum 32 sw_frame_group_ctrl_1100 >
  135. <enum 33 sw_frame_group_ctrl_1101 >
  136. <enum 34 sw_frame_group_ctrl_1110 >
  137. <enum 35 sw_frame_group_ctrl_1111 >
  138. <enum 36 sw_frame_group_unsupported> This covers type 3
  139. and protocol version != 0
  140. <legal 0-37>
  141. reserved_0
  142. <legal 0>
  143. phy_ppdu_id
  144. A ppdu counter value that PHY increments for every PPDU
  145. received. The counter value wraps around
  146. <legal all>
  147. first_mpdu
  148. Indicates the first MSDU of the PPDU. If both
  149. first_mpdu and last_mpdu are set in the MSDU then this is a
  150. not an A-MPDU frame but a stand alone MPDU. Interior MPDU
  151. in an A-MPDU shall have both first_mpdu and last_mpdu bits
  152. set to 0. The PPDU start status will only be valid when
  153. this bit is set.
  154. reserved_1a
  155. <legal 0>
  156. mcast_bcast
  157. Multicast / broadcast indicator. Only set when the MAC
  158. address 1 bit 0 is set indicating mcast/bcast and the BSSID
  159. matches one of the 4 BSSID registers. Only set when
  160. first_msdu is set.
  161. ast_index_not_found
  162. Only valid when first_msdu is set.
  163. Indicates no AST matching entries within the the max
  164. search count.
  165. ast_index_timeout
  166. Only valid when first_msdu is set.
  167. Indicates an unsuccessful search in the address seach
  168. table due to timeout.
  169. power_mgmt
  170. Power management bit set in the 802.11 header. Only set
  171. when first_msdu is set.
  172. non_qos
  173. Set if packet is not a non-QoS data frame. Only set
  174. when first_msdu is set.
  175. null_data
  176. Set if frame type indicates either null data or QoS null
  177. data format. Only set when first_msdu is set.
  178. mgmt_type
  179. Set if packet is a management packet. Only set when
  180. first_msdu is set.
  181. ctrl_type
  182. Set if packet is a control packet. Only set when
  183. first_msdu is set.
  184. more_data
  185. Set if more bit in frame control is set. Only set when
  186. first_msdu is set.
  187. eosp
  188. Set if the EOSP (end of service period) bit in the QoS
  189. control field is set. Only set when first_msdu is set.
  190. a_msdu_error
  191. Set if number of MSDUs in A-MSDU is above a threshold or
  192. if the size of the MSDU is invalid. This receive buffer
  193. will contain all of the remainder of the MSDUs in this MPDU
  194. without decapsulation.
  195. fragment_flag
  196. Indicates that this is an 802.11 fragment frame. This
  197. is set when either the more_frag bit is set in the frame
  198. control or the fragment number is not zero. Only set when
  199. first_msdu is set.
  200. order
  201. Set if the order bit in the frame control is set. Only
  202. set when first_msdu is set.
  203. cce_match
  204. Indicates that this status has a corresponding MSDU that
  205. requires FW processing. The OLE will have classification
  206. ring mask registers which will indicate the ring(s) for
  207. packets and descriptors which need FW attention.
  208. overflow_err
  209. RXPCU Receive FIFO ran out of space to receive the full
  210. MPDU. Therefor this MPDU is terminated early and is thus
  211. corrupted.
  212. This MPDU will not be ACKed.
  213. RXPCU might still be able to correctly receive the
  214. following MPDUs in the PPDU if enough fifo space became
  215. available in time
  216. msdu_length_err
  217. Indicates that the MSDU length from the 802.3
  218. encapsulated length field extends beyond the MPDU boundary
  219. or if the length is less than 14 bytes.
  220. Merged with original other_msdu_err: Indicates that the
  221. MSDU threshold was exceeded and thus all the rest of the
  222. MSDUs will not be scattered and will not be decasulated but
  223. will be DMA'ed in RAW format as a single MSDU buffer
  224. tcp_udp_chksum_fail
  225. Indicates that the computed checksum (tcp_udp_chksum)
  226. did not match the checksum in the TCP/UDP header.
  227. ip_chksum_fail
  228. Indicates that the computed checksum did not match the
  229. checksum in the IP header.
  230. sa_idx_invalid
  231. Indicates no matching entry was found in the address
  232. search table for the source MAC address.
  233. da_idx_invalid
  234. Indicates no matching entry was found in the address
  235. search table for the destination MAC address.
  236. reserved_1b
  237. <legal 0>
  238. rx_in_tx_decrypt_byp
  239. Indicates that RX packet is not decrypted as Crypto is
  240. busy with TX packet processing.
  241. encrypt_required
  242. Indicates that this data type frame is not encrypted
  243. even if the policy for this MPDU requires encryption as
  244. indicated in the peer entry key type.
  245. directed
  246. MPDU is a directed packet which means that the RA
  247. matched our STA addresses. In proxySTA it means that the TA
  248. matched an entry in our address search table with the
  249. corresponding no_ack bit is the address search entry
  250. cleared.
  251. buffer_fragment
  252. Indicates that at least one of the rx buffers has been
  253. fragmented. If set the FW should look at the rx_frag_info
  254. descriptor described below.
  255. mpdu_length_err
  256. Indicates that the MPDU was pre-maturely terminated
  257. resulting in a truncated MPDU. Don't trust the MPDU length
  258. field.
  259. tkip_mic_err
  260. Indicates that the MPDU Michael integrity check failed
  261. decrypt_err
  262. Indicates that the MPDU decrypt integrity check failed
  263. or CRYPTO received an encrypted frame, but did not get a
  264. valid corresponding key id in the peer entry.
  265. unencrypted_frame_err
  266. Copied here by RX OLE from the RX_MPDU_END TLV
  267. fcs_err
  268. Indicates that the MPDU FCS check failed
  269. flow_idx_timeout
  270. Indicates an unsuccessful flow search due to the
  271. expiring of the search timer.
  272. <legal all>
  273. flow_idx_invalid
  274. flow id is not valid
  275. <legal all>
  276. wifi_parser_error
  277. Indicates that the WiFi frame has one of the following
  278. errors
  279. o has less than minimum allowed bytes as per standard
  280. o has incomplete VLAN LLC/SNAP (only for non A-MSDUs)
  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. <legal 0>
  594. */
  595. #define RX_ATTENTION_1_RESERVED_1B_OFFSET 0x00000004
  596. #define RX_ATTENTION_1_RESERVED_1B_LSB 22
  597. #define RX_ATTENTION_1_RESERVED_1B_MASK 0x00400000
  598. /* Description RX_ATTENTION_1_RX_IN_TX_DECRYPT_BYP
  599. Indicates that RX packet is not decrypted as Crypto is
  600. busy with TX packet processing.
  601. */
  602. #define RX_ATTENTION_1_RX_IN_TX_DECRYPT_BYP_OFFSET 0x00000004
  603. #define RX_ATTENTION_1_RX_IN_TX_DECRYPT_BYP_LSB 23
  604. #define RX_ATTENTION_1_RX_IN_TX_DECRYPT_BYP_MASK 0x00800000
  605. /* Description RX_ATTENTION_1_ENCRYPT_REQUIRED
  606. Indicates that this data type frame is not encrypted
  607. even if the policy for this MPDU requires encryption as
  608. indicated in the peer entry key type.
  609. */
  610. #define RX_ATTENTION_1_ENCRYPT_REQUIRED_OFFSET 0x00000004
  611. #define RX_ATTENTION_1_ENCRYPT_REQUIRED_LSB 24
  612. #define RX_ATTENTION_1_ENCRYPT_REQUIRED_MASK 0x01000000
  613. /* Description RX_ATTENTION_1_DIRECTED
  614. MPDU is a directed packet which means that the RA
  615. matched our STA addresses. In proxySTA it means that the TA
  616. matched an entry in our address search table with the
  617. corresponding no_ack bit is the address search entry
  618. cleared.
  619. */
  620. #define RX_ATTENTION_1_DIRECTED_OFFSET 0x00000004
  621. #define RX_ATTENTION_1_DIRECTED_LSB 25
  622. #define RX_ATTENTION_1_DIRECTED_MASK 0x02000000
  623. /* Description RX_ATTENTION_1_BUFFER_FRAGMENT
  624. Indicates that at least one of the rx buffers has been
  625. fragmented. If set the FW should look at the rx_frag_info
  626. descriptor described below.
  627. */
  628. #define RX_ATTENTION_1_BUFFER_FRAGMENT_OFFSET 0x00000004
  629. #define RX_ATTENTION_1_BUFFER_FRAGMENT_LSB 26
  630. #define RX_ATTENTION_1_BUFFER_FRAGMENT_MASK 0x04000000
  631. /* Description RX_ATTENTION_1_MPDU_LENGTH_ERR
  632. Indicates that the MPDU was pre-maturely terminated
  633. resulting in a truncated MPDU. Don't trust the MPDU length
  634. field.
  635. */
  636. #define RX_ATTENTION_1_MPDU_LENGTH_ERR_OFFSET 0x00000004
  637. #define RX_ATTENTION_1_MPDU_LENGTH_ERR_LSB 27
  638. #define RX_ATTENTION_1_MPDU_LENGTH_ERR_MASK 0x08000000
  639. /* Description RX_ATTENTION_1_TKIP_MIC_ERR
  640. Indicates that the MPDU Michael integrity check failed
  641. */
  642. #define RX_ATTENTION_1_TKIP_MIC_ERR_OFFSET 0x00000004
  643. #define RX_ATTENTION_1_TKIP_MIC_ERR_LSB 28
  644. #define RX_ATTENTION_1_TKIP_MIC_ERR_MASK 0x10000000
  645. /* Description RX_ATTENTION_1_DECRYPT_ERR
  646. Indicates that the MPDU decrypt integrity check failed
  647. or CRYPTO received an encrypted frame, but did not get a
  648. valid corresponding key id in the peer entry.
  649. */
  650. #define RX_ATTENTION_1_DECRYPT_ERR_OFFSET 0x00000004
  651. #define RX_ATTENTION_1_DECRYPT_ERR_LSB 29
  652. #define RX_ATTENTION_1_DECRYPT_ERR_MASK 0x20000000
  653. /* Description RX_ATTENTION_1_UNENCRYPTED_FRAME_ERR
  654. Copied here by RX OLE from the RX_MPDU_END TLV
  655. */
  656. #define RX_ATTENTION_1_UNENCRYPTED_FRAME_ERR_OFFSET 0x00000004
  657. #define RX_ATTENTION_1_UNENCRYPTED_FRAME_ERR_LSB 30
  658. #define RX_ATTENTION_1_UNENCRYPTED_FRAME_ERR_MASK 0x40000000
  659. /* Description RX_ATTENTION_1_FCS_ERR
  660. Indicates that the MPDU FCS check failed
  661. */
  662. #define RX_ATTENTION_1_FCS_ERR_OFFSET 0x00000004
  663. #define RX_ATTENTION_1_FCS_ERR_LSB 31
  664. #define RX_ATTENTION_1_FCS_ERR_MASK 0x80000000
  665. /* Description RX_ATTENTION_2_FLOW_IDX_TIMEOUT
  666. Indicates an unsuccessful flow search due to the
  667. expiring of the search timer.
  668. <legal all>
  669. */
  670. #define RX_ATTENTION_2_FLOW_IDX_TIMEOUT_OFFSET 0x00000008
  671. #define RX_ATTENTION_2_FLOW_IDX_TIMEOUT_LSB 0
  672. #define RX_ATTENTION_2_FLOW_IDX_TIMEOUT_MASK 0x00000001
  673. /* Description RX_ATTENTION_2_FLOW_IDX_INVALID
  674. flow id is not valid
  675. <legal all>
  676. */
  677. #define RX_ATTENTION_2_FLOW_IDX_INVALID_OFFSET 0x00000008
  678. #define RX_ATTENTION_2_FLOW_IDX_INVALID_LSB 1
  679. #define RX_ATTENTION_2_FLOW_IDX_INVALID_MASK 0x00000002
  680. /* Description RX_ATTENTION_2_WIFI_PARSER_ERROR
  681. Indicates that the WiFi frame has one of the following
  682. errors
  683. o has less than minimum allowed bytes as per standard
  684. o has incomplete VLAN LLC/SNAP (only for non A-MSDUs)
  685. <legal all>
  686. */
  687. #define RX_ATTENTION_2_WIFI_PARSER_ERROR_OFFSET 0x00000008
  688. #define RX_ATTENTION_2_WIFI_PARSER_ERROR_LSB 2
  689. #define RX_ATTENTION_2_WIFI_PARSER_ERROR_MASK 0x00000004
  690. /* Description RX_ATTENTION_2_AMSDU_PARSER_ERROR
  691. A-MSDU could not be properly de-agregated.
  692. <legal all>
  693. */
  694. #define RX_ATTENTION_2_AMSDU_PARSER_ERROR_OFFSET 0x00000008
  695. #define RX_ATTENTION_2_AMSDU_PARSER_ERROR_LSB 3
  696. #define RX_ATTENTION_2_AMSDU_PARSER_ERROR_MASK 0x00000008
  697. /* Description RX_ATTENTION_2_SA_IDX_TIMEOUT
  698. Indicates an unsuccessful MAC source address search due
  699. to the expiring of the search timer.
  700. */
  701. #define RX_ATTENTION_2_SA_IDX_TIMEOUT_OFFSET 0x00000008
  702. #define RX_ATTENTION_2_SA_IDX_TIMEOUT_LSB 4
  703. #define RX_ATTENTION_2_SA_IDX_TIMEOUT_MASK 0x00000010
  704. /* Description RX_ATTENTION_2_DA_IDX_TIMEOUT
  705. Indicates an unsuccessful MAC destination address search
  706. due to the expiring of the search timer.
  707. */
  708. #define RX_ATTENTION_2_DA_IDX_TIMEOUT_OFFSET 0x00000008
  709. #define RX_ATTENTION_2_DA_IDX_TIMEOUT_LSB 5
  710. #define RX_ATTENTION_2_DA_IDX_TIMEOUT_MASK 0x00000020
  711. /* Description RX_ATTENTION_2_MSDU_LIMIT_ERROR
  712. Indicates that the MSDU threshold was exceeded and thus
  713. all the rest of the MSDUs will not be scattered and will not
  714. be decasulated but will be DMA'ed in RAW format as a single
  715. MSDU buffer
  716. */
  717. #define RX_ATTENTION_2_MSDU_LIMIT_ERROR_OFFSET 0x00000008
  718. #define RX_ATTENTION_2_MSDU_LIMIT_ERROR_LSB 6
  719. #define RX_ATTENTION_2_MSDU_LIMIT_ERROR_MASK 0x00000040
  720. /* Description RX_ATTENTION_2_DA_IS_VALID
  721. Indicates that OLE found a valid DA entry
  722. */
  723. #define RX_ATTENTION_2_DA_IS_VALID_OFFSET 0x00000008
  724. #define RX_ATTENTION_2_DA_IS_VALID_LSB 7
  725. #define RX_ATTENTION_2_DA_IS_VALID_MASK 0x00000080
  726. /* Description RX_ATTENTION_2_DA_IS_MCBC
  727. Field Only valid if da_is_valid is set
  728. Indicates the DA address was a Multicast of Broadcast
  729. address.
  730. */
  731. #define RX_ATTENTION_2_DA_IS_MCBC_OFFSET 0x00000008
  732. #define RX_ATTENTION_2_DA_IS_MCBC_LSB 8
  733. #define RX_ATTENTION_2_DA_IS_MCBC_MASK 0x00000100
  734. /* Description RX_ATTENTION_2_SA_IS_VALID
  735. Indicates that OLE found a valid SA entry
  736. */
  737. #define RX_ATTENTION_2_SA_IS_VALID_OFFSET 0x00000008
  738. #define RX_ATTENTION_2_SA_IS_VALID_LSB 9
  739. #define RX_ATTENTION_2_SA_IS_VALID_MASK 0x00000200
  740. /* Description RX_ATTENTION_2_DECRYPT_STATUS_CODE
  741. Field provides insight into the decryption performed
  742. <enum 0 decrypt_ok> Frame had protection enabled and
  743. decrypted properly
  744. <enum 1 decrypt_unprotected_frame > Frame is unprotected
  745. and hence bypassed
  746. <enum 2 decrypt_data_err > Frame has protection enabled
  747. and could not be properly decrypted due to MIC/ICV mismatch
  748. etc.
  749. <enum 3 decrypt_key_invalid > Frame has protection
  750. enabled but the key that was required to decrypt this frame
  751. was not valid
  752. <enum 4 decrypt_peer_entry_invalid > Frame has
  753. protection enabled but the key that was required to decrypt
  754. this frame was not valid
  755. <enum 5 decrypt_other > Reserved for other indications
  756. <legal 0 - 5>
  757. */
  758. #define RX_ATTENTION_2_DECRYPT_STATUS_CODE_OFFSET 0x00000008
  759. #define RX_ATTENTION_2_DECRYPT_STATUS_CODE_LSB 10
  760. #define RX_ATTENTION_2_DECRYPT_STATUS_CODE_MASK 0x00001c00
  761. /* Description RX_ATTENTION_2_RX_BITMAP_NOT_UPDATED
  762. Frame is received, but RXPCU could not update the
  763. receive bitmap due to (temporary) fifo contraints.
  764. <legal all>
  765. */
  766. #define RX_ATTENTION_2_RX_BITMAP_NOT_UPDATED_OFFSET 0x00000008
  767. #define RX_ATTENTION_2_RX_BITMAP_NOT_UPDATED_LSB 13
  768. #define RX_ATTENTION_2_RX_BITMAP_NOT_UPDATED_MASK 0x00002000
  769. /* Description RX_ATTENTION_2_RESERVED_2
  770. <legal 0>
  771. */
  772. #define RX_ATTENTION_2_RESERVED_2_OFFSET 0x00000008
  773. #define RX_ATTENTION_2_RESERVED_2_LSB 14
  774. #define RX_ATTENTION_2_RESERVED_2_MASK 0x7fffc000
  775. /* Description RX_ATTENTION_2_MSDU_DONE
  776. If set indicates that the RX packet data, RX header
  777. data, RX PPDU start descriptor, RX MPDU start/end
  778. descriptor, RX MSDU start/end descriptors and RX Attention
  779. descriptor are all valid. This bit must be in the last
  780. octet of the descriptor.
  781. */
  782. #define RX_ATTENTION_2_MSDU_DONE_OFFSET 0x00000008
  783. #define RX_ATTENTION_2_MSDU_DONE_LSB 31
  784. #define RX_ATTENTION_2_MSDU_DONE_MASK 0x80000000
  785. #endif // _RX_ATTENTION_H_