162306a36Sopenharmony_ci/* SPDX-License-Identifier: BSD-3-Clause-Clear */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
462306a36Sopenharmony_ci * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci#ifndef ATH12K_RX_DESC_H
762306a36Sopenharmony_ci#define ATH12K_RX_DESC_H
862306a36Sopenharmony_ci
962306a36Sopenharmony_cienum rx_desc_decap_type {
1062306a36Sopenharmony_ci	RX_DESC_DECAP_TYPE_RAW,
1162306a36Sopenharmony_ci	RX_DESC_DECAP_TYPE_NATIVE_WIFI,
1262306a36Sopenharmony_ci	RX_DESC_DECAP_TYPE_ETHERNET2_DIX,
1362306a36Sopenharmony_ci	RX_DESC_DECAP_TYPE_8023,
1462306a36Sopenharmony_ci};
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_cienum rx_desc_decrypt_status_code {
1762306a36Sopenharmony_ci	RX_DESC_DECRYPT_STATUS_CODE_OK,
1862306a36Sopenharmony_ci	RX_DESC_DECRYPT_STATUS_CODE_UNPROTECTED_FRAME,
1962306a36Sopenharmony_ci	RX_DESC_DECRYPT_STATUS_CODE_DATA_ERR,
2062306a36Sopenharmony_ci	RX_DESC_DECRYPT_STATUS_CODE_KEY_INVALID,
2162306a36Sopenharmony_ci	RX_DESC_DECRYPT_STATUS_CODE_PEER_ENTRY_INVALID,
2262306a36Sopenharmony_ci	RX_DESC_DECRYPT_STATUS_CODE_OTHER,
2362306a36Sopenharmony_ci};
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_REO_DEST_IND		GENMASK(4, 0)
2662306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_LMAC_PEER_ID_MSB		GENMASK(6, 5)
2762306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_FLOW_ID_TOEPLITZ		BIT(7)
2862306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_PKT_SEL_FP_UCAST_DATA	BIT(8)
2962306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_PKT_SEL_FP_MCAST_DATA	BIT(9)
3062306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_PKT_SEL_FP_CTRL_BAR		BIT(10)
3162306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_RXDMA0_SRC_RING_SEL		GENMASK(13, 11)
3262306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_RXDMA0_DST_RING_SEL		GENMASK(16, 14)
3362306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_MCAST_ECHO_DROP_EN		BIT(17)
3462306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_WDS_LEARN_DETECT_EN		BIT(18)
3562306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_INTRA_BSS_CHECK_EN		BIT(19)
3662306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_USE_PPE			BIT(20)
3762306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_PPE_ROUTING_EN		BIT(21)
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci#define RX_MPDU_START_INFO1_REO_QUEUE_DESC_HI		GENMASK(7, 0)
4062306a36Sopenharmony_ci#define RX_MPDU_START_INFO1_RECV_QUEUE_NUM		GENMASK(23, 8)
4162306a36Sopenharmony_ci#define RX_MPDU_START_INFO1_PRE_DELIM_ERR_WARN		BIT(24)
4262306a36Sopenharmony_ci#define RX_MPDU_START_INFO1_FIRST_DELIM_ERR		BIT(25)
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci#define RX_MPDU_START_INFO2_EPD_EN			BIT(0)
4562306a36Sopenharmony_ci#define RX_MPDU_START_INFO2_ALL_FRAME_ENCPD		BIT(1)
4662306a36Sopenharmony_ci#define RX_MPDU_START_INFO2_ENC_TYPE			GENMASK(5, 2)
4762306a36Sopenharmony_ci#define RX_MPDU_START_INFO2_VAR_WEP_KEY_WIDTH		GENMASK(7, 6)
4862306a36Sopenharmony_ci#define RX_MPDU_START_INFO2_MESH_STA			GENMASK(9, 8)
4962306a36Sopenharmony_ci#define RX_MPDU_START_INFO2_BSSID_HIT			BIT(10)
5062306a36Sopenharmony_ci#define RX_MPDU_START_INFO2_BSSID_NUM			GENMASK(14, 11)
5162306a36Sopenharmony_ci#define RX_MPDU_START_INFO2_TID				GENMASK(18, 15)
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci#define RX_MPDU_START_INFO3_RXPCU_MPDU_FLTR		GENMASK(1, 0)
5462306a36Sopenharmony_ci#define RX_MPDU_START_INFO3_SW_FRAME_GRP_ID		GENMASK(8, 2)
5562306a36Sopenharmony_ci#define RX_MPDU_START_INFO3_NDP_FRAME			BIT(9)
5662306a36Sopenharmony_ci#define RX_MPDU_START_INFO3_PHY_ERR			BIT(10)
5762306a36Sopenharmony_ci#define RX_MPDU_START_INFO3_PHY_ERR_MPDU_HDR		BIT(11)
5862306a36Sopenharmony_ci#define RX_MPDU_START_INFO3_PROTO_VER_ERR		BIT(12)
5962306a36Sopenharmony_ci#define RX_MPDU_START_INFO3_AST_LOOKUP_VALID		BIT(13)
6062306a36Sopenharmony_ci#define RX_MPDU_START_INFO3_RANGING			BIT(14)
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MPDU_FCTRL_VALID		BIT(0)
6362306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MPDU_DUR_VALID		BIT(1)
6462306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MAC_ADDR1_VALID		BIT(2)
6562306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MAC_ADDR2_VALID		BIT(3)
6662306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MAC_ADDR3_VALID		BIT(4)
6762306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MAC_ADDR4_VALID		BIT(5)
6862306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MPDU_SEQ_CTRL_VALID		BIT(6)
6962306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MPDU_QOS_CTRL_VALID		BIT(7)
7062306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MPDU_HT_CTRL_VALID		BIT(8)
7162306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_ENCRYPT_INFO_VALID		BIT(9)
7262306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MPDU_FRAG_NUMBER		GENMASK(13, 10)
7362306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MORE_FRAG_FLAG		BIT(14)
7462306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_FROM_DS			BIT(16)
7562306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_TO_DS			BIT(17)
7662306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_ENCRYPTED			BIT(18)
7762306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MPDU_RETRY			BIT(19)
7862306a36Sopenharmony_ci#define RX_MPDU_START_INFO4_MPDU_SEQ_NUM		GENMASK(31, 20)
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ci#define RX_MPDU_START_INFO5_KEY_ID			GENMASK(7, 0)
8162306a36Sopenharmony_ci#define RX_MPDU_START_INFO5_NEW_PEER_ENTRY		BIT(8)
8262306a36Sopenharmony_ci#define RX_MPDU_START_INFO5_DECRYPT_NEEDED		BIT(9)
8362306a36Sopenharmony_ci#define RX_MPDU_START_INFO5_DECAP_TYPE			GENMASK(11, 10)
8462306a36Sopenharmony_ci#define RX_MPDU_START_INFO5_VLAN_TAG_C_PADDING		BIT(12)
8562306a36Sopenharmony_ci#define RX_MPDU_START_INFO5_VLAN_TAG_S_PADDING		BIT(13)
8662306a36Sopenharmony_ci#define RX_MPDU_START_INFO5_STRIP_VLAN_TAG_C		BIT(14)
8762306a36Sopenharmony_ci#define RX_MPDU_START_INFO5_STRIP_VLAN_TAG_S		BIT(15)
8862306a36Sopenharmony_ci#define RX_MPDU_START_INFO5_PRE_DELIM_COUNT		GENMASK(27, 16)
8962306a36Sopenharmony_ci#define RX_MPDU_START_INFO5_AMPDU_FLAG			BIT(28)
9062306a36Sopenharmony_ci#define RX_MPDU_START_INFO5_BAR_FRAME			BIT(29)
9162306a36Sopenharmony_ci#define RX_MPDU_START_INFO5_RAW_MPDU			BIT(30)
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_MPDU_LEN			GENMASK(13, 0)
9462306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_FIRST_MPDU			BIT(14)
9562306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_MCAST_BCAST			BIT(15)
9662306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_AST_IDX_NOT_FOUND		BIT(16)
9762306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_AST_IDX_TIMEOUT		BIT(17)
9862306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_POWER_MGMT			BIT(18)
9962306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_NON_QOS			BIT(19)
10062306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_NULL_DATA			BIT(20)
10162306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_MGMT_TYPE			BIT(21)
10262306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_CTRL_TYPE			BIT(22)
10362306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_MORE_DATA			BIT(23)
10462306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_EOSP			BIT(24)
10562306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_FRAGMENT			BIT(25)
10662306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_ORDER			BIT(26)
10762306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_UAPSD_TRIGGER		BIT(27)
10862306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_ENCRYPT_REQUIRED		BIT(28)
10962306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_DIRECTED			BIT(29)
11062306a36Sopenharmony_ci#define RX_MPDU_START_INFO6_AMSDU_PRESENT		BIT(30)
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ci#define RX_MPDU_START_INFO7_VDEV_ID			GENMASK(7, 0)
11362306a36Sopenharmony_ci#define RX_MPDU_START_INFO7_SERVICE_CODE		GENMASK(16, 8)
11462306a36Sopenharmony_ci#define RX_MPDU_START_INFO7_PRIORITY_VALID		BIT(17)
11562306a36Sopenharmony_ci#define RX_MPDU_START_INFO7_SRC_INFO			GENMASK(29, 18)
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ci#define RX_MPDU_START_INFO8_AUTH_TO_SEND_WDS		BIT(0)
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_cistruct rx_mpdu_start_qcn9274 {
12062306a36Sopenharmony_ci	__le32 info0;
12162306a36Sopenharmony_ci	__le32 reo_queue_desc_lo;
12262306a36Sopenharmony_ci	__le32 info1;
12362306a36Sopenharmony_ci	__le32 pn[4];
12462306a36Sopenharmony_ci	__le32 info2;
12562306a36Sopenharmony_ci	__le32 peer_meta_data;
12662306a36Sopenharmony_ci	__le16 info3;
12762306a36Sopenharmony_ci	__le16 phy_ppdu_id;
12862306a36Sopenharmony_ci	__le16 ast_index;
12962306a36Sopenharmony_ci	__le16 sw_peer_id;
13062306a36Sopenharmony_ci	__le32 info4;
13162306a36Sopenharmony_ci	__le32 info5;
13262306a36Sopenharmony_ci	__le32 info6;
13362306a36Sopenharmony_ci	__le16 frame_ctrl;
13462306a36Sopenharmony_ci	__le16 duration;
13562306a36Sopenharmony_ci	u8 addr1[ETH_ALEN];
13662306a36Sopenharmony_ci	u8 addr2[ETH_ALEN];
13762306a36Sopenharmony_ci	u8 addr3[ETH_ALEN];
13862306a36Sopenharmony_ci	__le16 seq_ctrl;
13962306a36Sopenharmony_ci	u8 addr4[ETH_ALEN];
14062306a36Sopenharmony_ci	__le16 qos_ctrl;
14162306a36Sopenharmony_ci	__le32 ht_ctrl;
14262306a36Sopenharmony_ci	__le32 info7;
14362306a36Sopenharmony_ci	u8 multi_link_addr1[ETH_ALEN];
14462306a36Sopenharmony_ci	u8 multi_link_addr2[ETH_ALEN];
14562306a36Sopenharmony_ci	__le32 info8;
14662306a36Sopenharmony_ci	__le32 res0;
14762306a36Sopenharmony_ci	__le32 res1;
14862306a36Sopenharmony_ci} __packed;
14962306a36Sopenharmony_ci
15062306a36Sopenharmony_ci/* rx_mpdu_start
15162306a36Sopenharmony_ci *
15262306a36Sopenharmony_ci * reo_destination_indication
15362306a36Sopenharmony_ci *		The id of the reo exit ring where the msdu frame shall push
15462306a36Sopenharmony_ci *		after (MPDU level) reordering has finished. Values are defined
15562306a36Sopenharmony_ci *		in enum %HAL_RX_MSDU_DESC_REO_DEST_IND_.
15662306a36Sopenharmony_ci *
15762306a36Sopenharmony_ci * lmac_peer_id_msb
15862306a36Sopenharmony_ci *
15962306a36Sopenharmony_ci *		If use_flow_id_toeplitz_clfy is set and lmac_peer_id_'sb
16062306a36Sopenharmony_ci *		is 2'b00, Rx OLE uses a REO destination indicati'n of {1'b1,
16162306a36Sopenharmony_ci *		hash[3:0]} using the chosen Toeplitz hash from Common Parser
16262306a36Sopenharmony_ci *		if flow search fails.
16362306a36Sopenharmony_ci *		If use_flow_id_toeplitz_clfy is set and lmac_peer_id_msb
16462306a36Sopenharmony_ci *		's not 2'b00, Rx OLE uses a REO destination indication of
16562306a36Sopenharmony_ci *		{lmac_peer_id_msb, hash[2:0]} using the chosen Toeplitz
16662306a36Sopenharmony_ci *		hash from Common Parser if flow search fails.
16762306a36Sopenharmony_ci *
16862306a36Sopenharmony_ci * use_flow_id_toeplitz_clfy
16962306a36Sopenharmony_ci *		Indication to Rx OLE to enable REO destination routing based
17062306a36Sopenharmony_ci *		on the chosen Toeplitz hash from Common Parser, in case
17162306a36Sopenharmony_ci *		flow search fails
17262306a36Sopenharmony_ci *
17362306a36Sopenharmony_ci * pkt_selection_fp_ucast_data
17462306a36Sopenharmony_ci *		Filter pass Unicast data frame (matching rxpcu_filter_pass
17562306a36Sopenharmony_ci *		and sw_frame_group_Unicast_data) routing selection
17662306a36Sopenharmony_ci *
17762306a36Sopenharmony_ci * pkt_selection_fp_mcast_data
17862306a36Sopenharmony_ci *		Filter pass Multicast data frame (matching rxpcu_filter_pass
17962306a36Sopenharmony_ci *		and sw_frame_group_Multicast_data) routing selection
18062306a36Sopenharmony_ci *
18162306a36Sopenharmony_ci * pkt_selection_fp_ctrl_bar
18262306a36Sopenharmony_ci *		Filter pass BAR frame (matching rxpcu_filter_pass
18362306a36Sopenharmony_ci *		and sw_frame_group_ctrl_1000) routing selection
18462306a36Sopenharmony_ci *
18562306a36Sopenharmony_ci * rxdma0_src_ring_selection
18662306a36Sopenharmony_ci *		Field only valid when for the received frame type the corresponding
18762306a36Sopenharmony_ci *		pkt_selection_fp_... bit is set
18862306a36Sopenharmony_ci *
18962306a36Sopenharmony_ci * rxdma0_dst_ring_selection
19062306a36Sopenharmony_ci *		Field only valid when for the received frame type the corresponding
19162306a36Sopenharmony_ci *		pkt_selection_fp_... bit is set
19262306a36Sopenharmony_ci *
19362306a36Sopenharmony_ci * mcast_echo_drop_enable
19462306a36Sopenharmony_ci *		If set, for multicast packets, multicast echo check (i.e.
19562306a36Sopenharmony_ci *		SA search with mcast_echo_check = 1) shall be performed
19662306a36Sopenharmony_ci *		by RXOLE, and any multicast echo packets should be indicated
19762306a36Sopenharmony_ci *		 to RXDMA for release to WBM
19862306a36Sopenharmony_ci *
19962306a36Sopenharmony_ci * wds_learning_detect_en
20062306a36Sopenharmony_ci *		If set, WDS learning detection based on SA search and notification
20162306a36Sopenharmony_ci *		to FW (using RXDMA0 status ring) is enabled and the "timestamp"
20262306a36Sopenharmony_ci *		field in address search failure cache-only entry should
20362306a36Sopenharmony_ci *		be used to avoid multiple WDS learning notifications.
20462306a36Sopenharmony_ci *
20562306a36Sopenharmony_ci * intrabss_check_en
20662306a36Sopenharmony_ci *		If set, intra-BSS routing detection is enabled
20762306a36Sopenharmony_ci *
20862306a36Sopenharmony_ci * use_ppe
20962306a36Sopenharmony_ci *		Indicates to RXDMA to ignore the REO_destination_indication
21062306a36Sopenharmony_ci *		and use a programmed value corresponding to the REO2PPE
21162306a36Sopenharmony_ci *		ring
21262306a36Sopenharmony_ci *		This override to REO2PPE for packets requiring multiple
21362306a36Sopenharmony_ci *		buffers shall be disabled based on an RXDMA configuration,
21462306a36Sopenharmony_ci *		as PPE may not support such packets.
21562306a36Sopenharmony_ci *
21662306a36Sopenharmony_ci *		Supported only in full AP chips, not in client/soft
21762306a36Sopenharmony_ci *		chips
21862306a36Sopenharmony_ci *
21962306a36Sopenharmony_ci * ppe_routing_enable
22062306a36Sopenharmony_ci *		Global enable/disable bit for routing to PPE, used to disable
22162306a36Sopenharmony_ci *		PPE routing even if RXOLE CCE or flow search indicate 'Use_PPE'
22262306a36Sopenharmony_ci *		This is set by SW for peers which are being handled by a
22362306a36Sopenharmony_ci *		host SW/accelerator subsystem that also handles packet
22462306a36Sopenharmony_ci *		buffer management for WiFi-to-PPE routing.
22562306a36Sopenharmony_ci *
22662306a36Sopenharmony_ci *		This is cleared by SW for peers which are being handled
22762306a36Sopenharmony_ci *		by a different subsystem, completely disabling WiFi-to-PPE
22862306a36Sopenharmony_ci *		routing for such peers.
22962306a36Sopenharmony_ci *
23062306a36Sopenharmony_ci * rx_reo_queue_desc_addr_lo
23162306a36Sopenharmony_ci *		Address (lower 32 bits) of the REO queue descriptor.
23262306a36Sopenharmony_ci *
23362306a36Sopenharmony_ci * rx_reo_queue_desc_addr_hi
23462306a36Sopenharmony_ci *		Address (upper 8 bits) of the REO queue descriptor.
23562306a36Sopenharmony_ci *
23662306a36Sopenharmony_ci * receive_queue_number
23762306a36Sopenharmony_ci *		Indicates the MPDU queue ID to which this MPDU link
23862306a36Sopenharmony_ci *		descriptor belongs.
23962306a36Sopenharmony_ci *
24062306a36Sopenharmony_ci * pre_delim_err_warning
24162306a36Sopenharmony_ci *		Indicates that a delimiter FCS error was found in between the
24262306a36Sopenharmony_ci *		previous MPDU and this MPDU. Note that this is just a warning,
24362306a36Sopenharmony_ci *		and does not mean that this MPDU is corrupted in any way. If
24462306a36Sopenharmony_ci *		it is, there will be other errors indicated such as FCS or
24562306a36Sopenharmony_ci *		decrypt errors.
24662306a36Sopenharmony_ci *
24762306a36Sopenharmony_ci * first_delim_err
24862306a36Sopenharmony_ci *		Indicates that the first delimiter had a FCS failure.
24962306a36Sopenharmony_ci *
25062306a36Sopenharmony_ci * pn
25162306a36Sopenharmony_ci *		The PN number.
25262306a36Sopenharmony_ci *
25362306a36Sopenharmony_ci * epd_en
25462306a36Sopenharmony_ci *		Field only valid when AST_based_lookup_valid == 1.
25562306a36Sopenharmony_ci *		In case of ndp or phy_err or AST_based_lookup_valid == 0,
25662306a36Sopenharmony_ci *		this field will be set to 0
25762306a36Sopenharmony_ci *		If set to one use EPD instead of LPD
25862306a36Sopenharmony_ci *		In case of ndp or phy_err, this field will never be set.
25962306a36Sopenharmony_ci *
26062306a36Sopenharmony_ci * all_frames_shall_be_encrypted
26162306a36Sopenharmony_ci *		In case of ndp or phy_err or AST_based_lookup_valid == 0,
26262306a36Sopenharmony_ci *		this field will be set to 0
26362306a36Sopenharmony_ci *
26462306a36Sopenharmony_ci *		When set, all frames (data only ?) shall be encrypted. If
26562306a36Sopenharmony_ci *		not, RX CRYPTO shall set an error flag.
26662306a36Sopenharmony_ci *
26762306a36Sopenharmony_ci *
26862306a36Sopenharmony_ci * encrypt_type
26962306a36Sopenharmony_ci *		In case of ndp or phy_err or AST_based_lookup_valid == 0,
27062306a36Sopenharmony_ci *		this field will be set to 0
27162306a36Sopenharmony_ci *
27262306a36Sopenharmony_ci *		Indicates type of decrypt cipher used (as defined in the
27362306a36Sopenharmony_ci *		peer entry)
27462306a36Sopenharmony_ci *
27562306a36Sopenharmony_ci * wep_key_width_for_variable_key
27662306a36Sopenharmony_ci *
27762306a36Sopenharmony_ci *		Field only valid when key_type is set to wep_varied_width.
27862306a36Sopenharmony_ci *
27962306a36Sopenharmony_ci * mesh_sta
28062306a36Sopenharmony_ci *
28162306a36Sopenharmony_ci * bssid_hit
28262306a36Sopenharmony_ci *		When set, the BSSID of the incoming frame matched one of
28362306a36Sopenharmony_ci *		 the 8 BSSID register values
28462306a36Sopenharmony_ci * bssid_number
28562306a36Sopenharmony_ci *		Field only valid when bssid_hit is set.
28662306a36Sopenharmony_ci *		This number indicates which one out of the 8 BSSID register
28762306a36Sopenharmony_ci *		values matched the incoming frame
28862306a36Sopenharmony_ci *
28962306a36Sopenharmony_ci * tid
29062306a36Sopenharmony_ci *		Field only valid when mpdu_qos_control_valid is set
29162306a36Sopenharmony_ci *		The TID field in the QoS control field
29262306a36Sopenharmony_ci *
29362306a36Sopenharmony_ci * peer_meta_data
29462306a36Sopenharmony_ci *		Meta data that SW has programmed in the Peer table entry
29562306a36Sopenharmony_ci *		of the transmitting STA.
29662306a36Sopenharmony_ci *
29762306a36Sopenharmony_ci * rxpcu_mpdu_filter_in_category
29862306a36Sopenharmony_ci *		Field indicates what the reason was that this mpdu frame
29962306a36Sopenharmony_ci *		was allowed to come into the receive path by rxpcu. Values
30062306a36Sopenharmony_ci *		are defined in enum %RX_DESC_RXPCU_FILTER_*.
30162306a36Sopenharmony_ci *
30262306a36Sopenharmony_ci * sw_frame_group_id
30362306a36Sopenharmony_ci *		SW processes frames based on certain classifications. Values
30462306a36Sopenharmony_ci *		are defined in enum %RX_DESC_SW_FRAME_GRP_ID_*.
30562306a36Sopenharmony_ci *
30662306a36Sopenharmony_ci * ndp_frame
30762306a36Sopenharmony_ci *		When set, the received frame was an NDP frame, and thus
30862306a36Sopenharmony_ci *		there will be no MPDU data.
30962306a36Sopenharmony_ci * phy_err
31062306a36Sopenharmony_ci *		When set, a PHY error was received before MAC received any
31162306a36Sopenharmony_ci *		data, and thus there will be no MPDU data.
31262306a36Sopenharmony_ci *
31362306a36Sopenharmony_ci * phy_err_during_mpdu_header
31462306a36Sopenharmony_ci *		When set, a PHY error was received before MAC received the
31562306a36Sopenharmony_ci *		complete MPDU header which was needed for proper decoding
31662306a36Sopenharmony_ci *
31762306a36Sopenharmony_ci * protocol_version_err
31862306a36Sopenharmony_ci *		Set when RXPCU detected a version error in the Frame control
31962306a36Sopenharmony_ci *		field
32062306a36Sopenharmony_ci *
32162306a36Sopenharmony_ci * ast_based_lookup_valid
32262306a36Sopenharmony_ci *		When set, AST based lookup for this frame has found a valid
32362306a36Sopenharmony_ci *		result.
32462306a36Sopenharmony_ci *
32562306a36Sopenharmony_ci * ranging
32662306a36Sopenharmony_ci *		When set, a ranging NDPA or a ranging NDP was received.
32762306a36Sopenharmony_ci *
32862306a36Sopenharmony_ci * phy_ppdu_id
32962306a36Sopenharmony_ci *		A ppdu counter value that PHY increments for every PPDU
33062306a36Sopenharmony_ci *		received. The counter value wraps around.
33162306a36Sopenharmony_ci *
33262306a36Sopenharmony_ci * ast_index
33362306a36Sopenharmony_ci *
33462306a36Sopenharmony_ci *		This field indicates the index of the AST entry corresponding
33562306a36Sopenharmony_ci *		to this MPDU. It is provided by the GSE module instantiated
33662306a36Sopenharmony_ci *		in RXPCU.
33762306a36Sopenharmony_ci *		A value of 0xFFFF indicates an invalid AST index, meaning
33862306a36Sopenharmony_ci *		that No AST entry was found or NO AST search was performed
33962306a36Sopenharmony_ci *
34062306a36Sopenharmony_ci * sw_peer_id
34162306a36Sopenharmony_ci *		In case of ndp or phy_err or AST_based_lookup_valid == 0,
34262306a36Sopenharmony_ci *		this field will be set to 0
34362306a36Sopenharmony_ci *		This field indicates a unique peer identifier. It is set
34462306a36Sopenharmony_ci *		equal to field 'sw_peer_id' from the AST entry
34562306a36Sopenharmony_ci *
34662306a36Sopenharmony_ci * frame_control_valid
34762306a36Sopenharmony_ci *		When set, the field Mpdu_Frame_control_field has valid information
34862306a36Sopenharmony_ci *
34962306a36Sopenharmony_ci * frame_duration_valid
35062306a36Sopenharmony_ci *		When set, the field Mpdu_duration_field has valid information
35162306a36Sopenharmony_ci *
35262306a36Sopenharmony_ci * mac_addr_ad1..4_valid
35362306a36Sopenharmony_ci *		When set, the fields mac_addr_adx_..... have valid information
35462306a36Sopenharmony_ci *
35562306a36Sopenharmony_ci * mpdu_seq_ctrl_valid
35662306a36Sopenharmony_ci *
35762306a36Sopenharmony_ci *		When set, the fields mpdu_sequence_control_field and mpdu_sequence_number
35862306a36Sopenharmony_ci *		have valid information as well as field
35962306a36Sopenharmony_ci *		For MPDUs without a sequence control field, this field will
36062306a36Sopenharmony_ci *		not be set.
36162306a36Sopenharmony_ci *
36262306a36Sopenharmony_ci * mpdu_qos_ctrl_valid, mpdu_ht_ctrl_valid
36362306a36Sopenharmony_ci *
36462306a36Sopenharmony_ci *		When set, the field mpdu_qos_control_field, mpdu_ht_control has valid
36562306a36Sopenharmony_ci *		information, For MPDUs without a QoS,HT control field, this field
36662306a36Sopenharmony_ci *		will not be set.
36762306a36Sopenharmony_ci *
36862306a36Sopenharmony_ci * frame_encryption_info_valid
36962306a36Sopenharmony_ci *
37062306a36Sopenharmony_ci *		When set, the encryption related info fields, like IV and
37162306a36Sopenharmony_ci *		PN are valid
37262306a36Sopenharmony_ci *		For MPDUs that are not encrypted, this will not be set.
37362306a36Sopenharmony_ci *
37462306a36Sopenharmony_ci * mpdu_fragment_number
37562306a36Sopenharmony_ci *
37662306a36Sopenharmony_ci *		Field only valid when Mpdu_sequence_control_valid is set
37762306a36Sopenharmony_ci *		AND Fragment_flag is set. The fragment number from the 802.11 header
37862306a36Sopenharmony_ci *
37962306a36Sopenharmony_ci * more_fragment_flag
38062306a36Sopenharmony_ci *
38162306a36Sopenharmony_ci *		The More Fragment bit setting from the MPDU header of the
38262306a36Sopenharmony_ci *		received frame
38362306a36Sopenharmony_ci *
38462306a36Sopenharmony_ci * fr_ds
38562306a36Sopenharmony_ci *
38662306a36Sopenharmony_ci *		Field only valid when Mpdu_frame_control_valid is set
38762306a36Sopenharmony_ci *		Set if the from DS bit is set in the frame control.
38862306a36Sopenharmony_ci *
38962306a36Sopenharmony_ci * to_ds
39062306a36Sopenharmony_ci *
39162306a36Sopenharmony_ci *		Field only valid when Mpdu_frame_control_valid is set
39262306a36Sopenharmony_ci *		Set if the to DS bit is set in the frame control.
39362306a36Sopenharmony_ci *
39462306a36Sopenharmony_ci * encrypted
39562306a36Sopenharmony_ci *
39662306a36Sopenharmony_ci *		Field only valid when Mpdu_frame_control_valid is set.
39762306a36Sopenharmony_ci *		Protected bit from the frame control.
39862306a36Sopenharmony_ci *
39962306a36Sopenharmony_ci * mpdu_retry
40062306a36Sopenharmony_ci *		Field only valid when Mpdu_frame_control_valid is set.
40162306a36Sopenharmony_ci *		Retry bit from the frame control.  Only valid when first_msdu is set
40262306a36Sopenharmony_ci *
40362306a36Sopenharmony_ci * mpdu_sequence_number
40462306a36Sopenharmony_ci *		Field only valid when Mpdu_sequence_control_valid is set.
40562306a36Sopenharmony_ci *
40662306a36Sopenharmony_ci *		The sequence number from the 802.11 header.
40762306a36Sopenharmony_ci * key_id
40862306a36Sopenharmony_ci *		The key ID octet from the IV.
40962306a36Sopenharmony_ci *		Field only valid when Frame_encryption_info_valid is set
41062306a36Sopenharmony_ci *
41162306a36Sopenharmony_ci * new_peer_entry
41262306a36Sopenharmony_ci *		Set if new RX_PEER_ENTRY TLV follows. If clear, RX_PEER_ENTRY
41362306a36Sopenharmony_ci *		doesn't follow so RX DECRYPTION module either uses old peer
41462306a36Sopenharmony_ci *		entry or not decrypt.
41562306a36Sopenharmony_ci *
41662306a36Sopenharmony_ci * decrypt_needed
41762306a36Sopenharmony_ci *		When RXPCU sets bit 'ast_index_not_found or ast_index_timeout',
41862306a36Sopenharmony_ci *		RXPCU will also ensure that this bit is NOT set. CRYPTO for that
41962306a36Sopenharmony_ci *		reason only needs to evaluate this bit and non of the other ones
42062306a36Sopenharmony_ci *
42162306a36Sopenharmony_ci * decap_type
42262306a36Sopenharmony_ci *		Used by the OLE during decapsulation. Values are defined in
42362306a36Sopenharmony_ci *		enum %MPDU_START_DECAP_TYPE_*.
42462306a36Sopenharmony_ci *
42562306a36Sopenharmony_ci * rx_insert_vlan_c_tag_padding
42662306a36Sopenharmony_ci * rx_insert_vlan_s_tag_padding
42762306a36Sopenharmony_ci *		Insert 4 byte of all zeros as VLAN tag or double VLAN tag if
42862306a36Sopenharmony_ci *		the rx payload does not have VLAN.
42962306a36Sopenharmony_ci *
43062306a36Sopenharmony_ci * strip_vlan_c_tag_decap
43162306a36Sopenharmony_ci * strip_vlan_s_tag_decap
43262306a36Sopenharmony_ci *		Strip VLAN or double VLAN during decapsulation.
43362306a36Sopenharmony_ci *
43462306a36Sopenharmony_ci * pre_delim_count
43562306a36Sopenharmony_ci *		The number of delimiters before this MPDU. Note that this
43662306a36Sopenharmony_ci *		number is cleared at PPDU start. If this MPDU is the first
43762306a36Sopenharmony_ci *		received MPDU in the PPDU and this MPDU gets filtered-in,
43862306a36Sopenharmony_ci *		this field will indicate the number of delimiters located
43962306a36Sopenharmony_ci *		after the last MPDU in the previous PPDU.
44062306a36Sopenharmony_ci *
44162306a36Sopenharmony_ci *		If this MPDU is located after the first received MPDU in
44262306a36Sopenharmony_ci *		an PPDU, this field will indicate the number of delimiters
44362306a36Sopenharmony_ci *		located between the previous MPDU and this MPDU.
44462306a36Sopenharmony_ci *
44562306a36Sopenharmony_ci * ampdu_flag
44662306a36Sopenharmony_ci *		Received frame was part of an A-MPDU.
44762306a36Sopenharmony_ci *
44862306a36Sopenharmony_ci * bar_frame
44962306a36Sopenharmony_ci *		Received frame is a BAR frame
45062306a36Sopenharmony_ci *
45162306a36Sopenharmony_ci * raw_mpdu
45262306a36Sopenharmony_ci *		Set when no 802.11 to nwifi/ethernet hdr conversion is done
45362306a36Sopenharmony_ci *
45462306a36Sopenharmony_ci * mpdu_length
45562306a36Sopenharmony_ci *		MPDU length before decapsulation.
45662306a36Sopenharmony_ci *
45762306a36Sopenharmony_ci * first_mpdu
45862306a36Sopenharmony_ci *		Indicates the first MSDU of the PPDU.  If both first_mpdu
45962306a36Sopenharmony_ci *		and last_mpdu are set in the MSDU then this is a not an
46062306a36Sopenharmony_ci *		A-MPDU frame but a stand alone MPDU.  Interior MPDU in an
46162306a36Sopenharmony_ci *		A-MPDU shall have both first_mpdu and last_mpdu bits set to
46262306a36Sopenharmony_ci *		0.  The PPDU start status will only be valid when this bit
46362306a36Sopenharmony_ci *		is set.
46462306a36Sopenharmony_ci *
46562306a36Sopenharmony_ci * mcast_bcast
46662306a36Sopenharmony_ci *		Multicast / broadcast indicator.  Only set when the MAC
46762306a36Sopenharmony_ci *		address 1 bit 0 is set indicating mcast/bcast and the BSSID
46862306a36Sopenharmony_ci *		matches one of the 4 BSSID registers. Only set when
46962306a36Sopenharmony_ci *		first_msdu is set.
47062306a36Sopenharmony_ci *
47162306a36Sopenharmony_ci * ast_index_not_found
47262306a36Sopenharmony_ci *		Only valid when first_msdu is set. Indicates no AST matching
47362306a36Sopenharmony_ci *		entries within the max search count.
47462306a36Sopenharmony_ci *
47562306a36Sopenharmony_ci * ast_index_timeout
47662306a36Sopenharmony_ci *		Only valid when first_msdu is set. Indicates an unsuccessful
47762306a36Sopenharmony_ci *		search in the address search table due to timeout.
47862306a36Sopenharmony_ci *
47962306a36Sopenharmony_ci * power_mgmt
48062306a36Sopenharmony_ci *		Power management bit set in the 802.11 header.  Only set
48162306a36Sopenharmony_ci *		when first_msdu is set.
48262306a36Sopenharmony_ci *
48362306a36Sopenharmony_ci * non_qos
48462306a36Sopenharmony_ci *		Set if packet is not a non-QoS data frame.  Only set when
48562306a36Sopenharmony_ci *		first_msdu is set.
48662306a36Sopenharmony_ci *
48762306a36Sopenharmony_ci * null_data
48862306a36Sopenharmony_ci *		Set if frame type indicates either null data or QoS null
48962306a36Sopenharmony_ci *		data format.  Only set when first_msdu is set.
49062306a36Sopenharmony_ci *
49162306a36Sopenharmony_ci * mgmt_type
49262306a36Sopenharmony_ci *		Set if packet is a management packet.  Only set when
49362306a36Sopenharmony_ci *		first_msdu is set.
49462306a36Sopenharmony_ci *
49562306a36Sopenharmony_ci * ctrl_type
49662306a36Sopenharmony_ci *		Set if packet is a control packet.  Only set when first_msdu
49762306a36Sopenharmony_ci *		is set.
49862306a36Sopenharmony_ci *
49962306a36Sopenharmony_ci * more_data
50062306a36Sopenharmony_ci *		Set if more bit in frame control is set.  Only set when
50162306a36Sopenharmony_ci *		first_msdu is set.
50262306a36Sopenharmony_ci *
50362306a36Sopenharmony_ci * eosp
50462306a36Sopenharmony_ci *		Set if the EOSP (end of service period) bit in the QoS
50562306a36Sopenharmony_ci *		control field is set.  Only set when first_msdu is set.
50662306a36Sopenharmony_ci *
50762306a36Sopenharmony_ci *
50862306a36Sopenharmony_ci * fragment_flag
50962306a36Sopenharmony_ci *		Fragment indication
51062306a36Sopenharmony_ci *
51162306a36Sopenharmony_ci * order
51262306a36Sopenharmony_ci *		Set if the order bit in the frame control is set.  Only
51362306a36Sopenharmony_ci *		set when first_msdu is set.
51462306a36Sopenharmony_ci *
51562306a36Sopenharmony_ci * u_apsd_trigger
51662306a36Sopenharmony_ci *		U-APSD trigger frame
51762306a36Sopenharmony_ci *
51862306a36Sopenharmony_ci * encrypt_required
51962306a36Sopenharmony_ci *		Indicates that this data type frame is not encrypted even if
52062306a36Sopenharmony_ci *		the policy for this MPDU requires encryption as indicated in
52162306a36Sopenharmony_ci *		the peer table key type.
52262306a36Sopenharmony_ci *
52362306a36Sopenharmony_ci * directed
52462306a36Sopenharmony_ci *		MPDU is a directed packet which means that the RA matched
52562306a36Sopenharmony_ci *		our STA addresses.  In proxySTA it means that the TA matched
52662306a36Sopenharmony_ci *		an entry in our address search table with the corresponding
52762306a36Sopenharmony_ci *		'no_ack' bit is the address search entry cleared.
52862306a36Sopenharmony_ci * amsdu_present
52962306a36Sopenharmony_ci *		AMSDU present
53062306a36Sopenharmony_ci *
53162306a36Sopenharmony_ci * mpdu_frame_control_field
53262306a36Sopenharmony_ci *		Frame control field in header. Only valid when the field is marked valid.
53362306a36Sopenharmony_ci *
53462306a36Sopenharmony_ci * mpdu_duration_field
53562306a36Sopenharmony_ci *		Duration field in header. Only valid when the field is marked valid.
53662306a36Sopenharmony_ci *
53762306a36Sopenharmony_ci * mac_addr_adx
53862306a36Sopenharmony_ci *		MAC addresses in the received frame. Only valid when corresponding
53962306a36Sopenharmony_ci *		address valid bit is set
54062306a36Sopenharmony_ci *
54162306a36Sopenharmony_ci * mpdu_qos_control_field, mpdu_ht_control_field
54262306a36Sopenharmony_ci *		QoS/HT control fields from header. Valid only when corresponding fields
54362306a36Sopenharmony_ci *		are marked valid
54462306a36Sopenharmony_ci *
54562306a36Sopenharmony_ci * vdev_id
54662306a36Sopenharmony_ci *		Virtual device associated with this peer
54762306a36Sopenharmony_ci *		RXOLE uses this to determine intra-BSS routing.
54862306a36Sopenharmony_ci *
54962306a36Sopenharmony_ci * service_code
55062306a36Sopenharmony_ci *		Opaque service code between PPE and Wi-Fi
55162306a36Sopenharmony_ci *		This field gets passed on by REO to PPE in the EDMA descriptor
55262306a36Sopenharmony_ci *		('REO_TO_PPE_RING').
55362306a36Sopenharmony_ci *
55462306a36Sopenharmony_ci * priority_valid
55562306a36Sopenharmony_ci *		This field gets passed on by REO to PPE in the EDMA descriptor
55662306a36Sopenharmony_ci *		('REO_TO_PPE_RING').
55762306a36Sopenharmony_ci *
55862306a36Sopenharmony_ci * src_info
55962306a36Sopenharmony_ci *		Source (virtual) device/interface info. associated with
56062306a36Sopenharmony_ci *		this peer
56162306a36Sopenharmony_ci *		This field gets passed on by REO to PPE in the EDMA descriptor
56262306a36Sopenharmony_ci *		('REO_TO_PPE_RING').
56362306a36Sopenharmony_ci *
56462306a36Sopenharmony_ci * multi_link_addr_ad1_ad2_valid
56562306a36Sopenharmony_ci *		If set, Rx OLE shall convert Address1 and Address2 of received
56662306a36Sopenharmony_ci *		data frames to multi-link addresses during decapsulation to eth/nwifi
56762306a36Sopenharmony_ci *
56862306a36Sopenharmony_ci * multi_link_addr_ad1,ad2
56962306a36Sopenharmony_ci *		Multi-link receiver address1,2. Only valid when corresponding
57062306a36Sopenharmony_ci *		valid bit is set
57162306a36Sopenharmony_ci *
57262306a36Sopenharmony_ci * authorize_to_send_wds
57362306a36Sopenharmony_ci *		If not set, RXDMA shall perform error-routing for WDS packets
57462306a36Sopenharmony_ci *		as the sender is not authorized and might misuse WDS frame
57562306a36Sopenharmony_ci *		format to inject packets with arbitrary DA/SA.
57662306a36Sopenharmony_ci *
57762306a36Sopenharmony_ci */
57862306a36Sopenharmony_ci
57962306a36Sopenharmony_cienum rx_msdu_start_pkt_type {
58062306a36Sopenharmony_ci	RX_MSDU_START_PKT_TYPE_11A,
58162306a36Sopenharmony_ci	RX_MSDU_START_PKT_TYPE_11B,
58262306a36Sopenharmony_ci	RX_MSDU_START_PKT_TYPE_11N,
58362306a36Sopenharmony_ci	RX_MSDU_START_PKT_TYPE_11AC,
58462306a36Sopenharmony_ci	RX_MSDU_START_PKT_TYPE_11AX,
58562306a36Sopenharmony_ci};
58662306a36Sopenharmony_ci
58762306a36Sopenharmony_cienum rx_msdu_start_sgi {
58862306a36Sopenharmony_ci	RX_MSDU_START_SGI_0_8_US,
58962306a36Sopenharmony_ci	RX_MSDU_START_SGI_0_4_US,
59062306a36Sopenharmony_ci	RX_MSDU_START_SGI_1_6_US,
59162306a36Sopenharmony_ci	RX_MSDU_START_SGI_3_2_US,
59262306a36Sopenharmony_ci};
59362306a36Sopenharmony_ci
59462306a36Sopenharmony_cienum rx_msdu_start_recv_bw {
59562306a36Sopenharmony_ci	RX_MSDU_START_RECV_BW_20MHZ,
59662306a36Sopenharmony_ci	RX_MSDU_START_RECV_BW_40MHZ,
59762306a36Sopenharmony_ci	RX_MSDU_START_RECV_BW_80MHZ,
59862306a36Sopenharmony_ci	RX_MSDU_START_RECV_BW_160MHZ,
59962306a36Sopenharmony_ci};
60062306a36Sopenharmony_ci
60162306a36Sopenharmony_cienum rx_msdu_start_reception_type {
60262306a36Sopenharmony_ci	RX_MSDU_START_RECEPTION_TYPE_SU,
60362306a36Sopenharmony_ci	RX_MSDU_START_RECEPTION_TYPE_DL_MU_MIMO,
60462306a36Sopenharmony_ci	RX_MSDU_START_RECEPTION_TYPE_DL_MU_OFDMA,
60562306a36Sopenharmony_ci	RX_MSDU_START_RECEPTION_TYPE_DL_MU_OFDMA_MIMO,
60662306a36Sopenharmony_ci	RX_MSDU_START_RECEPTION_TYPE_UL_MU_MIMO,
60762306a36Sopenharmony_ci	RX_MSDU_START_RECEPTION_TYPE_UL_MU_OFDMA,
60862306a36Sopenharmony_ci	RX_MSDU_START_RECEPTION_TYPE_UL_MU_OFDMA_MIMO,
60962306a36Sopenharmony_ci};
61062306a36Sopenharmony_ci
61162306a36Sopenharmony_ci#define RX_MSDU_END_INFO0_RXPCU_MPDU_FITLER	GENMASK(1, 0)
61262306a36Sopenharmony_ci#define RX_MSDU_END_INFO0_SW_FRAME_GRP_ID	GENMASK(8, 2)
61362306a36Sopenharmony_ci
61462306a36Sopenharmony_ci#define RX_MSDU_END_INFO1_REPORTED_MPDU_LENGTH	GENMASK(13, 0)
61562306a36Sopenharmony_ci
61662306a36Sopenharmony_ci#define RX_MSDU_END_INFO2_CCE_SUPER_RULE	GENMASK(13, 8)
61762306a36Sopenharmony_ci#define RX_MSDU_END_INFO2_CCND_TRUNCATE		BIT(14)
61862306a36Sopenharmony_ci#define RX_MSDU_END_INFO2_CCND_CCE_DIS		BIT(15)
61962306a36Sopenharmony_ci
62062306a36Sopenharmony_ci#define RX_MSDU_END_INFO3_DA_OFFSET		GENMASK(5, 0)
62162306a36Sopenharmony_ci#define RX_MSDU_END_INFO3_SA_OFFSET		GENMASK(11, 6)
62262306a36Sopenharmony_ci#define RX_MSDU_END_INFO3_DA_OFFSET_VALID	BIT(12)
62362306a36Sopenharmony_ci#define RX_MSDU_END_INFO3_SA_OFFSET_VALID	BIT(13)
62462306a36Sopenharmony_ci
62562306a36Sopenharmony_ci#define RX_MSDU_END_INFO4_TCP_FLAG		GENMASK(8, 0)
62662306a36Sopenharmony_ci#define RX_MSDU_END_INFO4_LRO_ELIGIBLE		BIT(9)
62762306a36Sopenharmony_ci
62862306a36Sopenharmony_ci#define RX_MSDU_END_INFO5_SA_IDX_TIMEOUT	BIT(0)
62962306a36Sopenharmony_ci#define RX_MSDU_END_INFO5_DA_IDX_TIMEOUT	BIT(1)
63062306a36Sopenharmony_ci#define RX_MSDU_END_INFO5_TO_DS			BIT(2)
63162306a36Sopenharmony_ci#define RX_MSDU_END_INFO5_TID			GENMASK(6, 3)
63262306a36Sopenharmony_ci#define RX_MSDU_END_INFO5_SA_IS_VALID		BIT(7)
63362306a36Sopenharmony_ci#define RX_MSDU_END_INFO5_DA_IS_VALID		BIT(8)
63462306a36Sopenharmony_ci#define RX_MSDU_END_INFO5_DA_IS_MCBC		BIT(9)
63562306a36Sopenharmony_ci#define RX_MSDU_END_INFO5_L3_HDR_PADDING	GENMASK(11, 10)
63662306a36Sopenharmony_ci#define RX_MSDU_END_INFO5_FIRST_MSDU		BIT(12)
63762306a36Sopenharmony_ci#define RX_MSDU_END_INFO5_LAST_MSDU		BIT(13)
63862306a36Sopenharmony_ci#define RX_MSDU_END_INFO5_FROM_DS		BIT(14)
63962306a36Sopenharmony_ci#define RX_MSDU_END_INFO5_IP_CHKSUM_FAIL_COPY	BIT(15)
64062306a36Sopenharmony_ci
64162306a36Sopenharmony_ci#define RX_MSDU_END_INFO6_MSDU_DROP		BIT(0)
64262306a36Sopenharmony_ci#define RX_MSDU_END_INFO6_REO_DEST_IND		GENMASK(5, 1)
64362306a36Sopenharmony_ci#define RX_MSDU_END_INFO6_FLOW_IDX		GENMASK(25, 6)
64462306a36Sopenharmony_ci#define RX_MSDU_END_INFO6_USE_PPE		BIT(26)
64562306a36Sopenharmony_ci#define RX_MSDU_END_INFO6_MESH_STA		GENMASK(28, 27)
64662306a36Sopenharmony_ci#define RX_MSDU_END_INFO6_VLAN_CTAG_STRIPPED	BIT(29)
64762306a36Sopenharmony_ci#define RX_MSDU_END_INFO6_VLAN_STAG_STRIPPED	BIT(30)
64862306a36Sopenharmony_ci#define RX_MSDU_END_INFO6_FRAGMENT_FLAG		BIT(31)
64962306a36Sopenharmony_ci
65062306a36Sopenharmony_ci#define RX_MSDU_END_INFO7_AGGR_COUNT		GENMASK(7, 0)
65162306a36Sopenharmony_ci#define RX_MSDU_END_INFO7_FLOW_AGGR_CONTN	BIT(8)
65262306a36Sopenharmony_ci#define RX_MSDU_END_INFO7_FISA_TIMEOUT		BIT(9)
65362306a36Sopenharmony_ci#define RX_MSDU_END_INFO7_TCPUDP_CSUM_FAIL_CPY	BIT(10)
65462306a36Sopenharmony_ci#define RX_MSDU_END_INFO7_MSDU_LIMIT_ERROR	BIT(11)
65562306a36Sopenharmony_ci#define RX_MSDU_END_INFO7_FLOW_IDX_TIMEOUT	BIT(12)
65662306a36Sopenharmony_ci#define RX_MSDU_END_INFO7_FLOW_IDX_INVALID	BIT(13)
65762306a36Sopenharmony_ci#define RX_MSDU_END_INFO7_CCE_MATCH		BIT(14)
65862306a36Sopenharmony_ci#define RX_MSDU_END_INFO7_AMSDU_PARSER_ERR	BIT(15)
65962306a36Sopenharmony_ci
66062306a36Sopenharmony_ci#define RX_MSDU_END_INFO8_KEY_ID		GENMASK(7, 0)
66162306a36Sopenharmony_ci
66262306a36Sopenharmony_ci#define RX_MSDU_END_INFO9_SERVICE_CODE		GENMASK(14, 6)
66362306a36Sopenharmony_ci#define RX_MSDU_END_INFO9_PRIORITY_VALID	BIT(15)
66462306a36Sopenharmony_ci#define RX_MSDU_END_INFO9_INRA_BSS		BIT(16)
66562306a36Sopenharmony_ci#define RX_MSDU_END_INFO9_DEST_CHIP_ID		GENMASK(18, 17)
66662306a36Sopenharmony_ci#define RX_MSDU_END_INFO9_MCAST_ECHO		BIT(19)
66762306a36Sopenharmony_ci#define RX_MSDU_END_INFO9_WDS_LEARN_EVENT	BIT(20)
66862306a36Sopenharmony_ci#define RX_MSDU_END_INFO9_WDS_ROAM_EVENT	BIT(21)
66962306a36Sopenharmony_ci#define RX_MSDU_END_INFO9_WDS_KEEP_ALIVE_EVENT	BIT(22)
67062306a36Sopenharmony_ci
67162306a36Sopenharmony_ci#define RX_MSDU_END_INFO10_MSDU_LENGTH		GENMASK(13, 0)
67262306a36Sopenharmony_ci#define RX_MSDU_END_INFO10_STBC			BIT(14)
67362306a36Sopenharmony_ci#define RX_MSDU_END_INFO10_IPSEC_ESP		BIT(15)
67462306a36Sopenharmony_ci#define RX_MSDU_END_INFO10_L3_OFFSET		GENMASK(22, 16)
67562306a36Sopenharmony_ci#define RX_MSDU_END_INFO10_IPSEC_AH		BIT(23)
67662306a36Sopenharmony_ci#define RX_MSDU_END_INFO10_L4_OFFSET		GENMASK(31, 24)
67762306a36Sopenharmony_ci
67862306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_MSDU_NUMBER		GENMASK(7, 0)
67962306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_DECAP_FORMAT		GENMASK(9, 8)
68062306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_IPV4			BIT(10)
68162306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_IPV6			BIT(11)
68262306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_TCP			BIT(12)
68362306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_UDP			BIT(13)
68462306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_IP_FRAG		BIT(14)
68562306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_TCP_ONLY_ACK		BIT(15)
68662306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_DA_IS_BCAST_MCAST	BIT(16)
68762306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_SEL_TOEPLITZ_HASH	GENMASK(18, 17)
68862306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_IP_FIXED_HDR_VALID	BIT(19)
68962306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_IP_EXTN_HDR_VALID	BIT(20)
69062306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_IP_TCP_UDP_HDR_VALID	BIT(21)
69162306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_MESH_CTRL_PRESENT	BIT(22)
69262306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_LDPC			BIT(23)
69362306a36Sopenharmony_ci#define RX_MSDU_END_INFO11_IP4_IP6_NXT_HDR	GENMASK(31, 24)
69462306a36Sopenharmony_ci
69562306a36Sopenharmony_ci#define RX_MSDU_END_INFO12_USER_RSSI		GENMASK(7, 0)
69662306a36Sopenharmony_ci#define RX_MSDU_END_INFO12_PKT_TYPE		GENMASK(11, 8)
69762306a36Sopenharmony_ci#define RX_MSDU_END_INFO12_SGI			GENMASK(13, 12)
69862306a36Sopenharmony_ci#define RX_MSDU_END_INFO12_RATE_MCS		GENMASK(17, 14)
69962306a36Sopenharmony_ci#define RX_MSDU_END_INFO12_RECV_BW		GENMASK(20, 18)
70062306a36Sopenharmony_ci#define RX_MSDU_END_INFO12_RECEPTION_TYPE	GENMASK(23, 21)
70162306a36Sopenharmony_ci#define RX_MSDU_END_INFO12_MIMO_SS_BITMAP	GENMASK(30, 24)
70262306a36Sopenharmony_ci#define RX_MSDU_END_INFO12_MIMO_DONE_COPY	BIT(31)
70362306a36Sopenharmony_ci
70462306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_FIRST_MPDU		BIT(0)
70562306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_MCAST_BCAST		BIT(2)
70662306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_AST_IDX_NOT_FOUND	BIT(3)
70762306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_AST_IDX_TIMEDOUT	BIT(4)
70862306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_POWER_MGMT		BIT(5)
70962306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_NON_QOS		BIT(6)
71062306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_NULL_DATA		BIT(7)
71162306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_MGMT_TYPE		BIT(8)
71262306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_CTRL_TYPE		BIT(9)
71362306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_MORE_DATA		BIT(10)
71462306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_EOSP			BIT(11)
71562306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_A_MSDU_ERROR		BIT(12)
71662306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_ORDER		BIT(14)
71762306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_WIFI_PARSER_ERR	BIT(15)
71862306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_OVERFLOW_ERR		BIT(16)
71962306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_MSDU_LEN_ERR		BIT(17)
72062306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_TCP_UDP_CKSUM_FAIL	BIT(18)
72162306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_IP_CKSUM_FAIL	BIT(19)
72262306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_SA_IDX_INVALID	BIT(20)
72362306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_DA_IDX_INVALID	BIT(21)
72462306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_AMSDU_ADDR_MISMATCH	BIT(22)
72562306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_RX_IN_TX_DECRYPT_BYP	BIT(23)
72662306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_ENCRYPT_REQUIRED	BIT(24)
72762306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_DIRECTED		BIT(25)
72862306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_BUFFER_FRAGMENT	BIT(26)
72962306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_MPDU_LEN_ERR		BIT(27)
73062306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_TKIP_MIC_ERR		BIT(28)
73162306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_DECRYPT_ERR		BIT(29)
73262306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_UNDECRYPT_FRAME_ERR	BIT(30)
73362306a36Sopenharmony_ci#define RX_MSDU_END_INFO13_FCS_ERR		BIT(31)
73462306a36Sopenharmony_ci
73562306a36Sopenharmony_ci#define RX_MSDU_END_INFO14_DECRYPT_STATUS_CODE	GENMASK(12, 10)
73662306a36Sopenharmony_ci#define RX_MSDU_END_INFO14_RX_BITMAP_NOT_UPDED	BIT(13)
73762306a36Sopenharmony_ci#define RX_MSDU_END_INFO14_MSDU_DONE		BIT(31)
73862306a36Sopenharmony_ci
73962306a36Sopenharmony_cistruct rx_msdu_end_qcn9274 {
74062306a36Sopenharmony_ci	__le16 info0;
74162306a36Sopenharmony_ci	__le16 phy_ppdu_id;
74262306a36Sopenharmony_ci	__le16 ip_hdr_cksum;
74362306a36Sopenharmony_ci	__le16 info1;
74462306a36Sopenharmony_ci	__le16 info2;
74562306a36Sopenharmony_ci	__le16 cumulative_l3_checksum;
74662306a36Sopenharmony_ci	__le32 rule_indication0;
74762306a36Sopenharmony_ci	__le32 ipv6_options_crc;
74862306a36Sopenharmony_ci	__le16 info3;
74962306a36Sopenharmony_ci	__le16 l3_type;
75062306a36Sopenharmony_ci	__le32 rule_indication1;
75162306a36Sopenharmony_ci	__le32 tcp_seq_num;
75262306a36Sopenharmony_ci	__le32 tcp_ack_num;
75362306a36Sopenharmony_ci	__le16 info4;
75462306a36Sopenharmony_ci	__le16 window_size;
75562306a36Sopenharmony_ci	__le16 sa_sw_peer_id;
75662306a36Sopenharmony_ci	__le16 info5;
75762306a36Sopenharmony_ci	__le16 sa_idx;
75862306a36Sopenharmony_ci	__le16 da_idx_or_sw_peer_id;
75962306a36Sopenharmony_ci	__le32 info6;
76062306a36Sopenharmony_ci	__le32 fse_metadata;
76162306a36Sopenharmony_ci	__le16 cce_metadata;
76262306a36Sopenharmony_ci	__le16 tcp_udp_cksum;
76362306a36Sopenharmony_ci	__le16 info7;
76462306a36Sopenharmony_ci	__le16 cumulative_ip_length;
76562306a36Sopenharmony_ci	__le32 info8;
76662306a36Sopenharmony_ci	__le32 info9;
76762306a36Sopenharmony_ci	__le32 info10;
76862306a36Sopenharmony_ci	__le32 info11;
76962306a36Sopenharmony_ci	__le16 vlan_ctag_ci;
77062306a36Sopenharmony_ci	__le16 vlan_stag_ci;
77162306a36Sopenharmony_ci	__le32 peer_meta_data;
77262306a36Sopenharmony_ci	__le32 info12;
77362306a36Sopenharmony_ci	__le32 flow_id_toeplitz;
77462306a36Sopenharmony_ci	__le32 ppdu_start_timestamp_63_32;
77562306a36Sopenharmony_ci	__le32 phy_meta_data;
77662306a36Sopenharmony_ci	__le32 ppdu_start_timestamp_31_0;
77762306a36Sopenharmony_ci	__le32 toeplitz_hash_2_or_4;
77862306a36Sopenharmony_ci	__le16 res0;
77962306a36Sopenharmony_ci	__le16 sa_15_0;
78062306a36Sopenharmony_ci	__le32 sa_47_16;
78162306a36Sopenharmony_ci	__le32 info13;
78262306a36Sopenharmony_ci	__le32 info14;
78362306a36Sopenharmony_ci} __packed;
78462306a36Sopenharmony_ci
78562306a36Sopenharmony_ci/* rx_msdu_end
78662306a36Sopenharmony_ci *
78762306a36Sopenharmony_ci * rxpcu_mpdu_filter_in_category
78862306a36Sopenharmony_ci *		Field indicates what the reason was that this mpdu frame
78962306a36Sopenharmony_ci *		was allowed to come into the receive path by rxpcu. Values
79062306a36Sopenharmony_ci *		are defined in enum %RX_DESC_RXPCU_FILTER_*.
79162306a36Sopenharmony_ci *
79262306a36Sopenharmony_ci * sw_frame_group_id
79362306a36Sopenharmony_ci *		SW processes frames based on certain classifications. Values
79462306a36Sopenharmony_ci *		are defined in enum %RX_DESC_SW_FRAME_GRP_ID_*.
79562306a36Sopenharmony_ci *
79662306a36Sopenharmony_ci * phy_ppdu_id
79762306a36Sopenharmony_ci *		A ppdu counter value that PHY increments for every PPDU
79862306a36Sopenharmony_ci *		received. The counter value wraps around.
79962306a36Sopenharmony_ci *
80062306a36Sopenharmony_ci * ip_hdr_cksum
80162306a36Sopenharmony_ci *		This can include the IP header checksum or the pseudo
80262306a36Sopenharmony_ci *		header checksum used by TCP/UDP checksum.
80362306a36Sopenharmony_ci *
80462306a36Sopenharmony_ci * reported_mpdu_length
80562306a36Sopenharmony_ci *		MPDU length before decapsulation. Only valid when first_msdu is
80662306a36Sopenharmony_ci *		set. This field is taken directly from the length field of the
80762306a36Sopenharmony_ci *		A-MPDU delimiter or the preamble length field for non-A-MPDU
80862306a36Sopenharmony_ci *		frames.
80962306a36Sopenharmony_ci *
81062306a36Sopenharmony_ci * cce_super_rule
81162306a36Sopenharmony_ci *		Indicates the super filter rule.
81262306a36Sopenharmony_ci *
81362306a36Sopenharmony_ci * cce_classify_not_done_truncate
81462306a36Sopenharmony_ci *		Classification failed due to truncated frame.
81562306a36Sopenharmony_ci *
81662306a36Sopenharmony_ci * cce_classify_not_done_cce_dis
81762306a36Sopenharmony_ci *		Classification failed due to CCE global disable
81862306a36Sopenharmony_ci *
81962306a36Sopenharmony_ci * cumulative_l3_checksum
82062306a36Sopenharmony_ci *		FISA: IP header checksum including the total MSDU length
82162306a36Sopenharmony_ci *		that is part of this flow aggregated so far, reported if
82262306a36Sopenharmony_ci *		'RXOLE_R0_FISA_CTRL. CHKSUM_CUM_IP_LEN_EN' is set
82362306a36Sopenharmony_ci *
82462306a36Sopenharmony_ci * rule_indication
82562306a36Sopenharmony_ci *		Bitmap indicating which of rules have matched.
82662306a36Sopenharmony_ci *
82762306a36Sopenharmony_ci * ipv6_options_crc
82862306a36Sopenharmony_ci *		32 bit CRC computed out of  IP v6 extension headers.
82962306a36Sopenharmony_ci *
83062306a36Sopenharmony_ci * da_offset
83162306a36Sopenharmony_ci *		Offset into MSDU buffer for DA.
83262306a36Sopenharmony_ci *
83362306a36Sopenharmony_ci * sa_offset
83462306a36Sopenharmony_ci *		Offset into MSDU buffer for SA.
83562306a36Sopenharmony_ci *
83662306a36Sopenharmony_ci * da_offset_valid
83762306a36Sopenharmony_ci *		da_offset field is valid. This will be set to 0 in case
83862306a36Sopenharmony_ci *		of a dynamic A-MSDU when DA is compressed.
83962306a36Sopenharmony_ci *
84062306a36Sopenharmony_ci * sa_offset_valid
84162306a36Sopenharmony_ci *		sa_offset field is valid. This will be set to 0 in case
84262306a36Sopenharmony_ci *		of a dynamic A-MSDU when SA is compressed.
84362306a36Sopenharmony_ci *
84462306a36Sopenharmony_ci * l3_type
84562306a36Sopenharmony_ci *		The 16-bit type value indicating the type of L3 later
84662306a36Sopenharmony_ci *		extracted from LLC/SNAP, set to zero if SNAP is not
84762306a36Sopenharmony_ci *		available.
84862306a36Sopenharmony_ci *
84962306a36Sopenharmony_ci * tcp_seq_number
85062306a36Sopenharmony_ci *		TCP sequence number.
85162306a36Sopenharmony_ci *
85262306a36Sopenharmony_ci * tcp_ack_number
85362306a36Sopenharmony_ci *		TCP acknowledge number.
85462306a36Sopenharmony_ci *
85562306a36Sopenharmony_ci * tcp_flag
85662306a36Sopenharmony_ci *		TCP flags {NS, CWR, ECE, URG, ACK, PSH, RST, SYN, FIN}.
85762306a36Sopenharmony_ci *
85862306a36Sopenharmony_ci * lro_eligible
85962306a36Sopenharmony_ci *		Computed out of TCP and IP fields to indicate that this
86062306a36Sopenharmony_ci *		MSDU is eligible for LRO.
86162306a36Sopenharmony_ci *
86262306a36Sopenharmony_ci * window_size
86362306a36Sopenharmony_ci *		TCP receive window size.
86462306a36Sopenharmony_ci *
86562306a36Sopenharmony_ci * sa_sw_peer_id
86662306a36Sopenharmony_ci *		sw_peer_id from the address search entry corresponding to the
86762306a36Sopenharmony_ci *		source address of the MSDU.
86862306a36Sopenharmony_ci *
86962306a36Sopenharmony_ci * sa_idx_timeout
87062306a36Sopenharmony_ci *		Indicates an unsuccessful MAC source address search due to the
87162306a36Sopenharmony_ci *		expiring of the search timer.
87262306a36Sopenharmony_ci *
87362306a36Sopenharmony_ci * da_idx_timeout
87462306a36Sopenharmony_ci *		Indicates an unsuccessful MAC destination address search due to
87562306a36Sopenharmony_ci *		the expiring of the search timer.
87662306a36Sopenharmony_ci *
87762306a36Sopenharmony_ci * to_ds
87862306a36Sopenharmony_ci *		Set if the to DS bit is set in the frame control.
87962306a36Sopenharmony_ci *
88062306a36Sopenharmony_ci * tid
88162306a36Sopenharmony_ci *		TID field in the QoS control field
88262306a36Sopenharmony_ci *
88362306a36Sopenharmony_ci * sa_is_valid
88462306a36Sopenharmony_ci *		Indicates that OLE found a valid SA entry.
88562306a36Sopenharmony_ci *
88662306a36Sopenharmony_ci * da_is_valid
88762306a36Sopenharmony_ci *		Indicates that OLE found a valid DA entry.
88862306a36Sopenharmony_ci *
88962306a36Sopenharmony_ci * da_is_mcbc
89062306a36Sopenharmony_ci *		Field Only valid if da_is_valid is set. Indicates the DA address
89162306a36Sopenharmony_ci *		was a Multicast of Broadcast address.
89262306a36Sopenharmony_ci *
89362306a36Sopenharmony_ci * l3_header_padding
89462306a36Sopenharmony_ci *		Number of bytes padded  to make sure that the L3 header will
89562306a36Sopenharmony_ci *		always start of a Dword boundary.
89662306a36Sopenharmony_ci *
89762306a36Sopenharmony_ci * first_msdu
89862306a36Sopenharmony_ci *		Indicates the first MSDU of A-MSDU. If both first_msdu and
89962306a36Sopenharmony_ci *		last_msdu are set in the MSDU then this is a non-aggregated MSDU
90062306a36Sopenharmony_ci *		frame: normal MPDU. Interior MSDU in an A-MSDU shall have both
90162306a36Sopenharmony_ci *		first_mpdu and last_mpdu bits set to 0.
90262306a36Sopenharmony_ci *
90362306a36Sopenharmony_ci * last_msdu
90462306a36Sopenharmony_ci *		Indicates the last MSDU of the A-MSDU. MPDU end status is only
90562306a36Sopenharmony_ci *		valid when last_msdu is set.
90662306a36Sopenharmony_ci *
90762306a36Sopenharmony_ci * fr_ds
90862306a36Sopenharmony_ci *		Set if the from DS bit is set in the frame control.
90962306a36Sopenharmony_ci *
91062306a36Sopenharmony_ci * ip_chksum_fail_copy
91162306a36Sopenharmony_ci *		Indicates that the computed checksum did not match the
91262306a36Sopenharmony_ci *		checksum in the IP header.
91362306a36Sopenharmony_ci *
91462306a36Sopenharmony_ci * sa_idx
91562306a36Sopenharmony_ci *		The offset in the address table which matches the MAC source
91662306a36Sopenharmony_ci *		address.
91762306a36Sopenharmony_ci *
91862306a36Sopenharmony_ci * da_idx_or_sw_peer_id
91962306a36Sopenharmony_ci *		Based on a register configuration in RXOLE, this field will
92062306a36Sopenharmony_ci *		contain:
92162306a36Sopenharmony_ci *		The offset in the address table which matches the MAC destination
92262306a36Sopenharmony_ci *		address
92362306a36Sopenharmony_ci *		OR:
92462306a36Sopenharmony_ci *		sw_peer_id from the address search entry corresponding to
92562306a36Sopenharmony_ci *		the destination address of the MSDU
92662306a36Sopenharmony_ci *
92762306a36Sopenharmony_ci * msdu_drop
92862306a36Sopenharmony_ci *		REO shall drop this MSDU and not forward it to any other ring.
92962306a36Sopenharmony_ci *
93062306a36Sopenharmony_ci *		The id of the reo exit ring where the msdu frame shall push
93162306a36Sopenharmony_ci *		after (MPDU level) reordering has finished. Values are defined
93262306a36Sopenharmony_ci *		in enum %HAL_RX_MSDU_DESC_REO_DEST_IND_.
93362306a36Sopenharmony_ci *
93462306a36Sopenharmony_ci * flow_idx
93562306a36Sopenharmony_ci *		Flow table index.
93662306a36Sopenharmony_ci *
93762306a36Sopenharmony_ci * use_ppe
93862306a36Sopenharmony_ci *		Indicates to RXDMA to ignore the REO_destination_indication
93962306a36Sopenharmony_ci *		and use a programmed value corresponding to the REO2PPE
94062306a36Sopenharmony_ci *		ring
94162306a36Sopenharmony_ci *
94262306a36Sopenharmony_ci * mesh_sta
94362306a36Sopenharmony_ci *		When set, this is a Mesh (11s) STA.
94462306a36Sopenharmony_ci *
94562306a36Sopenharmony_ci * vlan_ctag_stripped
94662306a36Sopenharmony_ci *		Set by RXOLE if it stripped 4-bytes of C-VLAN Tag from the
94762306a36Sopenharmony_ci *		packet
94862306a36Sopenharmony_ci *
94962306a36Sopenharmony_ci * vlan_stag_stripped
95062306a36Sopenharmony_ci *		Set by RXOLE if it stripped 4-bytes of S-VLAN Tag from the
95162306a36Sopenharmony_ci *		packet
95262306a36Sopenharmony_ci *
95362306a36Sopenharmony_ci * fragment_flag
95462306a36Sopenharmony_ci *		Indicates that this is an 802.11 fragment frame.  This is
95562306a36Sopenharmony_ci *		set when either the more_frag bit is set in the frame control
95662306a36Sopenharmony_ci *		or the fragment number is not zero.  Only set when first_msdu
95762306a36Sopenharmony_ci *		is set.
95862306a36Sopenharmony_ci *
95962306a36Sopenharmony_ci * fse_metadata
96062306a36Sopenharmony_ci *		FSE related meta data.
96162306a36Sopenharmony_ci *
96262306a36Sopenharmony_ci * cce_metadata
96362306a36Sopenharmony_ci *		CCE related meta data.
96462306a36Sopenharmony_ci *
96562306a36Sopenharmony_ci * tcp_udp_chksum
96662306a36Sopenharmony_ci *		The value of the computed TCP/UDP checksum.  A mode bit
96762306a36Sopenharmony_ci *		selects whether this checksum is the full checksum or the
96862306a36Sopenharmony_ci *		partial checksum which does not include the pseudo header.
96962306a36Sopenharmony_ci *
97062306a36Sopenharmony_ci * aggregation_count
97162306a36Sopenharmony_ci *		Number of MSDU's aggregated so far
97262306a36Sopenharmony_ci *
97362306a36Sopenharmony_ci * flow_aggregation_continuation
97462306a36Sopenharmony_ci *		To indicate that this MSDU can be aggregated with
97562306a36Sopenharmony_ci *		the previous packet with the same flow id
97662306a36Sopenharmony_ci *
97762306a36Sopenharmony_ci * fisa_timeout
97862306a36Sopenharmony_ci *		To indicate that the aggregation has restarted for
97962306a36Sopenharmony_ci *		this flow due to timeout
98062306a36Sopenharmony_ci *
98162306a36Sopenharmony_ci * tcp_udp_chksum_fail
98262306a36Sopenharmony_ci *		Indicates that the computed checksum (tcp_udp_chksum) did
98362306a36Sopenharmony_ci *		not match the checksum in the TCP/UDP header.
98462306a36Sopenharmony_ci *
98562306a36Sopenharmony_ci * msdu_limit_error
98662306a36Sopenharmony_ci *		Indicates that the MSDU threshold was exceeded and thus all the
98762306a36Sopenharmony_ci *		rest of the MSDUs will not be scattered and will not be
98862306a36Sopenharmony_ci *		decapsulated but will be DMA'ed in RAW format as a single MSDU.
98962306a36Sopenharmony_ci *
99062306a36Sopenharmony_ci * flow_idx_timeout
99162306a36Sopenharmony_ci *		Indicates an unsuccessful flow search due to the expiring of
99262306a36Sopenharmony_ci *		the search timer.
99362306a36Sopenharmony_ci *
99462306a36Sopenharmony_ci * flow_idx_invalid
99562306a36Sopenharmony_ci *		flow id is not valid.
99662306a36Sopenharmony_ci *
99762306a36Sopenharmony_ci * cce_match
99862306a36Sopenharmony_ci *		Indicates that this status has a corresponding MSDU that
99962306a36Sopenharmony_ci *		requires FW processing. The OLE will have classification
100062306a36Sopenharmony_ci *		ring mask registers which will indicate the ring(s) for
100162306a36Sopenharmony_ci *		packets and descriptors which need FW attention.
100262306a36Sopenharmony_ci *
100362306a36Sopenharmony_ci * amsdu_parser_error
100462306a36Sopenharmony_ci *		A-MSDU could not be properly de-agregated.
100562306a36Sopenharmony_ci *
100662306a36Sopenharmony_ci * cumulative_ip_length
100762306a36Sopenharmony_ci *		Total MSDU length that is part of this flow aggregated
100862306a36Sopenharmony_ci *		so far
100962306a36Sopenharmony_ci *
101062306a36Sopenharmony_ci * key_id
101162306a36Sopenharmony_ci *		The key ID octet from the IV. Only valid when first_msdu is set.
101262306a36Sopenharmony_ci *
101362306a36Sopenharmony_ci * service_code
101462306a36Sopenharmony_ci *		Opaque service code between PPE and Wi-Fi
101562306a36Sopenharmony_ci *
101662306a36Sopenharmony_ci * priority_valid
101762306a36Sopenharmony_ci *		This field gets passed on by REO to PPE in the EDMA descriptor
101862306a36Sopenharmony_ci *
101962306a36Sopenharmony_ci * intra_bss
102062306a36Sopenharmony_ci *		This packet needs intra-BSS routing by SW as the 'vdev_id'
102162306a36Sopenharmony_ci *		for the destination is the same as 'vdev_id' (from 'RX_MPDU_PCU_START')
102262306a36Sopenharmony_ci *		that this MSDU was got in.
102362306a36Sopenharmony_ci *
102462306a36Sopenharmony_ci * dest_chip_id
102562306a36Sopenharmony_ci *		If intra_bss is set, copied by RXOLE from 'ADDR_SEARCH_ENTRY'
102662306a36Sopenharmony_ci *		to support intra-BSS routing with multi-chip multi-link
102762306a36Sopenharmony_ci *		operation. This indicates into which chip's TCL the packet should be
102862306a36Sopenharmony_ci *		queueued
102962306a36Sopenharmony_ci *
103062306a36Sopenharmony_ci * multicast_echo
103162306a36Sopenharmony_ci *		If set, this packet is a multicast echo, i.e. the DA is
103262306a36Sopenharmony_ci *		multicast and Rx OLE SA search with mcast_echo_check = 1
103362306a36Sopenharmony_ci *		passed. RXDMA should release such packets to WBM.
103462306a36Sopenharmony_ci *
103562306a36Sopenharmony_ci * wds_learning_event
103662306a36Sopenharmony_ci *		If set, this packet has an SA search failure with WDS learning
103762306a36Sopenharmony_ci *		enabled for the peer. RXOLE should route this TLV to the
103862306a36Sopenharmony_ci *		RXDMA0 status ring to notify FW.
103962306a36Sopenharmony_ci *
104062306a36Sopenharmony_ci * wds_roaming_event
104162306a36Sopenharmony_ci *		If set, this packet's SA 'Sw_peer_id' mismatches the 'Sw_peer_id'
104262306a36Sopenharmony_ci *		of the peer through which the packet was got, indicating
104362306a36Sopenharmony_ci *		the SA node has roamed. RXOLE should route this TLV to
104462306a36Sopenharmony_ci *		the RXDMA0 status ring to notify FW.
104562306a36Sopenharmony_ci *
104662306a36Sopenharmony_ci * wds_keep_alive_event
104762306a36Sopenharmony_ci *		If set, the AST timestamp for this packet's SA is older
104862306a36Sopenharmony_ci *		than the current timestamp by more than a threshold programmed
104962306a36Sopenharmony_ci *		in RXOLE. RXOLE should route this TLV to the RXDMA0 status
105062306a36Sopenharmony_ci *		ring to notify FW to keep the AST entry for the SA alive.
105162306a36Sopenharmony_ci *
105262306a36Sopenharmony_ci * msdu_length
105362306a36Sopenharmony_ci *		MSDU length in bytes after decapsulation.
105462306a36Sopenharmony_ci *		This field is still valid for MPDU frames without A-MSDU.
105562306a36Sopenharmony_ci *		It still represents MSDU length after decapsulation
105662306a36Sopenharmony_ci *
105762306a36Sopenharmony_ci * stbc
105862306a36Sopenharmony_ci *		When set, use STBC transmission rates.
105962306a36Sopenharmony_ci *
106062306a36Sopenharmony_ci * ipsec_esp
106162306a36Sopenharmony_ci *		Set if IPv4/v6 packet is using IPsec ESP.
106262306a36Sopenharmony_ci *
106362306a36Sopenharmony_ci * l3_offset
106462306a36Sopenharmony_ci *		Depending upon mode bit, this field either indicates the
106562306a36Sopenharmony_ci *		L3 offset in bytes from the start of the RX_HEADER or the IP
106662306a36Sopenharmony_ci *		offset in bytes from the start of the packet after
106762306a36Sopenharmony_ci *		decapsulation. The latter is only valid if ipv4_proto or
106862306a36Sopenharmony_ci *		ipv6_proto is set.
106962306a36Sopenharmony_ci *
107062306a36Sopenharmony_ci * ipsec_ah
107162306a36Sopenharmony_ci *		Set if IPv4/v6 packet is using IPsec AH
107262306a36Sopenharmony_ci *
107362306a36Sopenharmony_ci * l4_offset
107462306a36Sopenharmony_ci *		Depending upon mode bit, this field either indicates the
107562306a36Sopenharmony_ci *		L4 offset in bytes from the start of RX_HEADER (only valid
107662306a36Sopenharmony_ci *		if either ipv4_proto or ipv6_proto is set to 1) or indicates
107762306a36Sopenharmony_ci *		the offset in bytes to the start of TCP or UDP header from
107862306a36Sopenharmony_ci *		the start of the IP header after decapsulation (Only valid if
107962306a36Sopenharmony_ci *		tcp_proto or udp_proto is set). The value 0 indicates that
108062306a36Sopenharmony_ci *		the offset is longer than 127 bytes.
108162306a36Sopenharmony_ci *
108262306a36Sopenharmony_ci * msdu_number
108362306a36Sopenharmony_ci *		Indicates the MSDU number within a MPDU.  This value is
108462306a36Sopenharmony_ci *		reset to zero at the start of each MPDU.  If the number of
108562306a36Sopenharmony_ci *		MSDU exceeds 255 this number will wrap using modulo 256.
108662306a36Sopenharmony_ci *
108762306a36Sopenharmony_ci * decap_type
108862306a36Sopenharmony_ci *		Indicates the format after decapsulation. Values are defined in
108962306a36Sopenharmony_ci *		enum %MPDU_START_DECAP_TYPE_*.
109062306a36Sopenharmony_ci *
109162306a36Sopenharmony_ci * ipv4_proto
109262306a36Sopenharmony_ci *		Set if L2 layer indicates IPv4 protocol.
109362306a36Sopenharmony_ci *
109462306a36Sopenharmony_ci * ipv6_proto
109562306a36Sopenharmony_ci *		Set if L2 layer indicates IPv6 protocol.
109662306a36Sopenharmony_ci *
109762306a36Sopenharmony_ci * tcp_proto
109862306a36Sopenharmony_ci *		Set if the ipv4_proto or ipv6_proto are set and the IP protocol
109962306a36Sopenharmony_ci *		indicates TCP.
110062306a36Sopenharmony_ci *
110162306a36Sopenharmony_ci * udp_proto
110262306a36Sopenharmony_ci *		Set if the ipv4_proto or ipv6_proto are set and the IP protocol
110362306a36Sopenharmony_ci *		indicates UDP.
110462306a36Sopenharmony_ci *
110562306a36Sopenharmony_ci * ip_frag
110662306a36Sopenharmony_ci *		Indicates that either the IP More frag bit is set or IP frag
110762306a36Sopenharmony_ci *		number is non-zero.  If set indicates that this is a fragmented
110862306a36Sopenharmony_ci *		IP packet.
110962306a36Sopenharmony_ci *
111062306a36Sopenharmony_ci * tcp_only_ack
111162306a36Sopenharmony_ci *		Set if only the TCP Ack bit is set in the TCP flags and if
111262306a36Sopenharmony_ci *		the TCP payload is 0.
111362306a36Sopenharmony_ci *
111462306a36Sopenharmony_ci * da_is_bcast_mcast
111562306a36Sopenharmony_ci *		The destination address is broadcast or multicast.
111662306a36Sopenharmony_ci *
111762306a36Sopenharmony_ci * toeplitz_hash
111862306a36Sopenharmony_ci *		Actual chosen Hash.
111962306a36Sopenharmony_ci *		0 - Toeplitz hash of 2-tuple (IP source address, IP
112062306a36Sopenharmony_ci *		    destination address)
112162306a36Sopenharmony_ci *		1 - Toeplitz hash of 4-tuple (IP source	address,
112262306a36Sopenharmony_ci *		    IP destination address, L4 (TCP/UDP) source port,
112362306a36Sopenharmony_ci *		    L4 (TCP/UDP) destination port)
112462306a36Sopenharmony_ci *		2 - Toeplitz of flow_id
112562306a36Sopenharmony_ci *		3 - Zero is used
112662306a36Sopenharmony_ci *
112762306a36Sopenharmony_ci * ip_fixed_header_valid
112862306a36Sopenharmony_ci *		Fixed 20-byte IPv4 header or 40-byte IPv6 header parsed
112962306a36Sopenharmony_ci *		fully within first 256 bytes of the packet
113062306a36Sopenharmony_ci *
113162306a36Sopenharmony_ci * ip_extn_header_valid
113262306a36Sopenharmony_ci *		IPv6/IPv6 header, including IPv4 options and
113362306a36Sopenharmony_ci *		recognizable extension headers parsed fully within first 256
113462306a36Sopenharmony_ci *		bytes of the packet
113562306a36Sopenharmony_ci *
113662306a36Sopenharmony_ci * tcp_udp_header_valid
113762306a36Sopenharmony_ci *		Fixed 20-byte TCP (excluding TCP options) or 8-byte UDP
113862306a36Sopenharmony_ci *		header parsed fully within first 256 bytes of the packet
113962306a36Sopenharmony_ci *
114062306a36Sopenharmony_ci * mesh_control_present
114162306a36Sopenharmony_ci *		When set, this MSDU includes the 'Mesh Control' field
114262306a36Sopenharmony_ci *
114362306a36Sopenharmony_ci * ldpc
114462306a36Sopenharmony_ci *
114562306a36Sopenharmony_ci * ip4_protocol_ip6_next_header
114662306a36Sopenharmony_ci *		For IPv4, this is the 8 bit protocol field set). For IPv6 this
114762306a36Sopenharmony_ci *		is the 8 bit next_header field.
114862306a36Sopenharmony_ci *
114962306a36Sopenharmony_ci *
115062306a36Sopenharmony_ci * vlan_ctag_ci
115162306a36Sopenharmony_ci *		2 bytes of C-VLAN Tag Control Information from WHO_L2_LLC
115262306a36Sopenharmony_ci *
115362306a36Sopenharmony_ci * vlan_stag_ci
115462306a36Sopenharmony_ci *		2 bytes of S-VLAN Tag Control Information from WHO_L2_LLC
115562306a36Sopenharmony_ci *		in case of double VLAN
115662306a36Sopenharmony_ci *
115762306a36Sopenharmony_ci * peer_meta_data
115862306a36Sopenharmony_ci *		Meta data that SW has programmed in the Peer table entry
115962306a36Sopenharmony_ci *		of the transmitting STA.
116062306a36Sopenharmony_ci *
116162306a36Sopenharmony_ci * user_rssi
116262306a36Sopenharmony_ci *		RSSI for this user
116362306a36Sopenharmony_ci *
116462306a36Sopenharmony_ci * pkt_type
116562306a36Sopenharmony_ci *		Values are defined in enum %RX_MSDU_START_PKT_TYPE_*.
116662306a36Sopenharmony_ci *
116762306a36Sopenharmony_ci * sgi
116862306a36Sopenharmony_ci *		Field only valid when pkt type is HT, VHT or HE. Values are
116962306a36Sopenharmony_ci *		defined in enum %RX_MSDU_START_SGI_*.
117062306a36Sopenharmony_ci *
117162306a36Sopenharmony_ci * rate_mcs
117262306a36Sopenharmony_ci *		MCS Rate used.
117362306a36Sopenharmony_ci *
117462306a36Sopenharmony_ci * receive_bandwidth
117562306a36Sopenharmony_ci *		Full receive Bandwidth. Values are defined in enum
117662306a36Sopenharmony_ci *		%RX_MSDU_START_RECV_*.
117762306a36Sopenharmony_ci *
117862306a36Sopenharmony_ci * reception_type
117962306a36Sopenharmony_ci *		Indicates what type of reception this is and defined in enum
118062306a36Sopenharmony_ci *		%RX_MSDU_START_RECEPTION_TYPE_*.
118162306a36Sopenharmony_ci *
118262306a36Sopenharmony_ci * mimo_ss_bitmap
118362306a36Sopenharmony_ci *		Field only valid when
118462306a36Sopenharmony_ci *		Reception_type is RX_MSDU_START_RECEPTION_TYPE_DL_MU_MIMO or
118562306a36Sopenharmony_ci *		RX_MSDU_START_RECEPTION_TYPE_DL_MU_OFDMA_MIMO.
118662306a36Sopenharmony_ci *
118762306a36Sopenharmony_ci *		Bitmap, with each bit indicating if the related spatial
118862306a36Sopenharmony_ci *		stream is used for this STA
118962306a36Sopenharmony_ci *
119062306a36Sopenharmony_ci *		LSB related to SS 0
119162306a36Sopenharmony_ci *
119262306a36Sopenharmony_ci *		0 - spatial stream not used for this reception
119362306a36Sopenharmony_ci *		1 - spatial stream used for this reception
119462306a36Sopenharmony_ci *
119562306a36Sopenharmony_ci * msdu_done_copy
119662306a36Sopenharmony_ci *		If set indicates that the RX packet data, RX header data,
119762306a36Sopenharmony_ci *		RX PPDU start descriptor, RX MPDU start/end descriptor,
119862306a36Sopenharmony_ci *		RX MSDU start/end descriptors and RX Attention descriptor
119962306a36Sopenharmony_ci *		are all valid.  This bit is in the last 64-bit of the descriptor
120062306a36Sopenharmony_ci *		expected to be subscribed in future hardware.
120162306a36Sopenharmony_ci *
120262306a36Sopenharmony_ci * flow_id_toeplitz
120362306a36Sopenharmony_ci *		Toeplitz hash of 5-tuple
120462306a36Sopenharmony_ci *		{IP source address, IP destination address, IP source port, IP
120562306a36Sopenharmony_ci *		destination port, L4 protocol}  in case of non-IPSec.
120662306a36Sopenharmony_ci *
120762306a36Sopenharmony_ci *		In case of IPSec - Toeplitz hash of 4-tuple
120862306a36Sopenharmony_ci *		{IP source address, IP destination address, SPI, L4 protocol}
120962306a36Sopenharmony_ci *
121062306a36Sopenharmony_ci *		The relevant Toeplitz key registers are provided in RxOLE's
121162306a36Sopenharmony_ci *		instance of common parser module. These registers are separate
121262306a36Sopenharmony_ci *		from the Toeplitz keys used by ASE/FSE modules inside RxOLE.
121362306a36Sopenharmony_ci *		The actual value will be passed on from common parser module
121462306a36Sopenharmony_ci *		to RxOLE in one of the WHO_* TLVs.
121562306a36Sopenharmony_ci *
121662306a36Sopenharmony_ci * ppdu_start_timestamp
121762306a36Sopenharmony_ci *		Timestamp that indicates when the PPDU that contained this MPDU
121862306a36Sopenharmony_ci *		started on the medium.
121962306a36Sopenharmony_ci *
122062306a36Sopenharmony_ci * phy_meta_data
122162306a36Sopenharmony_ci *		SW programmed Meta data provided by the PHY. Can be used for SW
122262306a36Sopenharmony_ci *		to indicate the channel the device is on.
122362306a36Sopenharmony_ci *
122462306a36Sopenharmony_ci * toeplitz_hash_2_or_4
122562306a36Sopenharmony_ci *		Controlled by multiple RxOLE registers for TCP/UDP over
122662306a36Sopenharmony_ci *		IPv4/IPv6 - Either, Toeplitz hash computed over 2-tuple
122762306a36Sopenharmony_ci *		IPv4 or IPv6 src/dest addresses is reported; or, Toeplitz
122862306a36Sopenharmony_ci *		hash computed over 4-tuple IPv4 or IPv6 src/dest addresses
122962306a36Sopenharmony_ci *		and src/dest ports is reported. The Flow_id_toeplitz hash
123062306a36Sopenharmony_ci *		can also be reported here. Usually the hash reported here
123162306a36Sopenharmony_ci *		is the one used for hash-based REO routing (see use_flow_id_toeplitz_clfy
123262306a36Sopenharmony_ci *		in 'RXPT_CLASSIFY_INFO').
123362306a36Sopenharmony_ci *
123462306a36Sopenharmony_ci * sa
123562306a36Sopenharmony_ci *		Source MAC address
123662306a36Sopenharmony_ci *
123762306a36Sopenharmony_ci * first_mpdu
123862306a36Sopenharmony_ci *		Indicates the first MSDU of the PPDU.  If both first_mpdu
123962306a36Sopenharmony_ci *		and last_mpdu are set in the MSDU then this is a not an
124062306a36Sopenharmony_ci *		A-MPDU frame but a stand alone MPDU.  Interior MPDU in an
124162306a36Sopenharmony_ci *		A-MPDU shall have both first_mpdu and last_mpdu bits set to
124262306a36Sopenharmony_ci *		0.  The PPDU start status will only be valid when this bit
124362306a36Sopenharmony_ci *		is set.
124462306a36Sopenharmony_ci *
124562306a36Sopenharmony_ci * mcast_bcast
124662306a36Sopenharmony_ci *		Multicast / broadcast indicator.  Only set when the MAC
124762306a36Sopenharmony_ci *		address 1 bit 0 is set indicating mcast/bcast and the BSSID
124862306a36Sopenharmony_ci *		matches one of the 4 BSSID registers. Only set when
124962306a36Sopenharmony_ci *		first_msdu is set.
125062306a36Sopenharmony_ci *
125162306a36Sopenharmony_ci * ast_index_not_found
125262306a36Sopenharmony_ci *		Only valid when first_msdu is set. Indicates no AST matching
125362306a36Sopenharmony_ci *		entries within the max search count.
125462306a36Sopenharmony_ci *
125562306a36Sopenharmony_ci * ast_index_timeout
125662306a36Sopenharmony_ci *		Only valid when first_msdu is set. Indicates an unsuccessful
125762306a36Sopenharmony_ci *		search in the address search table due to timeout.
125862306a36Sopenharmony_ci *
125962306a36Sopenharmony_ci * power_mgmt
126062306a36Sopenharmony_ci *		Power management bit set in the 802.11 header.  Only set
126162306a36Sopenharmony_ci *		when first_msdu is set.
126262306a36Sopenharmony_ci *
126362306a36Sopenharmony_ci * non_qos
126462306a36Sopenharmony_ci *		Set if packet is not a non-QoS data frame.  Only set when
126562306a36Sopenharmony_ci *		first_msdu is set.
126662306a36Sopenharmony_ci *
126762306a36Sopenharmony_ci * null_data
126862306a36Sopenharmony_ci *		Set if frame type indicates either null data or QoS null
126962306a36Sopenharmony_ci *		data format.  Only set when first_msdu is set.
127062306a36Sopenharmony_ci *
127162306a36Sopenharmony_ci * mgmt_type
127262306a36Sopenharmony_ci *		Set if packet is a management packet.  Only set when
127362306a36Sopenharmony_ci *		first_msdu is set.
127462306a36Sopenharmony_ci *
127562306a36Sopenharmony_ci * ctrl_type
127662306a36Sopenharmony_ci *		Set if packet is a control packet.  Only set when first_msdu
127762306a36Sopenharmony_ci *		is set.
127862306a36Sopenharmony_ci *
127962306a36Sopenharmony_ci * more_data
128062306a36Sopenharmony_ci *		Set if more bit in frame control is set.  Only set when
128162306a36Sopenharmony_ci *		first_msdu is set.
128262306a36Sopenharmony_ci *
128362306a36Sopenharmony_ci * eosp
128462306a36Sopenharmony_ci *		Set if the EOSP (end of service period) bit in the QoS
128562306a36Sopenharmony_ci *		control field is set.  Only set when first_msdu is set.
128662306a36Sopenharmony_ci *
128762306a36Sopenharmony_ci * a_msdu_error
128862306a36Sopenharmony_ci *		Set if number of MSDUs in A-MSDU is above a threshold or if the
128962306a36Sopenharmony_ci *		size of the MSDU is invalid. This receive buffer will contain
129062306a36Sopenharmony_ci *		all of the remainder of MSDUs in this MPDU w/o decapsulation.
129162306a36Sopenharmony_ci *
129262306a36Sopenharmony_ci * order
129362306a36Sopenharmony_ci *		Set if the order bit in the frame control is set.  Only
129462306a36Sopenharmony_ci *		set when first_msdu is set.
129562306a36Sopenharmony_ci *
129662306a36Sopenharmony_ci * wifi_parser_error
129762306a36Sopenharmony_ci *		Indicates that the WiFi frame has one of the following errors
129862306a36Sopenharmony_ci *
129962306a36Sopenharmony_ci * overflow_err
130062306a36Sopenharmony_ci *		RXPCU Receive FIFO ran out of space to receive the full MPDU.
130162306a36Sopenharmony_ci *		Therefore this MPDU is terminated early and is thus corrupted.
130262306a36Sopenharmony_ci *
130362306a36Sopenharmony_ci *		This MPDU will not be ACKed.
130462306a36Sopenharmony_ci *
130562306a36Sopenharmony_ci *		RXPCU might still be able to correctly receive the following
130662306a36Sopenharmony_ci *		MPDUs in the PPDU if enough fifo space became available in time.
130762306a36Sopenharmony_ci *
130862306a36Sopenharmony_ci * mpdu_length_err
130962306a36Sopenharmony_ci *		Set by RXPCU if the expected MPDU length does not correspond
131062306a36Sopenharmony_ci *		with the actually received number of bytes in the MPDU.
131162306a36Sopenharmony_ci *
131262306a36Sopenharmony_ci * tcp_udp_chksum_fail
131362306a36Sopenharmony_ci *		Indicates that the computed checksum (tcp_udp_chksum) did
131462306a36Sopenharmony_ci *		not match the checksum in the TCP/UDP header.
131562306a36Sopenharmony_ci *
131662306a36Sopenharmony_ci * ip_chksum_fail
131762306a36Sopenharmony_ci *		Indicates that the computed checksum did not match the
131862306a36Sopenharmony_ci *		checksum in the IP header.
131962306a36Sopenharmony_ci *
132062306a36Sopenharmony_ci * sa_idx_invalid
132162306a36Sopenharmony_ci *		Indicates no matching entry was found in the address search
132262306a36Sopenharmony_ci *		table for the source MAC address.
132362306a36Sopenharmony_ci *
132462306a36Sopenharmony_ci * da_idx_invalid
132562306a36Sopenharmony_ci *		Indicates no matching entry was found in the address search
132662306a36Sopenharmony_ci *		table for the destination MAC address.
132762306a36Sopenharmony_ci *
132862306a36Sopenharmony_ci * amsdu_addr_mismatch
132962306a36Sopenharmony_ci *		Indicates that an A-MSDU with 'from DS = 0' had an SA mismatching
133062306a36Sopenharmony_ci *		TA or an A-MDU with 'to DS = 0' had a DA mismatching RA
133162306a36Sopenharmony_ci *
133262306a36Sopenharmony_ci * rx_in_tx_decrypt_byp
133362306a36Sopenharmony_ci *		Indicates that RX packet is not decrypted as Crypto is busy
133462306a36Sopenharmony_ci *		with TX packet processing.
133562306a36Sopenharmony_ci *
133662306a36Sopenharmony_ci * encrypt_required
133762306a36Sopenharmony_ci *		Indicates that this data type frame is not encrypted even if
133862306a36Sopenharmony_ci *		the policy for this MPDU requires encryption as indicated in
133962306a36Sopenharmony_ci *		the peer table key type.
134062306a36Sopenharmony_ci *
134162306a36Sopenharmony_ci * directed
134262306a36Sopenharmony_ci *		MPDU is a directed packet which means that the RA matched
134362306a36Sopenharmony_ci *		our STA addresses.  In proxySTA it means that the TA matched
134462306a36Sopenharmony_ci *		an entry in our address search table with the corresponding
134562306a36Sopenharmony_ci *		'no_ack' bit is the address search entry cleared.
134662306a36Sopenharmony_ci *
134762306a36Sopenharmony_ci * buffer_fragment
134862306a36Sopenharmony_ci *		Indicates that at least one of the rx buffers has been
134962306a36Sopenharmony_ci *		fragmented.  If set the FW should look at the rx_frag_info
135062306a36Sopenharmony_ci *		descriptor described below.
135162306a36Sopenharmony_ci *
135262306a36Sopenharmony_ci * mpdu_length_err
135362306a36Sopenharmony_ci *		Indicates that the MPDU was pre-maturely terminated
135462306a36Sopenharmony_ci *		resulting in a truncated MPDU.  Don't trust the MPDU length
135562306a36Sopenharmony_ci *		field.
135662306a36Sopenharmony_ci *
135762306a36Sopenharmony_ci * tkip_mic_err
135862306a36Sopenharmony_ci *		Indicates that the MPDU Michael integrity check failed
135962306a36Sopenharmony_ci *
136062306a36Sopenharmony_ci * decrypt_err
136162306a36Sopenharmony_ci *		Indicates that the MPDU decrypt integrity check failed
136262306a36Sopenharmony_ci *
136362306a36Sopenharmony_ci * fcs_err
136462306a36Sopenharmony_ci *		Indicates that the MPDU FCS check failed
136562306a36Sopenharmony_ci *
136662306a36Sopenharmony_ci * flow_idx_timeout
136762306a36Sopenharmony_ci *		Indicates an unsuccessful flow search due to the expiring of
136862306a36Sopenharmony_ci *		the search timer.
136962306a36Sopenharmony_ci *
137062306a36Sopenharmony_ci * flow_idx_invalid
137162306a36Sopenharmony_ci *		flow id is not valid.
137262306a36Sopenharmony_ci *
137362306a36Sopenharmony_ci * decrypt_status_code
137462306a36Sopenharmony_ci *		Field provides insight into the decryption performed. Values
137562306a36Sopenharmony_ci *		are defined in enum %RX_DESC_DECRYPT_STATUS_CODE_*.
137662306a36Sopenharmony_ci *
137762306a36Sopenharmony_ci * rx_bitmap_not_updated
137862306a36Sopenharmony_ci *		Frame is received, but RXPCU could not update the receive bitmap
137962306a36Sopenharmony_ci *		due to (temporary) fifo constraints.
138062306a36Sopenharmony_ci *
138162306a36Sopenharmony_ci * msdu_done
138262306a36Sopenharmony_ci *		If set indicates that the RX packet data, RX header data, RX
138362306a36Sopenharmony_ci *		PPDU start descriptor, RX MPDU start/end descriptor, RX MSDU
138462306a36Sopenharmony_ci *		start/end descriptors and RX Attention descriptor are all
138562306a36Sopenharmony_ci *		valid.  This bit must be in the last octet of the
138662306a36Sopenharmony_ci *		descriptor.
138762306a36Sopenharmony_ci *
138862306a36Sopenharmony_ci */
138962306a36Sopenharmony_ci
139062306a36Sopenharmony_ci/* TODO: Move to compact TLV approach
139162306a36Sopenharmony_ci * By default these tlv's are not aligned to 128b boundary
139262306a36Sopenharmony_ci * Need to remove unused qwords and make them compact/aligned
139362306a36Sopenharmony_ci */
139462306a36Sopenharmony_cistruct hal_rx_desc_qcn9274 {
139562306a36Sopenharmony_ci	struct rx_msdu_end_qcn9274 msdu_end;
139662306a36Sopenharmony_ci	struct rx_mpdu_start_qcn9274 mpdu_start;
139762306a36Sopenharmony_ci	u8 msdu_payload[];
139862306a36Sopenharmony_ci} __packed;
139962306a36Sopenharmony_ci
140062306a36Sopenharmony_ci#define RX_BE_PADDING0_BYTES 8
140162306a36Sopenharmony_ci#define RX_BE_PADDING1_BYTES 8
140262306a36Sopenharmony_ci
140362306a36Sopenharmony_ci#define HAL_RX_BE_PKT_HDR_TLV_LEN		112
140462306a36Sopenharmony_ci
140562306a36Sopenharmony_cistruct rx_pkt_hdr_tlv {
140662306a36Sopenharmony_ci	__le64 tag;
140762306a36Sopenharmony_ci	__le64 phy_ppdu_id;
140862306a36Sopenharmony_ci	u8 rx_pkt_hdr[HAL_RX_BE_PKT_HDR_TLV_LEN];
140962306a36Sopenharmony_ci};
141062306a36Sopenharmony_ci
141162306a36Sopenharmony_cistruct hal_rx_desc_wcn7850 {
141262306a36Sopenharmony_ci	__le64 msdu_end_tag;
141362306a36Sopenharmony_ci	struct rx_msdu_end_qcn9274 msdu_end;
141462306a36Sopenharmony_ci	u8 rx_padding0[RX_BE_PADDING0_BYTES];
141562306a36Sopenharmony_ci	__le64 mpdu_start_tag;
141662306a36Sopenharmony_ci	struct rx_mpdu_start_qcn9274 mpdu_start;
141762306a36Sopenharmony_ci	struct rx_pkt_hdr_tlv	 pkt_hdr_tlv;
141862306a36Sopenharmony_ci	u8 msdu_payload[];
141962306a36Sopenharmony_ci};
142062306a36Sopenharmony_ci
142162306a36Sopenharmony_cistruct hal_rx_desc {
142262306a36Sopenharmony_ci	union {
142362306a36Sopenharmony_ci		struct hal_rx_desc_qcn9274 qcn9274;
142462306a36Sopenharmony_ci		struct hal_rx_desc_wcn7850 wcn7850;
142562306a36Sopenharmony_ci	} u;
142662306a36Sopenharmony_ci} __packed;
142762306a36Sopenharmony_ci
142862306a36Sopenharmony_ci#define MAX_USER_POS 8
142962306a36Sopenharmony_ci#define MAX_MU_GROUP_ID 64
143062306a36Sopenharmony_ci#define MAX_MU_GROUP_SHOW 16
143162306a36Sopenharmony_ci#define MAX_MU_GROUP_LENGTH (6 * MAX_MU_GROUP_SHOW)
143262306a36Sopenharmony_ci
143362306a36Sopenharmony_ci#define HAL_RX_RU_ALLOC_TYPE_MAX 6
143462306a36Sopenharmony_ci#define RU_26  1
143562306a36Sopenharmony_ci#define RU_52  2
143662306a36Sopenharmony_ci#define RU_106 4
143762306a36Sopenharmony_ci#define RU_242 9
143862306a36Sopenharmony_ci#define RU_484 18
143962306a36Sopenharmony_ci#define RU_996 37
144062306a36Sopenharmony_ci
144162306a36Sopenharmony_ci#endif /* ATH12K_RX_DESC_H */
1442