rx_msdu_start.h 33 KB

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