rx_attention.h 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178
  1. /*
  2. * Copyright (c) 2020, 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 in
  226. 'RX_MSDU_END') did not match the checksum in the TCP/UDP
  227. header.
  228. ip_chksum_fail
  229. Indicates that the computed checksum (ip_hdr_chksum in
  230. 'RX_MSDU_END') did not match the checksum in the IP header.
  231. sa_idx_invalid
  232. Indicates no matching entry was found in the address
  233. search table for the source MAC address.
  234. da_idx_invalid
  235. Indicates no matching entry was found in the address
  236. search table for the destination MAC address.
  237. reserved_1b
  238. <legal 0>
  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 in
  567. 'RX_MSDU_END') did not match the checksum in the TCP/UDP
  568. header.
  569. */
  570. #define RX_ATTENTION_1_TCP_UDP_CHKSUM_FAIL_OFFSET 0x00000004
  571. #define RX_ATTENTION_1_TCP_UDP_CHKSUM_FAIL_LSB 18
  572. #define RX_ATTENTION_1_TCP_UDP_CHKSUM_FAIL_MASK 0x00040000
  573. /* Description RX_ATTENTION_1_IP_CHKSUM_FAIL
  574. Indicates that the computed checksum (ip_hdr_chksum in
  575. 'RX_MSDU_END') did not match the checksum in the IP header.
  576. */
  577. #define RX_ATTENTION_1_IP_CHKSUM_FAIL_OFFSET 0x00000004
  578. #define RX_ATTENTION_1_IP_CHKSUM_FAIL_LSB 19
  579. #define RX_ATTENTION_1_IP_CHKSUM_FAIL_MASK 0x00080000
  580. /* Description RX_ATTENTION_1_SA_IDX_INVALID
  581. Indicates no matching entry was found in the address
  582. search table for the source MAC address.
  583. */
  584. #define RX_ATTENTION_1_SA_IDX_INVALID_OFFSET 0x00000004
  585. #define RX_ATTENTION_1_SA_IDX_INVALID_LSB 20
  586. #define RX_ATTENTION_1_SA_IDX_INVALID_MASK 0x00100000
  587. /* Description RX_ATTENTION_1_DA_IDX_INVALID
  588. Indicates no matching entry was found in the address
  589. search table for the destination MAC address.
  590. */
  591. #define RX_ATTENTION_1_DA_IDX_INVALID_OFFSET 0x00000004
  592. #define RX_ATTENTION_1_DA_IDX_INVALID_LSB 21
  593. #define RX_ATTENTION_1_DA_IDX_INVALID_MASK 0x00200000
  594. /* Description RX_ATTENTION_1_RESERVED_1B
  595. <legal 0>
  596. */
  597. #define RX_ATTENTION_1_RESERVED_1B_OFFSET 0x00000004
  598. #define RX_ATTENTION_1_RESERVED_1B_LSB 22
  599. #define RX_ATTENTION_1_RESERVED_1B_MASK 0x00400000
  600. /* Description RX_ATTENTION_1_RX_IN_TX_DECRYPT_BYP
  601. Indicates that RX packet is not decrypted as Crypto is
  602. busy with TX packet processing.
  603. */
  604. #define RX_ATTENTION_1_RX_IN_TX_DECRYPT_BYP_OFFSET 0x00000004
  605. #define RX_ATTENTION_1_RX_IN_TX_DECRYPT_BYP_LSB 23
  606. #define RX_ATTENTION_1_RX_IN_TX_DECRYPT_BYP_MASK 0x00800000
  607. /* Description RX_ATTENTION_1_ENCRYPT_REQUIRED
  608. Indicates that this data type frame is not encrypted
  609. even if the policy for this MPDU requires encryption as
  610. indicated in the peer entry key type.
  611. */
  612. #define RX_ATTENTION_1_ENCRYPT_REQUIRED_OFFSET 0x00000004
  613. #define RX_ATTENTION_1_ENCRYPT_REQUIRED_LSB 24
  614. #define RX_ATTENTION_1_ENCRYPT_REQUIRED_MASK 0x01000000
  615. /* Description RX_ATTENTION_1_DIRECTED
  616. MPDU is a directed packet which means that the RA
  617. matched our STA addresses. In proxySTA it means that the TA
  618. matched an entry in our address search table with the
  619. corresponding no_ack bit is the address search entry
  620. cleared.
  621. */
  622. #define RX_ATTENTION_1_DIRECTED_OFFSET 0x00000004
  623. #define RX_ATTENTION_1_DIRECTED_LSB 25
  624. #define RX_ATTENTION_1_DIRECTED_MASK 0x02000000
  625. /* Description RX_ATTENTION_1_BUFFER_FRAGMENT
  626. Indicates that at least one of the rx buffers has been
  627. fragmented. If set the FW should look at the rx_frag_info
  628. descriptor described below.
  629. */
  630. #define RX_ATTENTION_1_BUFFER_FRAGMENT_OFFSET 0x00000004
  631. #define RX_ATTENTION_1_BUFFER_FRAGMENT_LSB 26
  632. #define RX_ATTENTION_1_BUFFER_FRAGMENT_MASK 0x04000000
  633. /* Description RX_ATTENTION_1_MPDU_LENGTH_ERR
  634. Indicates that the MPDU was pre-maturely terminated
  635. resulting in a truncated MPDU. Don't trust the MPDU length
  636. field.
  637. */
  638. #define RX_ATTENTION_1_MPDU_LENGTH_ERR_OFFSET 0x00000004
  639. #define RX_ATTENTION_1_MPDU_LENGTH_ERR_LSB 27
  640. #define RX_ATTENTION_1_MPDU_LENGTH_ERR_MASK 0x08000000
  641. /* Description RX_ATTENTION_1_TKIP_MIC_ERR
  642. Indicates that the MPDU Michael integrity check failed
  643. */
  644. #define RX_ATTENTION_1_TKIP_MIC_ERR_OFFSET 0x00000004
  645. #define RX_ATTENTION_1_TKIP_MIC_ERR_LSB 28
  646. #define RX_ATTENTION_1_TKIP_MIC_ERR_MASK 0x10000000
  647. /* Description RX_ATTENTION_1_DECRYPT_ERR
  648. Indicates that the MPDU decrypt integrity check failed
  649. or CRYPTO received an encrypted frame, but did not get a
  650. valid corresponding key id in the peer entry.
  651. */
  652. #define RX_ATTENTION_1_DECRYPT_ERR_OFFSET 0x00000004
  653. #define RX_ATTENTION_1_DECRYPT_ERR_LSB 29
  654. #define RX_ATTENTION_1_DECRYPT_ERR_MASK 0x20000000
  655. /* Description RX_ATTENTION_1_UNENCRYPTED_FRAME_ERR
  656. Copied here by RX OLE from the RX_MPDU_END TLV
  657. */
  658. #define RX_ATTENTION_1_UNENCRYPTED_FRAME_ERR_OFFSET 0x00000004
  659. #define RX_ATTENTION_1_UNENCRYPTED_FRAME_ERR_LSB 30
  660. #define RX_ATTENTION_1_UNENCRYPTED_FRAME_ERR_MASK 0x40000000
  661. /* Description RX_ATTENTION_1_FCS_ERR
  662. Indicates that the MPDU FCS check failed
  663. */
  664. #define RX_ATTENTION_1_FCS_ERR_OFFSET 0x00000004
  665. #define RX_ATTENTION_1_FCS_ERR_LSB 31
  666. #define RX_ATTENTION_1_FCS_ERR_MASK 0x80000000
  667. /* Description RX_ATTENTION_2_FLOW_IDX_TIMEOUT
  668. Indicates an unsuccessful flow search due to the
  669. expiring of the search timer.
  670. <legal all>
  671. */
  672. #define RX_ATTENTION_2_FLOW_IDX_TIMEOUT_OFFSET 0x00000008
  673. #define RX_ATTENTION_2_FLOW_IDX_TIMEOUT_LSB 0
  674. #define RX_ATTENTION_2_FLOW_IDX_TIMEOUT_MASK 0x00000001
  675. /* Description RX_ATTENTION_2_FLOW_IDX_INVALID
  676. flow id is not valid
  677. <legal all>
  678. */
  679. #define RX_ATTENTION_2_FLOW_IDX_INVALID_OFFSET 0x00000008
  680. #define RX_ATTENTION_2_FLOW_IDX_INVALID_LSB 1
  681. #define RX_ATTENTION_2_FLOW_IDX_INVALID_MASK 0x00000002
  682. /* Description RX_ATTENTION_2_WIFI_PARSER_ERROR
  683. Indicates that the WiFi frame has one of the following
  684. errors
  685. o has less than minimum allowed bytes as per standard
  686. o has incomplete VLAN LLC/SNAP (only for non A-MSDUs)
  687. <legal all>
  688. */
  689. #define RX_ATTENTION_2_WIFI_PARSER_ERROR_OFFSET 0x00000008
  690. #define RX_ATTENTION_2_WIFI_PARSER_ERROR_LSB 2
  691. #define RX_ATTENTION_2_WIFI_PARSER_ERROR_MASK 0x00000004
  692. /* Description RX_ATTENTION_2_AMSDU_PARSER_ERROR
  693. A-MSDU could not be properly de-agregated.
  694. <legal all>
  695. */
  696. #define RX_ATTENTION_2_AMSDU_PARSER_ERROR_OFFSET 0x00000008
  697. #define RX_ATTENTION_2_AMSDU_PARSER_ERROR_LSB 3
  698. #define RX_ATTENTION_2_AMSDU_PARSER_ERROR_MASK 0x00000008
  699. /* Description RX_ATTENTION_2_SA_IDX_TIMEOUT
  700. Indicates an unsuccessful MAC source address search due
  701. to the expiring of the search timer.
  702. */
  703. #define RX_ATTENTION_2_SA_IDX_TIMEOUT_OFFSET 0x00000008
  704. #define RX_ATTENTION_2_SA_IDX_TIMEOUT_LSB 4
  705. #define RX_ATTENTION_2_SA_IDX_TIMEOUT_MASK 0x00000010
  706. /* Description RX_ATTENTION_2_DA_IDX_TIMEOUT
  707. Indicates an unsuccessful MAC destination address search
  708. due to the expiring of the search timer.
  709. */
  710. #define RX_ATTENTION_2_DA_IDX_TIMEOUT_OFFSET 0x00000008
  711. #define RX_ATTENTION_2_DA_IDX_TIMEOUT_LSB 5
  712. #define RX_ATTENTION_2_DA_IDX_TIMEOUT_MASK 0x00000020
  713. /* Description RX_ATTENTION_2_MSDU_LIMIT_ERROR
  714. Indicates that the MSDU threshold was exceeded and thus
  715. all the rest of the MSDUs will not be scattered and will not
  716. be decasulated but will be DMA'ed in RAW format as a single
  717. MSDU buffer
  718. */
  719. #define RX_ATTENTION_2_MSDU_LIMIT_ERROR_OFFSET 0x00000008
  720. #define RX_ATTENTION_2_MSDU_LIMIT_ERROR_LSB 6
  721. #define RX_ATTENTION_2_MSDU_LIMIT_ERROR_MASK 0x00000040
  722. /* Description RX_ATTENTION_2_DA_IS_VALID
  723. Indicates that OLE found a valid DA entry
  724. */
  725. #define RX_ATTENTION_2_DA_IS_VALID_OFFSET 0x00000008
  726. #define RX_ATTENTION_2_DA_IS_VALID_LSB 7
  727. #define RX_ATTENTION_2_DA_IS_VALID_MASK 0x00000080
  728. /* Description RX_ATTENTION_2_DA_IS_MCBC
  729. Field Only valid if da_is_valid is set
  730. Indicates the DA address was a Multicast of Broadcast
  731. address.
  732. */
  733. #define RX_ATTENTION_2_DA_IS_MCBC_OFFSET 0x00000008
  734. #define RX_ATTENTION_2_DA_IS_MCBC_LSB 8
  735. #define RX_ATTENTION_2_DA_IS_MCBC_MASK 0x00000100
  736. /* Description RX_ATTENTION_2_SA_IS_VALID
  737. Indicates that OLE found a valid SA entry
  738. */
  739. #define RX_ATTENTION_2_SA_IS_VALID_OFFSET 0x00000008
  740. #define RX_ATTENTION_2_SA_IS_VALID_LSB 9
  741. #define RX_ATTENTION_2_SA_IS_VALID_MASK 0x00000200
  742. /* Description RX_ATTENTION_2_DECRYPT_STATUS_CODE
  743. Field provides insight into the decryption performed
  744. <enum 0 decrypt_ok> Frame had protection enabled and
  745. decrypted properly
  746. <enum 1 decrypt_unprotected_frame > Frame is unprotected
  747. and hence bypassed
  748. <enum 2 decrypt_data_err > Frame has protection enabled
  749. and could not be properly decrypted due to MIC/ICV mismatch
  750. etc.
  751. <enum 3 decrypt_key_invalid > Frame has protection
  752. enabled but the key that was required to decrypt this frame
  753. was not valid
  754. <enum 4 decrypt_peer_entry_invalid > Frame has
  755. protection enabled but the key that was required to decrypt
  756. this frame was not valid
  757. <enum 5 decrypt_other > Reserved for other indications
  758. <legal 0 - 5>
  759. */
  760. #define RX_ATTENTION_2_DECRYPT_STATUS_CODE_OFFSET 0x00000008
  761. #define RX_ATTENTION_2_DECRYPT_STATUS_CODE_LSB 10
  762. #define RX_ATTENTION_2_DECRYPT_STATUS_CODE_MASK 0x00001c00
  763. /* Description RX_ATTENTION_2_RX_BITMAP_NOT_UPDATED
  764. Frame is received, but RXPCU could not update the
  765. receive bitmap due to (temporary) fifo contraints.
  766. <legal all>
  767. */
  768. #define RX_ATTENTION_2_RX_BITMAP_NOT_UPDATED_OFFSET 0x00000008
  769. #define RX_ATTENTION_2_RX_BITMAP_NOT_UPDATED_LSB 13
  770. #define RX_ATTENTION_2_RX_BITMAP_NOT_UPDATED_MASK 0x00002000
  771. /* Description RX_ATTENTION_2_RESERVED_2
  772. <legal 0>
  773. */
  774. #define RX_ATTENTION_2_RESERVED_2_OFFSET 0x00000008
  775. #define RX_ATTENTION_2_RESERVED_2_LSB 14
  776. #define RX_ATTENTION_2_RESERVED_2_MASK 0x7fffc000
  777. /* Description RX_ATTENTION_2_MSDU_DONE
  778. If set indicates that the RX packet data, RX header
  779. data, RX PPDU start descriptor, RX MPDU start/end
  780. descriptor, RX MSDU start/end descriptors and RX Attention
  781. descriptor are all valid. This bit must be in the last
  782. octet of the descriptor.
  783. */
  784. #define RX_ATTENTION_2_MSDU_DONE_OFFSET 0x00000008
  785. #define RX_ATTENTION_2_MSDU_DONE_LSB 31
  786. #define RX_ATTENTION_2_MSDU_DONE_MASK 0x80000000
  787. #endif // _RX_ATTENTION_H_