rx_msdu_start.h 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135
  1. /*
  2. * Copyright (c) 2021 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. // $ATH_LICENSE_HW_HDR_C$
  17. //
  18. // DO NOT EDIT! This file is automatically generated
  19. // These definitions are tied to a particular hardware layout
  20. #ifndef _RX_MSDU_START_H_
  21. #define _RX_MSDU_START_H_
  22. #if !defined(__ASSEMBLER__)
  23. #endif
  24. // ################ START SUMMARY #################
  25. //
  26. // Dword Fields
  27. // 0 rxpcu_mpdu_filter_in_category[1:0], sw_frame_group_id[8:2], reserved_0[15:9], phy_ppdu_id[31:16]
  28. // 1 msdu_length[13:0], reserved_1a[14], ipsec_esp[15], l3_offset[22:16], ipsec_ah[23], l4_offset[31:24]
  29. // 2 msdu_number[7:0], decap_format[9:8], ipv4_proto[10], ipv6_proto[11], tcp_proto[12], udp_proto[13], ip_frag[14], tcp_only_ack[15], da_is_bcast_mcast[16], toeplitz_hash_sel[18:17], ip_fixed_header_valid[19], ip_extn_header_valid[20], tcp_udp_header_valid[21], mesh_control_present[22], ldpc[23], ip4_protocol_ip6_next_header[31:24]
  30. // 3 toeplitz_hash_2_or_4[31:0]
  31. // 4 flow_id_toeplitz[31:0]
  32. // 5 user_rssi[7:0], pkt_type[11:8], stbc[12], sgi[14:13], rate_mcs[18:15], receive_bandwidth[20:19], reception_type[23:21], mimo_ss_bitmap[31:24]
  33. // 6 ppdu_start_timestamp[31:0]
  34. // 7 sw_phy_meta_data[31:0]
  35. //
  36. // ################ END SUMMARY #################
  37. #define NUM_OF_DWORDS_RX_MSDU_START 8
  38. struct rx_msdu_start {
  39. uint32_t rxpcu_mpdu_filter_in_category : 2, //[1:0]
  40. sw_frame_group_id : 7, //[8:2]
  41. reserved_0 : 7, //[15:9]
  42. phy_ppdu_id : 16; //[31:16]
  43. uint32_t msdu_length : 14, //[13:0]
  44. reserved_1a : 1, //[14]
  45. ipsec_esp : 1, //[15]
  46. l3_offset : 7, //[22:16]
  47. ipsec_ah : 1, //[23]
  48. l4_offset : 8; //[31:24]
  49. uint32_t msdu_number : 8, //[7:0]
  50. decap_format : 2, //[9:8]
  51. ipv4_proto : 1, //[10]
  52. ipv6_proto : 1, //[11]
  53. tcp_proto : 1, //[12]
  54. udp_proto : 1, //[13]
  55. ip_frag : 1, //[14]
  56. tcp_only_ack : 1, //[15]
  57. da_is_bcast_mcast : 1, //[16]
  58. toeplitz_hash_sel : 2, //[18:17]
  59. ip_fixed_header_valid : 1, //[19]
  60. ip_extn_header_valid : 1, //[20]
  61. tcp_udp_header_valid : 1, //[21]
  62. mesh_control_present : 1, //[22]
  63. ldpc : 1, //[23]
  64. ip4_protocol_ip6_next_header : 8; //[31:24]
  65. uint32_t toeplitz_hash_2_or_4 : 32; //[31:0]
  66. uint32_t flow_id_toeplitz : 32; //[31:0]
  67. uint32_t user_rssi : 8, //[7:0]
  68. pkt_type : 4, //[11:8]
  69. stbc : 1, //[12]
  70. sgi : 2, //[14:13]
  71. rate_mcs : 4, //[18:15]
  72. receive_bandwidth : 2, //[20:19]
  73. reception_type : 3, //[23:21]
  74. mimo_ss_bitmap : 8; //[31:24]
  75. uint32_t ppdu_start_timestamp : 32; //[31:0]
  76. uint32_t sw_phy_meta_data : 32; //[31:0]
  77. };
  78. /*
  79. rxpcu_mpdu_filter_in_category
  80. Field indicates what the reason was that this MPDU frame
  81. was allowed to come into the receive path by RXPCU
  82. <enum 0 rxpcu_filter_pass> This MPDU passed the normal
  83. frame filter programming of rxpcu
  84. <enum 1 rxpcu_monitor_client> This MPDU did NOT pass the
  85. regular frame filter and would have been dropped, were it
  86. not for the frame fitting into the 'monitor_client'
  87. category.
  88. <enum 2 rxpcu_monitor_other> This MPDU did NOT pass the
  89. regular frame filter and also did not pass the
  90. rxpcu_monitor_client filter. It would have been dropped
  91. accept that it did pass the 'monitor_other' category.
  92. <legal 0-2>
  93. sw_frame_group_id
  94. SW processes frames based on certain classifications.
  95. This field indicates to what sw classification this MPDU is
  96. mapped.
  97. The classification is given in priority order
  98. <enum 0 sw_frame_group_NDP_frame>
  99. <enum 1 sw_frame_group_Multicast_data>
  100. <enum 2 sw_frame_group_Unicast_data>
  101. <enum 3 sw_frame_group_Null_data > This includes mpdus
  102. of type Data Null as well as QoS Data Null
  103. <enum 4 sw_frame_group_mgmt_0000 >
  104. <enum 5 sw_frame_group_mgmt_0001 >
  105. <enum 6 sw_frame_group_mgmt_0010 >
  106. <enum 7 sw_frame_group_mgmt_0011 >
  107. <enum 8 sw_frame_group_mgmt_0100 >
  108. <enum 9 sw_frame_group_mgmt_0101 >
  109. <enum 10 sw_frame_group_mgmt_0110 >
  110. <enum 11 sw_frame_group_mgmt_0111 >
  111. <enum 12 sw_frame_group_mgmt_1000 >
  112. <enum 13 sw_frame_group_mgmt_1001 >
  113. <enum 14 sw_frame_group_mgmt_1010 >
  114. <enum 15 sw_frame_group_mgmt_1011 >
  115. <enum 16 sw_frame_group_mgmt_1100 >
  116. <enum 17 sw_frame_group_mgmt_1101 >
  117. <enum 18 sw_frame_group_mgmt_1110 >
  118. <enum 19 sw_frame_group_mgmt_1111 >
  119. <enum 20 sw_frame_group_ctrl_0000 >
  120. <enum 21 sw_frame_group_ctrl_0001 >
  121. <enum 22 sw_frame_group_ctrl_0010 >
  122. <enum 23 sw_frame_group_ctrl_0011 >
  123. <enum 24 sw_frame_group_ctrl_0100 >
  124. <enum 25 sw_frame_group_ctrl_0101 >
  125. <enum 26 sw_frame_group_ctrl_0110 >
  126. <enum 27 sw_frame_group_ctrl_0111 >
  127. <enum 28 sw_frame_group_ctrl_1000 >
  128. <enum 29 sw_frame_group_ctrl_1001 >
  129. <enum 30 sw_frame_group_ctrl_1010 >
  130. <enum 31 sw_frame_group_ctrl_1011 >
  131. <enum 32 sw_frame_group_ctrl_1100 >
  132. <enum 33 sw_frame_group_ctrl_1101 >
  133. <enum 34 sw_frame_group_ctrl_1110 >
  134. <enum 35 sw_frame_group_ctrl_1111 >
  135. <enum 36 sw_frame_group_unsupported> This covers type 3
  136. and protocol version != 0
  137. <legal 0-37>
  138. reserved_0
  139. <legal 0>
  140. phy_ppdu_id
  141. A ppdu counter value that PHY increments for every PPDU
  142. received. The counter value wraps around
  143. <legal all>
  144. msdu_length
  145. MSDU length in bytes after decapsulation.
  146. This field is still valid for MPDU frames without
  147. reserved_1a
  148. <legal 0>
  149. ipsec_esp
  150. Set if IPv4/v6 packet is using IPsec ESP
  151. l3_offset
  152. Depending upon mode bit, this field either indicates the
  153. L3 offset in bytes from the start of the RX_HEADER or the IP
  154. offset in bytes from the start of the packet after
  155. decapsulation.  The latter is only valid if ipv4_proto or
  156. ipv6_proto is set.
  157. ipsec_ah
  158. Set if IPv4/v6 packet is using IPsec AH
  159. l4_offset
  160. Depending upon mode bit, this field either indicates the
  161. L4 offset nin bytes from the start of RX_HEADER(only valid
  162. if either ipv4_proto or ipv6_proto is set to 1) or indicates
  163. the offset in bytes to the start of TCP or UDP header from
  164. the start of the IP header after decapsulation(Only valid if
  165. tcp_proto or udp_proto is set).  The value 0 indicates that
  166. the offset is longer than 127 bytes.
  167. msdu_number
  168. Indicates the MSDU number within a MPDU. This value is
  169. reset to zero at the start of each MPDU. If the number of
  170. MSDU exceeds 255 this number will wrap using modulo 256.
  171. decap_format
  172. Indicates the format after decapsulation:
  173. <enum 0 RAW> No encapsulation
  174. <enum 1 Native_WiFi>
  175. <enum 2 Ethernet> Ethernet 2 (DIX) or 802.3 (uses
  176. SNAP/LLC)
  177. <enum 3 802_3> Indicate Ethernet
  178. <legal all>
  179. ipv4_proto
  180. Set if L2 layer indicates IPv4 protocol.
  181. ipv6_proto
  182. Set if L2 layer indicates IPv6 protocol.
  183. tcp_proto
  184. Set if the ipv4_proto or ipv6_proto are set and the IP
  185. protocol indicates TCP.
  186. udp_proto
  187. Set if the ipv4_proto or ipv6_proto are set and the IP
  188. protocol indicates UDP.
  189. ip_frag
  190. Indicates that either the IP More frag bit is set or IP
  191. frag number is non-zero. If set indicates that this is a
  192. fragmented IP packet.
  193. tcp_only_ack
  194. Set if only the TCP Ack bit is set in the TCP flags and
  195. if the TCP payload is 0.
  196. da_is_bcast_mcast
  197. The destination address is broadcast or multicast.
  198. toeplitz_hash_sel
  199. Actual choosen Hash.
  200. 0 -> Toeplitz hash of 2-tuple (IP source address, IP
  201. destination address)1 -> Toeplitz hash of 4-tuple (IP source
  202. address, IP destination address, L4 (TCP/UDP) source port,
  203. L4 (TCP/UDP) destination port)
  204. 2 -> Toeplitz of flow_id
  205. 3 -> Zero is used
  206. <legal all>
  207. ip_fixed_header_valid
  208. Fixed 20-byte IPv4 header or 40-byte IPv6 header parsed
  209. fully within first 256 bytes of the packet
  210. ip_extn_header_valid
  211. IPv6/IPv6 header, including IPv4 options and
  212. recognizable extension headers parsed fully within first 256
  213. bytes of the packet
  214. tcp_udp_header_valid
  215. Fixed 20-byte TCP (excluding TCP options) or 8-byte UDP
  216. header parsed fully within first 256 bytes of the packet
  217. mesh_control_present
  218. When set, this MSDU includes the 'Mesh Control' field
  219. <legal all>
  220. ldpc
  221. <legal all>
  222. ip4_protocol_ip6_next_header
  223. For IPv4 this is the 8 bit protocol field (when
  224. ipv4_proto is set). For IPv6 this is the 8 bit next_header
  225. field (when ipv6_proto is set).
  226. toeplitz_hash_2_or_4
  227. Controlled by RxOLE register - If register bit set to 0,
  228. Toeplitz hash is computed over 2-tuple IPv4 or IPv6 src/dest
  229. addresses; otherwise, toeplitz hash is computed over 4-tuple
  230. IPv4 or IPv6 src/dest addresses and src/dest ports
  231. flow_id_toeplitz
  232. Toeplitz hash of 5-tuple
  233. {IP source address, IP destination address, IP source
  234. port, IP destination port, L4 protocol} in case of
  235. non-IPSec.
  236. In case of IPSec - Toeplitz hash of 4-tuple
  237. {IP source address, IP destination address, SPI, L4
  238. protocol}
  239. The relevant Toeplitz key registers are provided in
  240. RxOLE's instance of common parser module. These registers
  241. are separate from the Toeplitz keys used by ASE/FSE modules
  242. inside RxOLE.The actual value will be passed on from common
  243. parser module to RxOLE in one of the WHO_* TLVs.
  244. <legal all>
  245. user_rssi
  246. RSSI for this user
  247. <legal all>
  248. pkt_type
  249. Packet type:
  250. <enum 0 dot11a>802.11a PPDU type
  251. <enum 1 dot11b>802.11b PPDU type
  252. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  253. <enum 3 dot11ac>802.11ac PPDU type
  254. <enum 4 dot11ax>802.11ax PPDU type
  255. stbc
  256. When set, use STBC transmission rates
  257. sgi
  258. Field only valid when pkt type is HT, VHT or HE.
  259. <enum 0 0_8_us_sgi > Legacy normal GI. Can also be
  260. used for HE
  261. <enum 1 0_4_us_sgi > Legacy short GI. Can also be
  262. used for HE
  263. <enum 2 1_6_us_sgi > HE related GI
  264. <enum 3 3_2_us_sgi > HE related GI
  265. <legal 0 - 3>
  266. rate_mcs
  267. For details, refer to MCS_TYPE description
  268. Note: This is rate in case of 11a/11b
  269. <legal all>
  270. receive_bandwidth
  271. Full receive Bandwidth
  272. <enum 0 full_rx_bw_20_mhz>
  273. <enum 1 full_rx_bw_40_mhz>
  274. <enum 2 full_rx_bw_80_mhz>
  275. <enum 3 full_rx_bw_160_mhz>
  276. <legal 0-3>
  277. reception_type
  278. Indicates what type of reception this is.
  279. <enum 0 reception_type_SU > Basic SU reception (not
  280. part of OFDMA or MIMO)
  281. <enum 1 reception_type_MU_MIMO > This is related to
  282. DL type of reception
  283. <enum 2 reception_type_MU_OFDMA > This is related
  284. to DL type of reception
  285. <enum 3 reception_type_MU_OFDMA_MIMO > This is
  286. related to DL type of reception
  287. <enum 4 reception_type_UL_MU_MIMO > This is related
  288. to UL type of reception
  289. <enum 5 reception_type_UL_MU_OFDMA > This is
  290. related to UL type of reception
  291. <enum 6 reception_type_UL_MU_OFDMA_MIMO > This is
  292. related to UL type of reception
  293. <legal 0-6>
  294. mimo_ss_bitmap
  295. Field only valid when Reception_type =
  296. reception_type_MU_MIMO or reception_type_MU_OFDMA_MIMO
  297. Bitmap, with each bit indicating if the related spatial
  298. stream is used for this STA
  299. LSB related to SS 0
  300. 0: spatial stream not used for this reception
  301. 1: spatial stream used for this reception
  302. <legal all>
  303. ppdu_start_timestamp
  304. Timestamp that indicates when the PPDU that contained
  305. this MPDU started on the medium.
  306. <legal all>
  307. sw_phy_meta_data
  308. SW programmed Meta data provided by the PHY.
  309. Can be used for SW to indicate the channel the device is
  310. on.
  311. <legal all>
  312. */
  313. /* Description RX_MSDU_START_0_RXPCU_MPDU_FILTER_IN_CATEGORY
  314. Field indicates what the reason was that this MPDU frame
  315. was allowed to come into the receive path by RXPCU
  316. <enum 0 rxpcu_filter_pass> This MPDU passed the normal
  317. frame filter programming of rxpcu
  318. <enum 1 rxpcu_monitor_client> This MPDU did NOT pass the
  319. regular frame filter and would have been dropped, were it
  320. not for the frame fitting into the 'monitor_client'
  321. category.
  322. <enum 2 rxpcu_monitor_other> This MPDU did NOT pass the
  323. regular frame filter and also did not pass the
  324. rxpcu_monitor_client filter. It would have been dropped
  325. accept that it did pass the 'monitor_other' category.
  326. <legal 0-2>
  327. */
  328. #define RX_MSDU_START_0_RXPCU_MPDU_FILTER_IN_CATEGORY_OFFSET 0x00000000
  329. #define RX_MSDU_START_0_RXPCU_MPDU_FILTER_IN_CATEGORY_LSB 0
  330. #define RX_MSDU_START_0_RXPCU_MPDU_FILTER_IN_CATEGORY_MASK 0x00000003
  331. /* Description RX_MSDU_START_0_SW_FRAME_GROUP_ID
  332. SW processes frames based on certain classifications.
  333. This field indicates to what sw classification this MPDU is
  334. mapped.
  335. The classification is given in priority order
  336. <enum 0 sw_frame_group_NDP_frame>
  337. <enum 1 sw_frame_group_Multicast_data>
  338. <enum 2 sw_frame_group_Unicast_data>
  339. <enum 3 sw_frame_group_Null_data > This includes mpdus
  340. of type Data Null as well as QoS Data Null
  341. <enum 4 sw_frame_group_mgmt_0000 >
  342. <enum 5 sw_frame_group_mgmt_0001 >
  343. <enum 6 sw_frame_group_mgmt_0010 >
  344. <enum 7 sw_frame_group_mgmt_0011 >
  345. <enum 8 sw_frame_group_mgmt_0100 >
  346. <enum 9 sw_frame_group_mgmt_0101 >
  347. <enum 10 sw_frame_group_mgmt_0110 >
  348. <enum 11 sw_frame_group_mgmt_0111 >
  349. <enum 12 sw_frame_group_mgmt_1000 >
  350. <enum 13 sw_frame_group_mgmt_1001 >
  351. <enum 14 sw_frame_group_mgmt_1010 >
  352. <enum 15 sw_frame_group_mgmt_1011 >
  353. <enum 16 sw_frame_group_mgmt_1100 >
  354. <enum 17 sw_frame_group_mgmt_1101 >
  355. <enum 18 sw_frame_group_mgmt_1110 >
  356. <enum 19 sw_frame_group_mgmt_1111 >
  357. <enum 20 sw_frame_group_ctrl_0000 >
  358. <enum 21 sw_frame_group_ctrl_0001 >
  359. <enum 22 sw_frame_group_ctrl_0010 >
  360. <enum 23 sw_frame_group_ctrl_0011 >
  361. <enum 24 sw_frame_group_ctrl_0100 >
  362. <enum 25 sw_frame_group_ctrl_0101 >
  363. <enum 26 sw_frame_group_ctrl_0110 >
  364. <enum 27 sw_frame_group_ctrl_0111 >
  365. <enum 28 sw_frame_group_ctrl_1000 >
  366. <enum 29 sw_frame_group_ctrl_1001 >
  367. <enum 30 sw_frame_group_ctrl_1010 >
  368. <enum 31 sw_frame_group_ctrl_1011 >
  369. <enum 32 sw_frame_group_ctrl_1100 >
  370. <enum 33 sw_frame_group_ctrl_1101 >
  371. <enum 34 sw_frame_group_ctrl_1110 >
  372. <enum 35 sw_frame_group_ctrl_1111 >
  373. <enum 36 sw_frame_group_unsupported> This covers type 3
  374. and protocol version != 0
  375. <legal 0-37>
  376. */
  377. #define RX_MSDU_START_0_SW_FRAME_GROUP_ID_OFFSET 0x00000000
  378. #define RX_MSDU_START_0_SW_FRAME_GROUP_ID_LSB 2
  379. #define RX_MSDU_START_0_SW_FRAME_GROUP_ID_MASK 0x000001fc
  380. /* Description RX_MSDU_START_0_RESERVED_0
  381. <legal 0>
  382. */
  383. #define RX_MSDU_START_0_RESERVED_0_OFFSET 0x00000000
  384. #define RX_MSDU_START_0_RESERVED_0_LSB 9
  385. #define RX_MSDU_START_0_RESERVED_0_MASK 0x0000fe00
  386. /* Description RX_MSDU_START_0_PHY_PPDU_ID
  387. A ppdu counter value that PHY increments for every PPDU
  388. received. The counter value wraps around
  389. <legal all>
  390. */
  391. #define RX_MSDU_START_0_PHY_PPDU_ID_OFFSET 0x00000000
  392. #define RX_MSDU_START_0_PHY_PPDU_ID_LSB 16
  393. #define RX_MSDU_START_0_PHY_PPDU_ID_MASK 0xffff0000
  394. /* Description RX_MSDU_START_1_MSDU_LENGTH
  395. MSDU length in bytes after decapsulation.
  396. This field is still valid for MPDU frames without
  397. */
  398. #define RX_MSDU_START_1_MSDU_LENGTH_OFFSET 0x00000004
  399. #define RX_MSDU_START_1_MSDU_LENGTH_LSB 0
  400. #define RX_MSDU_START_1_MSDU_LENGTH_MASK 0x00003fff
  401. /* Description RX_MSDU_START_1_RESERVED_1A
  402. <legal 0>
  403. */
  404. #define RX_MSDU_START_1_RESERVED_1A_OFFSET 0x00000004
  405. #define RX_MSDU_START_1_RESERVED_1A_LSB 14
  406. #define RX_MSDU_START_1_RESERVED_1A_MASK 0x00004000
  407. /* Description RX_MSDU_START_1_IPSEC_ESP
  408. Set if IPv4/v6 packet is using IPsec ESP
  409. */
  410. #define RX_MSDU_START_1_IPSEC_ESP_OFFSET 0x00000004
  411. #define RX_MSDU_START_1_IPSEC_ESP_LSB 15
  412. #define RX_MSDU_START_1_IPSEC_ESP_MASK 0x00008000
  413. /* Description RX_MSDU_START_1_L3_OFFSET
  414. Depending upon mode bit, this field either indicates the
  415. L3 offset in bytes from the start of the RX_HEADER or the IP
  416. offset in bytes from the start of the packet after
  417. decapsulation.  The latter is only valid if ipv4_proto or
  418. ipv6_proto is set.
  419. */
  420. #define RX_MSDU_START_1_L3_OFFSET_OFFSET 0x00000004
  421. #define RX_MSDU_START_1_L3_OFFSET_LSB 16
  422. #define RX_MSDU_START_1_L3_OFFSET_MASK 0x007f0000
  423. /* Description RX_MSDU_START_1_IPSEC_AH
  424. Set if IPv4/v6 packet is using IPsec AH
  425. */
  426. #define RX_MSDU_START_1_IPSEC_AH_OFFSET 0x00000004
  427. #define RX_MSDU_START_1_IPSEC_AH_LSB 23
  428. #define RX_MSDU_START_1_IPSEC_AH_MASK 0x00800000
  429. /* Description RX_MSDU_START_1_L4_OFFSET
  430. Depending upon mode bit, this field either indicates the
  431. L4 offset nin bytes from the start of RX_HEADER(only valid
  432. if either ipv4_proto or ipv6_proto is set to 1) or indicates
  433. the offset in bytes to the start of TCP or UDP header from
  434. the start of the IP header after decapsulation(Only valid if
  435. tcp_proto or udp_proto is set).  The value 0 indicates that
  436. the offset is longer than 127 bytes.
  437. */
  438. #define RX_MSDU_START_1_L4_OFFSET_OFFSET 0x00000004
  439. #define RX_MSDU_START_1_L4_OFFSET_LSB 24
  440. #define RX_MSDU_START_1_L4_OFFSET_MASK 0xff000000
  441. /* Description RX_MSDU_START_2_MSDU_NUMBER
  442. Indicates the MSDU number within a MPDU. This value is
  443. reset to zero at the start of each MPDU. If the number of
  444. MSDU exceeds 255 this number will wrap using modulo 256.
  445. */
  446. #define RX_MSDU_START_2_MSDU_NUMBER_OFFSET 0x00000008
  447. #define RX_MSDU_START_2_MSDU_NUMBER_LSB 0
  448. #define RX_MSDU_START_2_MSDU_NUMBER_MASK 0x000000ff
  449. /* Description RX_MSDU_START_2_DECAP_FORMAT
  450. Indicates the format after decapsulation:
  451. <enum 0 RAW> No encapsulation
  452. <enum 1 Native_WiFi>
  453. <enum 2 Ethernet> Ethernet 2 (DIX) or 802.3 (uses
  454. SNAP/LLC)
  455. <enum 3 802_3> Indicate Ethernet
  456. <legal all>
  457. */
  458. #define RX_MSDU_START_2_DECAP_FORMAT_OFFSET 0x00000008
  459. #define RX_MSDU_START_2_DECAP_FORMAT_LSB 8
  460. #define RX_MSDU_START_2_DECAP_FORMAT_MASK 0x00000300
  461. /* Description RX_MSDU_START_2_IPV4_PROTO
  462. Set if L2 layer indicates IPv4 protocol.
  463. */
  464. #define RX_MSDU_START_2_IPV4_PROTO_OFFSET 0x00000008
  465. #define RX_MSDU_START_2_IPV4_PROTO_LSB 10
  466. #define RX_MSDU_START_2_IPV4_PROTO_MASK 0x00000400
  467. /* Description RX_MSDU_START_2_IPV6_PROTO
  468. Set if L2 layer indicates IPv6 protocol.
  469. */
  470. #define RX_MSDU_START_2_IPV6_PROTO_OFFSET 0x00000008
  471. #define RX_MSDU_START_2_IPV6_PROTO_LSB 11
  472. #define RX_MSDU_START_2_IPV6_PROTO_MASK 0x00000800
  473. /* Description RX_MSDU_START_2_TCP_PROTO
  474. Set if the ipv4_proto or ipv6_proto are set and the IP
  475. protocol indicates TCP.
  476. */
  477. #define RX_MSDU_START_2_TCP_PROTO_OFFSET 0x00000008
  478. #define RX_MSDU_START_2_TCP_PROTO_LSB 12
  479. #define RX_MSDU_START_2_TCP_PROTO_MASK 0x00001000
  480. /* Description RX_MSDU_START_2_UDP_PROTO
  481. Set if the ipv4_proto or ipv6_proto are set and the IP
  482. protocol indicates UDP.
  483. */
  484. #define RX_MSDU_START_2_UDP_PROTO_OFFSET 0x00000008
  485. #define RX_MSDU_START_2_UDP_PROTO_LSB 13
  486. #define RX_MSDU_START_2_UDP_PROTO_MASK 0x00002000
  487. /* Description RX_MSDU_START_2_IP_FRAG
  488. Indicates that either the IP More frag bit is set or IP
  489. frag number is non-zero. If set indicates that this is a
  490. fragmented IP packet.
  491. */
  492. #define RX_MSDU_START_2_IP_FRAG_OFFSET 0x00000008
  493. #define RX_MSDU_START_2_IP_FRAG_LSB 14
  494. #define RX_MSDU_START_2_IP_FRAG_MASK 0x00004000
  495. /* Description RX_MSDU_START_2_TCP_ONLY_ACK
  496. Set if only the TCP Ack bit is set in the TCP flags and
  497. if the TCP payload is 0.
  498. */
  499. #define RX_MSDU_START_2_TCP_ONLY_ACK_OFFSET 0x00000008
  500. #define RX_MSDU_START_2_TCP_ONLY_ACK_LSB 15
  501. #define RX_MSDU_START_2_TCP_ONLY_ACK_MASK 0x00008000
  502. /* Description RX_MSDU_START_2_DA_IS_BCAST_MCAST
  503. The destination address is broadcast or multicast.
  504. */
  505. #define RX_MSDU_START_2_DA_IS_BCAST_MCAST_OFFSET 0x00000008
  506. #define RX_MSDU_START_2_DA_IS_BCAST_MCAST_LSB 16
  507. #define RX_MSDU_START_2_DA_IS_BCAST_MCAST_MASK 0x00010000
  508. /* Description RX_MSDU_START_2_TOEPLITZ_HASH_SEL
  509. Actual choosen Hash.
  510. 0 -> Toeplitz hash of 2-tuple (IP source address, IP
  511. destination address)1 -> Toeplitz hash of 4-tuple (IP source
  512. address, IP destination address, L4 (TCP/UDP) source port,
  513. L4 (TCP/UDP) destination port)
  514. 2 -> Toeplitz of flow_id
  515. 3 -> Zero is used
  516. <legal all>
  517. */
  518. #define RX_MSDU_START_2_TOEPLITZ_HASH_SEL_OFFSET 0x00000008
  519. #define RX_MSDU_START_2_TOEPLITZ_HASH_SEL_LSB 17
  520. #define RX_MSDU_START_2_TOEPLITZ_HASH_SEL_MASK 0x00060000
  521. /* Description RX_MSDU_START_2_IP_FIXED_HEADER_VALID
  522. Fixed 20-byte IPv4 header or 40-byte IPv6 header parsed
  523. fully within first 256 bytes of the packet
  524. */
  525. #define RX_MSDU_START_2_IP_FIXED_HEADER_VALID_OFFSET 0x00000008
  526. #define RX_MSDU_START_2_IP_FIXED_HEADER_VALID_LSB 19
  527. #define RX_MSDU_START_2_IP_FIXED_HEADER_VALID_MASK 0x00080000
  528. /* Description RX_MSDU_START_2_IP_EXTN_HEADER_VALID
  529. IPv6/IPv6 header, including IPv4 options and
  530. recognizable extension headers parsed fully within first 256
  531. bytes of the packet
  532. */
  533. #define RX_MSDU_START_2_IP_EXTN_HEADER_VALID_OFFSET 0x00000008
  534. #define RX_MSDU_START_2_IP_EXTN_HEADER_VALID_LSB 20
  535. #define RX_MSDU_START_2_IP_EXTN_HEADER_VALID_MASK 0x00100000
  536. /* Description RX_MSDU_START_2_TCP_UDP_HEADER_VALID
  537. Fixed 20-byte TCP (excluding TCP options) or 8-byte UDP
  538. header parsed fully within first 256 bytes of the packet
  539. */
  540. #define RX_MSDU_START_2_TCP_UDP_HEADER_VALID_OFFSET 0x00000008
  541. #define RX_MSDU_START_2_TCP_UDP_HEADER_VALID_LSB 21
  542. #define RX_MSDU_START_2_TCP_UDP_HEADER_VALID_MASK 0x00200000
  543. /* Description RX_MSDU_START_2_MESH_CONTROL_PRESENT
  544. When set, this MSDU includes the 'Mesh Control' field
  545. <legal all>
  546. */
  547. #define RX_MSDU_START_2_MESH_CONTROL_PRESENT_OFFSET 0x00000008
  548. #define RX_MSDU_START_2_MESH_CONTROL_PRESENT_LSB 22
  549. #define RX_MSDU_START_2_MESH_CONTROL_PRESENT_MASK 0x00400000
  550. /* Description RX_MSDU_START_2_LDPC
  551. <legal all>
  552. */
  553. #define RX_MSDU_START_2_LDPC_OFFSET 0x00000008
  554. #define RX_MSDU_START_2_LDPC_LSB 23
  555. #define RX_MSDU_START_2_LDPC_MASK 0x00800000
  556. /* Description RX_MSDU_START_2_IP4_PROTOCOL_IP6_NEXT_HEADER
  557. For IPv4 this is the 8 bit protocol field (when
  558. ipv4_proto is set). For IPv6 this is the 8 bit next_header
  559. field (when ipv6_proto is set).
  560. */
  561. #define RX_MSDU_START_2_IP4_PROTOCOL_IP6_NEXT_HEADER_OFFSET 0x00000008
  562. #define RX_MSDU_START_2_IP4_PROTOCOL_IP6_NEXT_HEADER_LSB 24
  563. #define RX_MSDU_START_2_IP4_PROTOCOL_IP6_NEXT_HEADER_MASK 0xff000000
  564. /* Description RX_MSDU_START_3_TOEPLITZ_HASH_2_OR_4
  565. Controlled by RxOLE register - If register bit set to 0,
  566. Toeplitz hash is computed over 2-tuple IPv4 or IPv6 src/dest
  567. addresses; otherwise, toeplitz hash is computed over 4-tuple
  568. IPv4 or IPv6 src/dest addresses and src/dest ports
  569. */
  570. #define RX_MSDU_START_3_TOEPLITZ_HASH_2_OR_4_OFFSET 0x0000000c
  571. #define RX_MSDU_START_3_TOEPLITZ_HASH_2_OR_4_LSB 0
  572. #define RX_MSDU_START_3_TOEPLITZ_HASH_2_OR_4_MASK 0xffffffff
  573. /* Description RX_MSDU_START_4_FLOW_ID_TOEPLITZ
  574. Toeplitz hash of 5-tuple
  575. {IP source address, IP destination address, IP source
  576. port, IP destination port, L4 protocol} in case of
  577. non-IPSec.
  578. In case of IPSec - Toeplitz hash of 4-tuple
  579. {IP source address, IP destination address, SPI, L4
  580. protocol}
  581. The relevant Toeplitz key registers are provided in
  582. RxOLE's instance of common parser module. These registers
  583. are separate from the Toeplitz keys used by ASE/FSE modules
  584. inside RxOLE.The actual value will be passed on from common
  585. parser module to RxOLE in one of the WHO_* TLVs.
  586. <legal all>
  587. */
  588. #define RX_MSDU_START_4_FLOW_ID_TOEPLITZ_OFFSET 0x00000010
  589. #define RX_MSDU_START_4_FLOW_ID_TOEPLITZ_LSB 0
  590. #define RX_MSDU_START_4_FLOW_ID_TOEPLITZ_MASK 0xffffffff
  591. /* Description RX_MSDU_START_5_USER_RSSI
  592. RSSI for this user
  593. <legal all>
  594. */
  595. #define RX_MSDU_START_5_USER_RSSI_OFFSET 0x00000014
  596. #define RX_MSDU_START_5_USER_RSSI_LSB 0
  597. #define RX_MSDU_START_5_USER_RSSI_MASK 0x000000ff
  598. /* Description RX_MSDU_START_5_PKT_TYPE
  599. Packet type:
  600. <enum 0 dot11a>802.11a PPDU type
  601. <enum 1 dot11b>802.11b PPDU type
  602. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  603. <enum 3 dot11ac>802.11ac PPDU type
  604. <enum 4 dot11ax>802.11ax PPDU type
  605. */
  606. #define RX_MSDU_START_5_PKT_TYPE_OFFSET 0x00000014
  607. #define RX_MSDU_START_5_PKT_TYPE_LSB 8
  608. #define RX_MSDU_START_5_PKT_TYPE_MASK 0x00000f00
  609. /* Description RX_MSDU_START_5_STBC
  610. When set, use STBC transmission rates
  611. */
  612. #define RX_MSDU_START_5_STBC_OFFSET 0x00000014
  613. #define RX_MSDU_START_5_STBC_LSB 12
  614. #define RX_MSDU_START_5_STBC_MASK 0x00001000
  615. /* Description RX_MSDU_START_5_SGI
  616. Field only valid when pkt type is HT, VHT or HE.
  617. <enum 0 0_8_us_sgi > Legacy normal GI. Can also be
  618. used for HE
  619. <enum 1 0_4_us_sgi > Legacy short GI. Can also be
  620. used for HE
  621. <enum 2 1_6_us_sgi > HE related GI
  622. <enum 3 3_2_us_sgi > HE related GI
  623. <legal 0 - 3>
  624. */
  625. #define RX_MSDU_START_5_SGI_OFFSET 0x00000014
  626. #define RX_MSDU_START_5_SGI_LSB 13
  627. #define RX_MSDU_START_5_SGI_MASK 0x00006000
  628. /* Description RX_MSDU_START_5_RATE_MCS
  629. For details, refer to MCS_TYPE description
  630. Note: This is rate in case of 11a/11b
  631. <legal all>
  632. */
  633. #define RX_MSDU_START_5_RATE_MCS_OFFSET 0x00000014
  634. #define RX_MSDU_START_5_RATE_MCS_LSB 15
  635. #define RX_MSDU_START_5_RATE_MCS_MASK 0x00078000
  636. /* Description RX_MSDU_START_5_RECEIVE_BANDWIDTH
  637. Full receive Bandwidth
  638. <enum 0 full_rx_bw_20_mhz>
  639. <enum 1 full_rx_bw_40_mhz>
  640. <enum 2 full_rx_bw_80_mhz>
  641. <enum 3 full_rx_bw_160_mhz>
  642. <legal 0-3>
  643. */
  644. #define RX_MSDU_START_5_RECEIVE_BANDWIDTH_OFFSET 0x00000014
  645. #define RX_MSDU_START_5_RECEIVE_BANDWIDTH_LSB 19
  646. #define RX_MSDU_START_5_RECEIVE_BANDWIDTH_MASK 0x00180000
  647. /* Description RX_MSDU_START_5_RECEPTION_TYPE
  648. Indicates what type of reception this is.
  649. <enum 0 reception_type_SU > Basic SU reception (not
  650. part of OFDMA or MIMO)
  651. <enum 1 reception_type_MU_MIMO > This is related to
  652. DL type of reception
  653. <enum 2 reception_type_MU_OFDMA > This is related
  654. to DL type of reception
  655. <enum 3 reception_type_MU_OFDMA_MIMO > This is
  656. related to DL type of reception
  657. <enum 4 reception_type_UL_MU_MIMO > This is related
  658. to UL type of reception
  659. <enum 5 reception_type_UL_MU_OFDMA > This is
  660. related to UL type of reception
  661. <enum 6 reception_type_UL_MU_OFDMA_MIMO > This is
  662. related to UL type of reception
  663. <legal 0-6>
  664. */
  665. #define RX_MSDU_START_5_RECEPTION_TYPE_OFFSET 0x00000014
  666. #define RX_MSDU_START_5_RECEPTION_TYPE_LSB 21
  667. #define RX_MSDU_START_5_RECEPTION_TYPE_MASK 0x00e00000
  668. /* Description RX_MSDU_START_5_MIMO_SS_BITMAP
  669. Field only valid when Reception_type =
  670. reception_type_MU_MIMO or reception_type_MU_OFDMA_MIMO
  671. Bitmap, with each bit indicating if the related spatial
  672. stream is used for this STA
  673. LSB related to SS 0
  674. 0: spatial stream not used for this reception
  675. 1: spatial stream used for this reception
  676. <legal all>
  677. */
  678. #define RX_MSDU_START_5_MIMO_SS_BITMAP_OFFSET 0x00000014
  679. #define RX_MSDU_START_5_MIMO_SS_BITMAP_LSB 24
  680. #define RX_MSDU_START_5_MIMO_SS_BITMAP_MASK 0xff000000
  681. /* Description RX_MSDU_START_6_PPDU_START_TIMESTAMP
  682. Timestamp that indicates when the PPDU that contained
  683. this MPDU started on the medium.
  684. <legal all>
  685. */
  686. #define RX_MSDU_START_6_PPDU_START_TIMESTAMP_OFFSET 0x00000018
  687. #define RX_MSDU_START_6_PPDU_START_TIMESTAMP_LSB 0
  688. #define RX_MSDU_START_6_PPDU_START_TIMESTAMP_MASK 0xffffffff
  689. /* Description RX_MSDU_START_7_SW_PHY_META_DATA
  690. SW programmed Meta data provided by the PHY.
  691. Can be used for SW to indicate the channel the device is
  692. on.
  693. <legal all>
  694. */
  695. #define RX_MSDU_START_7_SW_PHY_META_DATA_OFFSET 0x0000001c
  696. #define RX_MSDU_START_7_SW_PHY_META_DATA_LSB 0
  697. #define RX_MSDU_START_7_SW_PHY_META_DATA_MASK 0xffffffff
  698. #endif // _RX_MSDU_START_H_