rx_attention.h 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176
  1. /*
  2. * Copyright (c) 2018 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. #ifndef _RX_ATTENTION_H_
  19. #define _RX_ATTENTION_H_
  20. #if !defined(__ASSEMBLER__)
  21. #endif
  22. // ################ START SUMMARY #################
  23. //
  24. // Dword Fields
  25. // 0 rxpcu_mpdu_filter_in_category[1:0], sw_frame_group_id[8:2], reserved_0[15:9], phy_ppdu_id[31:16]
  26. // 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]
  27. // 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]
  28. //
  29. // ################ END SUMMARY #################
  30. #define NUM_OF_DWORDS_RX_ATTENTION 3
  31. struct rx_attention {
  32. uint32_t rxpcu_mpdu_filter_in_category : 2, //[1:0]
  33. sw_frame_group_id : 7, //[8:2]
  34. reserved_0 : 7, //[15:9]
  35. phy_ppdu_id : 16; //[31:16]
  36. uint32_t first_mpdu : 1, //[0]
  37. reserved_1a : 1, //[1]
  38. mcast_bcast : 1, //[2]
  39. ast_index_not_found : 1, //[3]
  40. ast_index_timeout : 1, //[4]
  41. power_mgmt : 1, //[5]
  42. non_qos : 1, //[6]
  43. null_data : 1, //[7]
  44. mgmt_type : 1, //[8]
  45. ctrl_type : 1, //[9]
  46. more_data : 1, //[10]
  47. eosp : 1, //[11]
  48. a_msdu_error : 1, //[12]
  49. fragment_flag : 1, //[13]
  50. order : 1, //[14]
  51. cce_match : 1, //[15]
  52. overflow_err : 1, //[16]
  53. msdu_length_err : 1, //[17]
  54. tcp_udp_chksum_fail : 1, //[18]
  55. ip_chksum_fail : 1, //[19]
  56. sa_idx_invalid : 1, //[20]
  57. da_idx_invalid : 1, //[21]
  58. reserved_1b : 1, //[22]
  59. rx_in_tx_decrypt_byp : 1, //[23]
  60. encrypt_required : 1, //[24]
  61. directed : 1, //[25]
  62. buffer_fragment : 1, //[26]
  63. mpdu_length_err : 1, //[27]
  64. tkip_mic_err : 1, //[28]
  65. decrypt_err : 1, //[29]
  66. unencrypted_frame_err : 1, //[30]
  67. fcs_err : 1; //[31]
  68. uint32_t flow_idx_timeout : 1, //[0]
  69. flow_idx_invalid : 1, //[1]
  70. wifi_parser_error : 1, //[2]
  71. amsdu_parser_error : 1, //[3]
  72. sa_idx_timeout : 1, //[4]
  73. da_idx_timeout : 1, //[5]
  74. msdu_limit_error : 1, //[6]
  75. da_is_valid : 1, //[7]
  76. da_is_mcbc : 1, //[8]
  77. sa_is_valid : 1, //[9]
  78. decrypt_status_code : 3, //[12:10]
  79. rx_bitmap_not_updated : 1, //[13]
  80. reserved_2 : 17, //[30:14]
  81. msdu_done : 1; //[31]
  82. };
  83. /*
  84. rxpcu_mpdu_filter_in_category
  85. Field indicates what the reason was that this MPDU frame
  86. was allowed to come into the receive path by RXPCU
  87. <enum 0 rxpcu_filter_pass> This MPDU passed the normal
  88. frame filter programming of rxpcu
  89. <enum 1 rxpcu_monitor_client> This MPDU did NOT pass the
  90. regular frame filter and would have been dropped, were it
  91. not for the frame fitting into the 'monitor_client'
  92. category.
  93. <enum 2 rxpcu_monitor_other> This MPDU did NOT pass the
  94. regular frame filter and also did not pass the
  95. rxpcu_monitor_client filter. It would have been dropped
  96. accept that it did pass the 'monitor_other' category.
  97. <legal 0-2>
  98. sw_frame_group_id
  99. SW processes frames based on certain classifications.
  100. This field indicates to what sw classification this MPDU is
  101. mapped.
  102. The classification is given in priority order
  103. <enum 0 sw_frame_group_NDP_frame>
  104. <enum 1 sw_frame_group_Multicast_data>
  105. <enum 2 sw_frame_group_Unicast_data>
  106. <enum 3 sw_frame_group_Null_data > This includes mpdus
  107. of type Data Null as well as QoS Data Null
  108. <enum 4 sw_frame_group_mgmt_0000 >
  109. <enum 5 sw_frame_group_mgmt_0001 >
  110. <enum 6 sw_frame_group_mgmt_0010 >
  111. <enum 7 sw_frame_group_mgmt_0011 >
  112. <enum 8 sw_frame_group_mgmt_0100 >
  113. <enum 9 sw_frame_group_mgmt_0101 >
  114. <enum 10 sw_frame_group_mgmt_0110 >
  115. <enum 11 sw_frame_group_mgmt_0111 >
  116. <enum 12 sw_frame_group_mgmt_1000 >
  117. <enum 13 sw_frame_group_mgmt_1001 >
  118. <enum 14 sw_frame_group_mgmt_1010 >
  119. <enum 15 sw_frame_group_mgmt_1011 >
  120. <enum 16 sw_frame_group_mgmt_1100 >
  121. <enum 17 sw_frame_group_mgmt_1101 >
  122. <enum 18 sw_frame_group_mgmt_1110 >
  123. <enum 19 sw_frame_group_mgmt_1111 >
  124. <enum 20 sw_frame_group_ctrl_0000 >
  125. <enum 21 sw_frame_group_ctrl_0001 >
  126. <enum 22 sw_frame_group_ctrl_0010 >
  127. <enum 23 sw_frame_group_ctrl_0011 >
  128. <enum 24 sw_frame_group_ctrl_0100 >
  129. <enum 25 sw_frame_group_ctrl_0101 >
  130. <enum 26 sw_frame_group_ctrl_0110 >
  131. <enum 27 sw_frame_group_ctrl_0111 >
  132. <enum 28 sw_frame_group_ctrl_1000 >
  133. <enum 29 sw_frame_group_ctrl_1001 >
  134. <enum 30 sw_frame_group_ctrl_1010 >
  135. <enum 31 sw_frame_group_ctrl_1011 >
  136. <enum 32 sw_frame_group_ctrl_1100 >
  137. <enum 33 sw_frame_group_ctrl_1101 >
  138. <enum 34 sw_frame_group_ctrl_1110 >
  139. <enum 35 sw_frame_group_ctrl_1111 >
  140. <enum 36 sw_frame_group_unsupported> This covers type 3
  141. and protocol version != 0
  142. <legal 0-37>
  143. reserved_0
  144. <legal 0>
  145. phy_ppdu_id
  146. A ppdu counter value that PHY increments for every PPDU
  147. received. The counter value wraps around
  148. <legal all>
  149. first_mpdu
  150. Indicates the first MSDU of the PPDU. If both
  151. first_mpdu and last_mpdu are set in the MSDU then this is a
  152. not an A-MPDU frame but a stand alone MPDU. Interior MPDU
  153. in an A-MPDU shall have both first_mpdu and last_mpdu bits
  154. set to 0. The PPDU start status will only be valid when
  155. this bit is set.
  156. reserved_1a
  157. <legal 0>
  158. mcast_bcast
  159. Multicast / broadcast indicator. Only set when the MAC
  160. address 1 bit 0 is set indicating mcast/bcast and the BSSID
  161. matches one of the 4 BSSID registers. Only set when
  162. first_msdu is set.
  163. ast_index_not_found
  164. Only valid when first_msdu is set.
  165. Indicates no AST matching entries within the the max
  166. search count.
  167. ast_index_timeout
  168. Only valid when first_msdu is set.
  169. Indicates an unsuccessful search in the address seach
  170. table due to timeout.
  171. power_mgmt
  172. Power management bit set in the 802.11 header. Only set
  173. when first_msdu is set.
  174. non_qos
  175. Set if packet is not a non-QoS data frame. Only set
  176. when first_msdu is set.
  177. null_data
  178. Set if frame type indicates either null data or QoS null
  179. data format. Only set when first_msdu is set.
  180. mgmt_type
  181. Set if packet is a management packet. Only set when
  182. first_msdu is set.
  183. ctrl_type
  184. Set if packet is a control packet. Only set when
  185. first_msdu is set.
  186. more_data
  187. Set if more bit in frame control is set. Only set when
  188. first_msdu is set.
  189. eosp
  190. Set if the EOSP (end of service period) bit in the QoS
  191. control field is set. Only set when first_msdu is set.
  192. a_msdu_error
  193. Set if number of MSDUs in A-MSDU is above a threshold or
  194. if the size of the MSDU is invalid. This receive buffer
  195. will contain all of the remainder of the MSDUs in this MPDU
  196. without decapsulation.
  197. fragment_flag
  198. Indicates that this is an 802.11 fragment frame. This
  199. is set when either the more_frag bit is set in the frame
  200. control or the fragment number is not zero. Only set when
  201. first_msdu is set.
  202. order
  203. Set if the order bit in the frame control is set. Only
  204. set when first_msdu is set.
  205. cce_match
  206. Indicates that this status has a corresponding MSDU that
  207. requires FW processing. The OLE will have classification
  208. ring mask registers which will indicate the ring(s) for
  209. packets and descriptors which need FW attention.
  210. overflow_err
  211. RXPCU Receive FIFO ran out of space to receive the full
  212. MPDU. Therefor this MPDU is terminated early and is thus
  213. corrupted.
  214. This MPDU will not be ACKed.
  215. RXPCU might still be able to correctly receive the
  216. following MPDUs in the PPDU if enough fifo space became
  217. available in time
  218. msdu_length_err
  219. Indicates that the MSDU length from the 802.3
  220. encapsulated length field extends beyond the MPDU boundary
  221. or if the length is less than 14 bytes.
  222. Merged with original other_msdu_err: Indicates that the
  223. MSDU threshold was exceeded and thus all the rest of the
  224. MSDUs will not be scattered and will not be decasulated but
  225. will be DMA'ed in RAW format as a single MSDU buffer
  226. tcp_udp_chksum_fail
  227. Indicates that the computed checksum (tcp_udp_chksum)
  228. did not match the checksum in the TCP/UDP header.
  229. ip_chksum_fail
  230. Indicates that the computed checksum did not match the
  231. checksum in the IP header.
  232. sa_idx_invalid
  233. Indicates no matching entry was found in the address
  234. search table for the source MAC address.
  235. da_idx_invalid
  236. Indicates no matching entry was found in the address
  237. search table for the destination MAC address.
  238. reserved_1b
  239. rx_in_tx_decrypt_byp
  240. Indicates that RX packet is not decrypted as Crypto is
  241. busy with TX packet processing.
  242. encrypt_required
  243. Indicates that this data type frame is not encrypted
  244. even if the policy for this MPDU requires encryption as
  245. indicated in the peer entry key type.
  246. directed
  247. MPDU is a directed packet which means that the RA
  248. matched our STA addresses. In proxySTA it means that the TA
  249. matched an entry in our address search table with the
  250. corresponding no_ack bit is the address search entry
  251. cleared.
  252. buffer_fragment
  253. Indicates that at least one of the rx buffers has been
  254. fragmented. If set the FW should look at the rx_frag_info
  255. descriptor described below.
  256. mpdu_length_err
  257. Indicates that the MPDU was pre-maturely terminated
  258. resulting in a truncated MPDU. Don't trust the MPDU length
  259. field.
  260. tkip_mic_err
  261. Indicates that the MPDU Michael integrity check failed
  262. decrypt_err
  263. Indicates that the MPDU decrypt integrity check failed
  264. or CRYPTO received an encrypted frame, but did not get a
  265. valid corresponding key id in the peer entry.
  266. unencrypted_frame_err
  267. Copied here by RX OLE from the RX_MPDU_END TLV
  268. fcs_err
  269. Indicates that the MPDU FCS check failed
  270. flow_idx_timeout
  271. Indicates an unsuccessful flow search due to the
  272. expiring of the search timer.
  273. <legal all>
  274. flow_idx_invalid
  275. flow id is not valid
  276. <legal all>
  277. wifi_parser_error
  278. Indicates that the WiFi frame has one of the following
  279. errors
  280. o has less than minimum allowed bytes as per standard
  281. o has incomplete VLAN LLC/SNAP (only for non A-MSDUs)
  282. <legal all>
  283. amsdu_parser_error
  284. A-MSDU could not be properly de-agregated.
  285. <legal all>
  286. sa_idx_timeout
  287. Indicates an unsuccessful MAC source address search due
  288. to the expiring of the search timer.
  289. da_idx_timeout
  290. Indicates an unsuccessful MAC destination address search
  291. due to the expiring of the search timer.
  292. msdu_limit_error
  293. Indicates that the MSDU threshold was exceeded and thus
  294. all the rest of the MSDUs will not be scattered and will not
  295. be decasulated but will be DMA'ed in RAW format as a single
  296. MSDU buffer
  297. da_is_valid
  298. Indicates that OLE found a valid DA entry
  299. da_is_mcbc
  300. Field Only valid if da_is_valid is set
  301. Indicates the DA address was a Multicast of Broadcast
  302. address.
  303. sa_is_valid
  304. Indicates that OLE found a valid SA entry
  305. decrypt_status_code
  306. Field provides insight into the decryption performed
  307. <enum 0 decrypt_ok> Frame had protection enabled and
  308. decrypted properly
  309. <enum 1 decrypt_unprotected_frame > Frame is unprotected
  310. and hence bypassed
  311. <enum 2 decrypt_data_err > Frame has protection enabled
  312. and could not be properly decrypted due to MIC/ICV mismatch
  313. etc.
  314. <enum 3 decrypt_key_invalid > Frame has protection
  315. enabled but the key that was required to decrypt this frame
  316. was not valid
  317. <enum 4 decrypt_peer_entry_invalid > Frame has
  318. protection enabled but the key that was required to decrypt
  319. this frame was not valid
  320. <enum 5 decrypt_other > Reserved for other indications
  321. <legal 0 - 5>
  322. rx_bitmap_not_updated
  323. Frame is received, but RXPCU could not update the
  324. receive bitmap due to (temporary) fifo contraints.
  325. <legal all>
  326. reserved_2
  327. <legal 0>
  328. msdu_done
  329. If set indicates that the RX packet data, RX header
  330. data, RX PPDU start descriptor, RX MPDU start/end
  331. descriptor, RX MSDU start/end descriptors and RX Attention
  332. descriptor are all valid. This bit must be in the last
  333. octet of the descriptor.
  334. */
  335. /* Description RX_ATTENTION_0_RXPCU_MPDU_FILTER_IN_CATEGORY
  336. Field indicates what the reason was that this MPDU frame
  337. was allowed to come into the receive path by RXPCU
  338. <enum 0 rxpcu_filter_pass> This MPDU passed the normal
  339. frame filter programming of rxpcu
  340. <enum 1 rxpcu_monitor_client> This MPDU did NOT pass the
  341. regular frame filter and would have been dropped, were it
  342. not for the frame fitting into the 'monitor_client'
  343. category.
  344. <enum 2 rxpcu_monitor_other> This MPDU did NOT pass the
  345. regular frame filter and also did not pass the
  346. rxpcu_monitor_client filter. It would have been dropped
  347. accept that it did pass the 'monitor_other' category.
  348. <legal 0-2>
  349. */
  350. #define RX_ATTENTION_0_RXPCU_MPDU_FILTER_IN_CATEGORY_OFFSET 0x00000000
  351. #define RX_ATTENTION_0_RXPCU_MPDU_FILTER_IN_CATEGORY_LSB 0
  352. #define RX_ATTENTION_0_RXPCU_MPDU_FILTER_IN_CATEGORY_MASK 0x00000003
  353. /* Description RX_ATTENTION_0_SW_FRAME_GROUP_ID
  354. SW processes frames based on certain classifications.
  355. This field indicates to what sw classification this MPDU is
  356. mapped.
  357. The classification is given in priority order
  358. <enum 0 sw_frame_group_NDP_frame>
  359. <enum 1 sw_frame_group_Multicast_data>
  360. <enum 2 sw_frame_group_Unicast_data>
  361. <enum 3 sw_frame_group_Null_data > This includes mpdus
  362. of type Data Null as well as QoS Data Null
  363. <enum 4 sw_frame_group_mgmt_0000 >
  364. <enum 5 sw_frame_group_mgmt_0001 >
  365. <enum 6 sw_frame_group_mgmt_0010 >
  366. <enum 7 sw_frame_group_mgmt_0011 >
  367. <enum 8 sw_frame_group_mgmt_0100 >
  368. <enum 9 sw_frame_group_mgmt_0101 >
  369. <enum 10 sw_frame_group_mgmt_0110 >
  370. <enum 11 sw_frame_group_mgmt_0111 >
  371. <enum 12 sw_frame_group_mgmt_1000 >
  372. <enum 13 sw_frame_group_mgmt_1001 >
  373. <enum 14 sw_frame_group_mgmt_1010 >
  374. <enum 15 sw_frame_group_mgmt_1011 >
  375. <enum 16 sw_frame_group_mgmt_1100 >
  376. <enum 17 sw_frame_group_mgmt_1101 >
  377. <enum 18 sw_frame_group_mgmt_1110 >
  378. <enum 19 sw_frame_group_mgmt_1111 >
  379. <enum 20 sw_frame_group_ctrl_0000 >
  380. <enum 21 sw_frame_group_ctrl_0001 >
  381. <enum 22 sw_frame_group_ctrl_0010 >
  382. <enum 23 sw_frame_group_ctrl_0011 >
  383. <enum 24 sw_frame_group_ctrl_0100 >
  384. <enum 25 sw_frame_group_ctrl_0101 >
  385. <enum 26 sw_frame_group_ctrl_0110 >
  386. <enum 27 sw_frame_group_ctrl_0111 >
  387. <enum 28 sw_frame_group_ctrl_1000 >
  388. <enum 29 sw_frame_group_ctrl_1001 >
  389. <enum 30 sw_frame_group_ctrl_1010 >
  390. <enum 31 sw_frame_group_ctrl_1011 >
  391. <enum 32 sw_frame_group_ctrl_1100 >
  392. <enum 33 sw_frame_group_ctrl_1101 >
  393. <enum 34 sw_frame_group_ctrl_1110 >
  394. <enum 35 sw_frame_group_ctrl_1111 >
  395. <enum 36 sw_frame_group_unsupported> This covers type 3
  396. and protocol version != 0
  397. <legal 0-37>
  398. */
  399. #define RX_ATTENTION_0_SW_FRAME_GROUP_ID_OFFSET 0x00000000
  400. #define RX_ATTENTION_0_SW_FRAME_GROUP_ID_LSB 2
  401. #define RX_ATTENTION_0_SW_FRAME_GROUP_ID_MASK 0x000001fc
  402. /* Description RX_ATTENTION_0_RESERVED_0
  403. <legal 0>
  404. */
  405. #define RX_ATTENTION_0_RESERVED_0_OFFSET 0x00000000
  406. #define RX_ATTENTION_0_RESERVED_0_LSB 9
  407. #define RX_ATTENTION_0_RESERVED_0_MASK 0x0000fe00
  408. /* Description RX_ATTENTION_0_PHY_PPDU_ID
  409. A ppdu counter value that PHY increments for every PPDU
  410. received. The counter value wraps around
  411. <legal all>
  412. */
  413. #define RX_ATTENTION_0_PHY_PPDU_ID_OFFSET 0x00000000
  414. #define RX_ATTENTION_0_PHY_PPDU_ID_LSB 16
  415. #define RX_ATTENTION_0_PHY_PPDU_ID_MASK 0xffff0000
  416. /* Description RX_ATTENTION_1_FIRST_MPDU
  417. Indicates the first MSDU of the PPDU. If both
  418. first_mpdu and last_mpdu are set in the MSDU then this is a
  419. not an A-MPDU frame but a stand alone MPDU. Interior MPDU
  420. in an A-MPDU shall have both first_mpdu and last_mpdu bits
  421. set to 0. The PPDU start status will only be valid when
  422. this bit is set.
  423. */
  424. #define RX_ATTENTION_1_FIRST_MPDU_OFFSET 0x00000004
  425. #define RX_ATTENTION_1_FIRST_MPDU_LSB 0
  426. #define RX_ATTENTION_1_FIRST_MPDU_MASK 0x00000001
  427. /* Description RX_ATTENTION_1_RESERVED_1A
  428. <legal 0>
  429. */
  430. #define RX_ATTENTION_1_RESERVED_1A_OFFSET 0x00000004
  431. #define RX_ATTENTION_1_RESERVED_1A_LSB 1
  432. #define RX_ATTENTION_1_RESERVED_1A_MASK 0x00000002
  433. /* Description RX_ATTENTION_1_MCAST_BCAST
  434. Multicast / broadcast indicator. Only set when the MAC
  435. address 1 bit 0 is set indicating mcast/bcast and the BSSID
  436. matches one of the 4 BSSID registers. Only set when
  437. first_msdu is set.
  438. */
  439. #define RX_ATTENTION_1_MCAST_BCAST_OFFSET 0x00000004
  440. #define RX_ATTENTION_1_MCAST_BCAST_LSB 2
  441. #define RX_ATTENTION_1_MCAST_BCAST_MASK 0x00000004
  442. /* Description RX_ATTENTION_1_AST_INDEX_NOT_FOUND
  443. Only valid when first_msdu is set.
  444. Indicates no AST matching entries within the the max
  445. search count.
  446. */
  447. #define RX_ATTENTION_1_AST_INDEX_NOT_FOUND_OFFSET 0x00000004
  448. #define RX_ATTENTION_1_AST_INDEX_NOT_FOUND_LSB 3
  449. #define RX_ATTENTION_1_AST_INDEX_NOT_FOUND_MASK 0x00000008
  450. /* Description RX_ATTENTION_1_AST_INDEX_TIMEOUT
  451. Only valid when first_msdu is set.
  452. Indicates an unsuccessful search in the address seach
  453. table due to timeout.
  454. */
  455. #define RX_ATTENTION_1_AST_INDEX_TIMEOUT_OFFSET 0x00000004
  456. #define RX_ATTENTION_1_AST_INDEX_TIMEOUT_LSB 4
  457. #define RX_ATTENTION_1_AST_INDEX_TIMEOUT_MASK 0x00000010
  458. /* Description RX_ATTENTION_1_POWER_MGMT
  459. Power management bit set in the 802.11 header. Only set
  460. when first_msdu is set.
  461. */
  462. #define RX_ATTENTION_1_POWER_MGMT_OFFSET 0x00000004
  463. #define RX_ATTENTION_1_POWER_MGMT_LSB 5
  464. #define RX_ATTENTION_1_POWER_MGMT_MASK 0x00000020
  465. /* Description RX_ATTENTION_1_NON_QOS
  466. Set if packet is not a non-QoS data frame. Only set
  467. when first_msdu is set.
  468. */
  469. #define RX_ATTENTION_1_NON_QOS_OFFSET 0x00000004
  470. #define RX_ATTENTION_1_NON_QOS_LSB 6
  471. #define RX_ATTENTION_1_NON_QOS_MASK 0x00000040
  472. /* Description RX_ATTENTION_1_NULL_DATA
  473. Set if frame type indicates either null data or QoS null
  474. data format. Only set when first_msdu is set.
  475. */
  476. #define RX_ATTENTION_1_NULL_DATA_OFFSET 0x00000004
  477. #define RX_ATTENTION_1_NULL_DATA_LSB 7
  478. #define RX_ATTENTION_1_NULL_DATA_MASK 0x00000080
  479. /* Description RX_ATTENTION_1_MGMT_TYPE
  480. Set if packet is a management packet. Only set when
  481. first_msdu is set.
  482. */
  483. #define RX_ATTENTION_1_MGMT_TYPE_OFFSET 0x00000004
  484. #define RX_ATTENTION_1_MGMT_TYPE_LSB 8
  485. #define RX_ATTENTION_1_MGMT_TYPE_MASK 0x00000100
  486. /* Description RX_ATTENTION_1_CTRL_TYPE
  487. Set if packet is a control packet. Only set when
  488. first_msdu is set.
  489. */
  490. #define RX_ATTENTION_1_CTRL_TYPE_OFFSET 0x00000004
  491. #define RX_ATTENTION_1_CTRL_TYPE_LSB 9
  492. #define RX_ATTENTION_1_CTRL_TYPE_MASK 0x00000200
  493. /* Description RX_ATTENTION_1_MORE_DATA
  494. Set if more bit in frame control is set. Only set when
  495. first_msdu is set.
  496. */
  497. #define RX_ATTENTION_1_MORE_DATA_OFFSET 0x00000004
  498. #define RX_ATTENTION_1_MORE_DATA_LSB 10
  499. #define RX_ATTENTION_1_MORE_DATA_MASK 0x00000400
  500. /* Description RX_ATTENTION_1_EOSP
  501. Set if the EOSP (end of service period) bit in the QoS
  502. control field is set. Only set when first_msdu is set.
  503. */
  504. #define RX_ATTENTION_1_EOSP_OFFSET 0x00000004
  505. #define RX_ATTENTION_1_EOSP_LSB 11
  506. #define RX_ATTENTION_1_EOSP_MASK 0x00000800
  507. /* Description RX_ATTENTION_1_A_MSDU_ERROR
  508. Set if number of MSDUs in A-MSDU is above a threshold or
  509. if the size of the MSDU is invalid. This receive buffer
  510. will contain all of the remainder of the MSDUs in this MPDU
  511. without decapsulation.
  512. */
  513. #define RX_ATTENTION_1_A_MSDU_ERROR_OFFSET 0x00000004
  514. #define RX_ATTENTION_1_A_MSDU_ERROR_LSB 12
  515. #define RX_ATTENTION_1_A_MSDU_ERROR_MASK 0x00001000
  516. /* Description RX_ATTENTION_1_FRAGMENT_FLAG
  517. Indicates that this is an 802.11 fragment frame. This
  518. is set when either the more_frag bit is set in the frame
  519. control or the fragment number is not zero. Only set when
  520. first_msdu is set.
  521. */
  522. #define RX_ATTENTION_1_FRAGMENT_FLAG_OFFSET 0x00000004
  523. #define RX_ATTENTION_1_FRAGMENT_FLAG_LSB 13
  524. #define RX_ATTENTION_1_FRAGMENT_FLAG_MASK 0x00002000
  525. /* Description RX_ATTENTION_1_ORDER
  526. Set if the order bit in the frame control is set. Only
  527. set when first_msdu is set.
  528. */
  529. #define RX_ATTENTION_1_ORDER_OFFSET 0x00000004
  530. #define RX_ATTENTION_1_ORDER_LSB 14
  531. #define RX_ATTENTION_1_ORDER_MASK 0x00004000
  532. /* Description RX_ATTENTION_1_CCE_MATCH
  533. Indicates that this status has a corresponding MSDU that
  534. requires FW processing. The OLE will have classification
  535. ring mask registers which will indicate the ring(s) for
  536. packets and descriptors which need FW attention.
  537. */
  538. #define RX_ATTENTION_1_CCE_MATCH_OFFSET 0x00000004
  539. #define RX_ATTENTION_1_CCE_MATCH_LSB 15
  540. #define RX_ATTENTION_1_CCE_MATCH_MASK 0x00008000
  541. /* Description RX_ATTENTION_1_OVERFLOW_ERR
  542. RXPCU Receive FIFO ran out of space to receive the full
  543. MPDU. Therefor this MPDU is terminated early and is thus
  544. corrupted.
  545. This MPDU will not be ACKed.
  546. RXPCU might still be able to correctly receive the
  547. following MPDUs in the PPDU if enough fifo space became
  548. available in time
  549. */
  550. #define RX_ATTENTION_1_OVERFLOW_ERR_OFFSET 0x00000004
  551. #define RX_ATTENTION_1_OVERFLOW_ERR_LSB 16
  552. #define RX_ATTENTION_1_OVERFLOW_ERR_MASK 0x00010000
  553. /* Description RX_ATTENTION_1_MSDU_LENGTH_ERR
  554. Indicates that the MSDU length from the 802.3
  555. encapsulated length field extends beyond the MPDU boundary
  556. or if the length is less than 14 bytes.
  557. Merged with original other_msdu_err: Indicates that the
  558. MSDU threshold was exceeded and thus all the rest of the
  559. MSDUs will not be scattered and will not be decasulated but
  560. will be DMA'ed in RAW format as a single MSDU buffer
  561. */
  562. #define RX_ATTENTION_1_MSDU_LENGTH_ERR_OFFSET 0x00000004
  563. #define RX_ATTENTION_1_MSDU_LENGTH_ERR_LSB 17
  564. #define RX_ATTENTION_1_MSDU_LENGTH_ERR_MASK 0x00020000
  565. /* Description RX_ATTENTION_1_TCP_UDP_CHKSUM_FAIL
  566. Indicates that the computed checksum (tcp_udp_chksum)
  567. did not match the checksum in the TCP/UDP header.
  568. */
  569. #define RX_ATTENTION_1_TCP_UDP_CHKSUM_FAIL_OFFSET 0x00000004
  570. #define RX_ATTENTION_1_TCP_UDP_CHKSUM_FAIL_LSB 18
  571. #define RX_ATTENTION_1_TCP_UDP_CHKSUM_FAIL_MASK 0x00040000
  572. /* Description RX_ATTENTION_1_IP_CHKSUM_FAIL
  573. Indicates that the computed checksum did not match the
  574. checksum in the IP header.
  575. */
  576. #define RX_ATTENTION_1_IP_CHKSUM_FAIL_OFFSET 0x00000004
  577. #define RX_ATTENTION_1_IP_CHKSUM_FAIL_LSB 19
  578. #define RX_ATTENTION_1_IP_CHKSUM_FAIL_MASK 0x00080000
  579. /* Description RX_ATTENTION_1_SA_IDX_INVALID
  580. Indicates no matching entry was found in the address
  581. search table for the source MAC address.
  582. */
  583. #define RX_ATTENTION_1_SA_IDX_INVALID_OFFSET 0x00000004
  584. #define RX_ATTENTION_1_SA_IDX_INVALID_LSB 20
  585. #define RX_ATTENTION_1_SA_IDX_INVALID_MASK 0x00100000
  586. /* Description RX_ATTENTION_1_DA_IDX_INVALID
  587. Indicates no matching entry was found in the address
  588. search table for the destination MAC address.
  589. */
  590. #define RX_ATTENTION_1_DA_IDX_INVALID_OFFSET 0x00000004
  591. #define RX_ATTENTION_1_DA_IDX_INVALID_LSB 21
  592. #define RX_ATTENTION_1_DA_IDX_INVALID_MASK 0x00200000
  593. /* Description RX_ATTENTION_1_RESERVED_1B
  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_