rx_msdu_start.h 35 KB

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