Path: blob/main/sys/contrib/dev/athk/ath12k/rx_desc.h
48375 views
/* SPDX-License-Identifier: BSD-3-Clause-Clear */1/*2* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.3* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.4*/5#ifndef ATH12K_RX_DESC_H6#define ATH12K_RX_DESC_H78enum rx_desc_decap_type {9RX_DESC_DECAP_TYPE_RAW,10RX_DESC_DECAP_TYPE_NATIVE_WIFI,11RX_DESC_DECAP_TYPE_ETHERNET2_DIX,12RX_DESC_DECAP_TYPE_8023,13};1415enum rx_desc_decrypt_status_code {16RX_DESC_DECRYPT_STATUS_CODE_OK,17RX_DESC_DECRYPT_STATUS_CODE_UNPROTECTED_FRAME,18RX_DESC_DECRYPT_STATUS_CODE_DATA_ERR,19RX_DESC_DECRYPT_STATUS_CODE_KEY_INVALID,20RX_DESC_DECRYPT_STATUS_CODE_PEER_ENTRY_INVALID,21RX_DESC_DECRYPT_STATUS_CODE_OTHER,22};2324#define RX_MPDU_START_INFO0_REO_DEST_IND GENMASK(4, 0)25#define RX_MPDU_START_INFO0_LMAC_PEER_ID_MSB GENMASK(6, 5)26#define RX_MPDU_START_INFO0_FLOW_ID_TOEPLITZ BIT(7)27#define RX_MPDU_START_INFO0_PKT_SEL_FP_UCAST_DATA BIT(8)28#define RX_MPDU_START_INFO0_PKT_SEL_FP_MCAST_DATA BIT(9)29#define RX_MPDU_START_INFO0_PKT_SEL_FP_CTRL_BAR BIT(10)30#define RX_MPDU_START_INFO0_RXDMA0_SRC_RING_SEL GENMASK(13, 11)31#define RX_MPDU_START_INFO0_RXDMA0_DST_RING_SEL GENMASK(16, 14)32#define RX_MPDU_START_INFO0_MCAST_ECHO_DROP_EN BIT(17)33#define RX_MPDU_START_INFO0_WDS_LEARN_DETECT_EN BIT(18)34#define RX_MPDU_START_INFO0_INTRA_BSS_CHECK_EN BIT(19)35#define RX_MPDU_START_INFO0_USE_PPE BIT(20)36#define RX_MPDU_START_INFO0_PPE_ROUTING_EN BIT(21)3738#define RX_MPDU_START_INFO1_REO_QUEUE_DESC_HI GENMASK(7, 0)39#define RX_MPDU_START_INFO1_RECV_QUEUE_NUM GENMASK(23, 8)40#define RX_MPDU_START_INFO1_PRE_DELIM_ERR_WARN BIT(24)41#define RX_MPDU_START_INFO1_FIRST_DELIM_ERR BIT(25)4243#define RX_MPDU_START_INFO2_EPD_EN BIT(0)44#define RX_MPDU_START_INFO2_ALL_FRAME_ENCPD BIT(1)45#define RX_MPDU_START_INFO2_ENC_TYPE GENMASK(5, 2)46#define RX_MPDU_START_INFO2_VAR_WEP_KEY_WIDTH GENMASK(7, 6)47#define RX_MPDU_START_INFO2_MESH_STA GENMASK(9, 8)48#define RX_MPDU_START_INFO2_BSSID_HIT BIT(10)49#define RX_MPDU_START_INFO2_BSSID_NUM GENMASK(14, 11)50#define RX_MPDU_START_INFO2_TID GENMASK(18, 15)5152#define RX_MPDU_START_INFO3_RXPCU_MPDU_FLTR GENMASK(1, 0)53#define RX_MPDU_START_INFO3_SW_FRAME_GRP_ID GENMASK(8, 2)54#define RX_MPDU_START_INFO3_NDP_FRAME BIT(9)55#define RX_MPDU_START_INFO3_PHY_ERR BIT(10)56#define RX_MPDU_START_INFO3_PHY_ERR_MPDU_HDR BIT(11)57#define RX_MPDU_START_INFO3_PROTO_VER_ERR BIT(12)58#define RX_MPDU_START_INFO3_AST_LOOKUP_VALID BIT(13)59#define RX_MPDU_START_INFO3_RANGING BIT(14)6061#define RX_MPDU_START_INFO4_MPDU_FCTRL_VALID BIT(0)62#define RX_MPDU_START_INFO4_MPDU_DUR_VALID BIT(1)63#define RX_MPDU_START_INFO4_MAC_ADDR1_VALID BIT(2)64#define RX_MPDU_START_INFO4_MAC_ADDR2_VALID BIT(3)65#define RX_MPDU_START_INFO4_MAC_ADDR3_VALID BIT(4)66#define RX_MPDU_START_INFO4_MAC_ADDR4_VALID BIT(5)67#define RX_MPDU_START_INFO4_MPDU_SEQ_CTRL_VALID BIT(6)68#define RX_MPDU_START_INFO4_MPDU_QOS_CTRL_VALID BIT(7)69#define RX_MPDU_START_INFO4_MPDU_HT_CTRL_VALID BIT(8)70#define RX_MPDU_START_INFO4_ENCRYPT_INFO_VALID BIT(9)71#define RX_MPDU_START_INFO4_MPDU_FRAG_NUMBER GENMASK(13, 10)72#define RX_MPDU_START_INFO4_MORE_FRAG_FLAG BIT(14)73#define RX_MPDU_START_INFO4_FROM_DS BIT(16)74#define RX_MPDU_START_INFO4_TO_DS BIT(17)75#define RX_MPDU_START_INFO4_ENCRYPTED BIT(18)76#define RX_MPDU_START_INFO4_MPDU_RETRY BIT(19)77#define RX_MPDU_START_INFO4_MPDU_SEQ_NUM GENMASK(31, 20)7879#define RX_MPDU_START_INFO5_KEY_ID GENMASK(7, 0)80#define RX_MPDU_START_INFO5_NEW_PEER_ENTRY BIT(8)81#define RX_MPDU_START_INFO5_DECRYPT_NEEDED BIT(9)82#define RX_MPDU_START_INFO5_DECAP_TYPE GENMASK(11, 10)83#define RX_MPDU_START_INFO5_VLAN_TAG_C_PADDING BIT(12)84#define RX_MPDU_START_INFO5_VLAN_TAG_S_PADDING BIT(13)85#define RX_MPDU_START_INFO5_STRIP_VLAN_TAG_C BIT(14)86#define RX_MPDU_START_INFO5_STRIP_VLAN_TAG_S BIT(15)87#define RX_MPDU_START_INFO5_PRE_DELIM_COUNT GENMASK(27, 16)88#define RX_MPDU_START_INFO5_AMPDU_FLAG BIT(28)89#define RX_MPDU_START_INFO5_BAR_FRAME BIT(29)90#define RX_MPDU_START_INFO5_RAW_MPDU BIT(30)9192#define RX_MPDU_START_INFO6_MPDU_LEN GENMASK(13, 0)93#define RX_MPDU_START_INFO6_FIRST_MPDU BIT(14)94#define RX_MPDU_START_INFO6_MCAST_BCAST BIT(15)95#define RX_MPDU_START_INFO6_AST_IDX_NOT_FOUND BIT(16)96#define RX_MPDU_START_INFO6_AST_IDX_TIMEOUT BIT(17)97#define RX_MPDU_START_INFO6_POWER_MGMT BIT(18)98#define RX_MPDU_START_INFO6_NON_QOS BIT(19)99#define RX_MPDU_START_INFO6_NULL_DATA BIT(20)100#define RX_MPDU_START_INFO6_MGMT_TYPE BIT(21)101#define RX_MPDU_START_INFO6_CTRL_TYPE BIT(22)102#define RX_MPDU_START_INFO6_MORE_DATA BIT(23)103#define RX_MPDU_START_INFO6_EOSP BIT(24)104#define RX_MPDU_START_INFO6_FRAGMENT BIT(25)105#define RX_MPDU_START_INFO6_ORDER BIT(26)106#define RX_MPDU_START_INFO6_UAPSD_TRIGGER BIT(27)107#define RX_MPDU_START_INFO6_ENCRYPT_REQUIRED BIT(28)108#define RX_MPDU_START_INFO6_DIRECTED BIT(29)109#define RX_MPDU_START_INFO6_AMSDU_PRESENT BIT(30)110111#define RX_MPDU_START_INFO7_VDEV_ID GENMASK(7, 0)112#define RX_MPDU_START_INFO7_SERVICE_CODE GENMASK(16, 8)113#define RX_MPDU_START_INFO7_PRIORITY_VALID BIT(17)114#define RX_MPDU_START_INFO7_SRC_INFO GENMASK(29, 18)115116#define RX_MPDU_START_INFO8_AUTH_TO_SEND_WDS BIT(0)117118struct rx_mpdu_start_qcn9274 {119__le32 info0;120__le32 reo_queue_desc_lo;121__le32 info1;122__le32 pn[4];123__le32 info2;124__le32 peer_meta_data;125__le16 info3;126__le16 phy_ppdu_id;127__le16 ast_index;128__le16 sw_peer_id;129__le32 info4;130__le32 info5;131__le32 info6;132__le16 frame_ctrl;133__le16 duration;134u8 addr1[ETH_ALEN];135u8 addr2[ETH_ALEN];136u8 addr3[ETH_ALEN];137__le16 seq_ctrl;138u8 addr4[ETH_ALEN];139__le16 qos_ctrl;140__le32 ht_ctrl;141__le32 info7;142u8 multi_link_addr1[ETH_ALEN];143u8 multi_link_addr2[ETH_ALEN];144__le32 info8;145__le32 res0;146__le32 res1;147} __packed;148149/* rx_mpdu_start150*151* reo_destination_indication152* The id of the reo exit ring where the msdu frame shall push153* after (MPDU level) reordering has finished. Values are defined154* in enum %HAL_RX_MSDU_DESC_REO_DEST_IND_.155*156* lmac_peer_id_msb157*158* If use_flow_id_toeplitz_clfy is set and lmac_peer_id_'sb159* is 2'b00, Rx OLE uses a REO destination indicati'n of {1'b1,160* hash[3:0]} using the chosen Toeplitz hash from Common Parser161* if flow search fails.162* If use_flow_id_toeplitz_clfy is set and lmac_peer_id_msb163* 's not 2'b00, Rx OLE uses a REO destination indication of164* {lmac_peer_id_msb, hash[2:0]} using the chosen Toeplitz165* hash from Common Parser if flow search fails.166*167* use_flow_id_toeplitz_clfy168* Indication to Rx OLE to enable REO destination routing based169* on the chosen Toeplitz hash from Common Parser, in case170* flow search fails171*172* pkt_selection_fp_ucast_data173* Filter pass Unicast data frame (matching rxpcu_filter_pass174* and sw_frame_group_Unicast_data) routing selection175*176* pkt_selection_fp_mcast_data177* Filter pass Multicast data frame (matching rxpcu_filter_pass178* and sw_frame_group_Multicast_data) routing selection179*180* pkt_selection_fp_ctrl_bar181* Filter pass BAR frame (matching rxpcu_filter_pass182* and sw_frame_group_ctrl_1000) routing selection183*184* rxdma0_src_ring_selection185* Field only valid when for the received frame type the corresponding186* pkt_selection_fp_... bit is set187*188* rxdma0_dst_ring_selection189* Field only valid when for the received frame type the corresponding190* pkt_selection_fp_... bit is set191*192* mcast_echo_drop_enable193* If set, for multicast packets, multicast echo check (i.e.194* SA search with mcast_echo_check = 1) shall be performed195* by RXOLE, and any multicast echo packets should be indicated196* to RXDMA for release to WBM197*198* wds_learning_detect_en199* If set, WDS learning detection based on SA search and notification200* to FW (using RXDMA0 status ring) is enabled and the "timestamp"201* field in address search failure cache-only entry should202* be used to avoid multiple WDS learning notifications.203*204* intrabss_check_en205* If set, intra-BSS routing detection is enabled206*207* use_ppe208* Indicates to RXDMA to ignore the REO_destination_indication209* and use a programmed value corresponding to the REO2PPE210* ring211* This override to REO2PPE for packets requiring multiple212* buffers shall be disabled based on an RXDMA configuration,213* as PPE may not support such packets.214*215* Supported only in full AP chips, not in client/soft216* chips217*218* ppe_routing_enable219* Global enable/disable bit for routing to PPE, used to disable220* PPE routing even if RXOLE CCE or flow search indicate 'Use_PPE'221* This is set by SW for peers which are being handled by a222* host SW/accelerator subsystem that also handles packet223* uffer management for WiFi-to-PPE routing.224*225* This is cleared by SW for peers which are being handled226* by a different subsystem, completely disabling WiFi-to-PPE227* routing for such peers.228*229* rx_reo_queue_desc_addr_lo230* Address (lower 32 bits) of the REO queue descriptor.231*232* rx_reo_queue_desc_addr_hi233* Address (upper 8 bits) of the REO queue descriptor.234*235* receive_queue_number236* Indicates the MPDU queue ID to which this MPDU link237* descriptor belongs.238*239* pre_delim_err_warning240* Indicates that a delimiter FCS error was found in between the241* previous MPDU and this MPDU. Note that this is just a warning,242* and does not mean that this MPDU is corrupted in any way. If243* it is, there will be other errors indicated such as FCS or244* decrypt errors.245*246* first_delim_err247* Indicates that the first delimiter had a FCS failure.248*249* pn250* The PN number.251*252* epd_en253* Field only valid when AST_based_lookup_valid == 1.254* In case of ndp or phy_err or AST_based_lookup_valid == 0,255* this field will be set to 0256* If set to one use EPD instead of LPD257* In case of ndp or phy_err, this field will never be set.258*259* all_frames_shall_be_encrypted260* In case of ndp or phy_err or AST_based_lookup_valid == 0,261* this field will be set to 0262*263* When set, all frames (data only ?) shall be encrypted. If264* not, RX CRYPTO shall set an error flag.265*266*267* encrypt_type268* In case of ndp or phy_err or AST_based_lookup_valid == 0,269* this field will be set to 0270*271* Indicates type of decrypt cipher used (as defined in the272* peer entry)273*274* wep_key_width_for_variable_key275*276* Field only valid when key_type is set to wep_varied_width.277*278* mesh_sta279*280* bssid_hit281* When set, the BSSID of the incoming frame matched one of282* the 8 BSSID register values283* bssid_number284* Field only valid when bssid_hit is set.285* This number indicates which one out of the 8 BSSID register286* values matched the incoming frame287*288* tid289* Field only valid when mpdu_qos_control_valid is set290* The TID field in the QoS control field291*292* peer_meta_data293* Meta data that SW has programmed in the Peer table entry294* of the transmitting STA.295*296* rxpcu_mpdu_filter_in_category297* Field indicates what the reason was that this mpdu frame298* was allowed to come into the receive path by rxpcu. Values299* are defined in enum %RX_DESC_RXPCU_FILTER_*.300*301* sw_frame_group_id302* SW processes frames based on certain classifications. Values303* are defined in enum %RX_DESC_SW_FRAME_GRP_ID_*.304*305* ndp_frame306* When set, the received frame was an NDP frame, and thus307* there will be no MPDU data.308* phy_err309* When set, a PHY error was received before MAC received any310* data, and thus there will be no MPDU data.311*312* phy_err_during_mpdu_header313* When set, a PHY error was received before MAC received the314* complete MPDU header which was needed for proper decoding315*316* protocol_version_err317* Set when RXPCU detected a version error in the Frame control318* field319*320* ast_based_lookup_valid321* When set, AST based lookup for this frame has found a valid322* result.323*324* ranging325* When set, a ranging NDPA or a ranging NDP was received.326*327* phy_ppdu_id328* A ppdu counter value that PHY increments for every PPDU329* received. The counter value wraps around.330*331* ast_index332*333* This field indicates the index of the AST entry corresponding334* to this MPDU. It is provided by the GSE module instantiated335* in RXPCU.336* A value of 0xFFFF indicates an invalid AST index, meaning337* that No AST entry was found or NO AST search was performed338*339* sw_peer_id340* In case of ndp or phy_err or AST_based_lookup_valid == 0,341* this field will be set to 0342* This field indicates a unique peer identifier. It is set343* equal to field 'sw_peer_id' from the AST entry344*345* frame_control_valid346* When set, the field Mpdu_Frame_control_field has valid information347*348* frame_duration_valid349* When set, the field Mpdu_duration_field has valid information350*351* mac_addr_ad1..4_valid352* When set, the fields mac_addr_adx_..... have valid information353*354* mpdu_seq_ctrl_valid355*356* When set, the fields mpdu_sequence_control_field and mpdu_sequence_number357* have valid information as well as field358* For MPDUs without a sequence control field, this field will359* not be set.360*361* mpdu_qos_ctrl_valid, mpdu_ht_ctrl_valid362*363* When set, the field mpdu_qos_control_field, mpdu_ht_control has valid364* information, For MPDUs without a QoS,HT control field, this field365* will not be set.366*367* frame_encryption_info_valid368*369* When set, the encryption related info fields, like IV and370* PN are valid371* For MPDUs that are not encrypted, this will not be set.372*373* mpdu_fragment_number374*375* Field only valid when Mpdu_sequence_control_valid is set376* AND Fragment_flag is set. The fragment number from the 802.11 header377*378* more_fragment_flag379*380* The More Fragment bit setting from the MPDU header of the381* received frame382*383* fr_ds384*385* Field only valid when Mpdu_frame_control_valid is set386* Set if the from DS bit is set in the frame control.387*388* to_ds389*390* Field only valid when Mpdu_frame_control_valid is set391* Set if the to DS bit is set in the frame control.392*393* encrypted394*395* Field only valid when Mpdu_frame_control_valid is set.396* Protected bit from the frame control.397*398* mpdu_retry399* Field only valid when Mpdu_frame_control_valid is set.400* Retry bit from the frame control. Only valid when first_msdu is set401*402* mpdu_sequence_number403* Field only valid when Mpdu_sequence_control_valid is set.404*405* The sequence number from the 802.11 header.406* key_id407* The key ID octet from the IV.408* Field only valid when Frame_encryption_info_valid is set409*410* new_peer_entry411* Set if new RX_PEER_ENTRY TLV follows. If clear, RX_PEER_ENTRY412* doesn't follow so RX DECRYPTION module either uses old peer413* entry or not decrypt.414*415* decrypt_needed416* When RXPCU sets bit 'ast_index_not_found or ast_index_timeout',417* RXPCU will also ensure that this bit is NOT set. CRYPTO for that418* reason only needs to evaluate this bit and non of the other ones419*420* decap_type421* Used by the OLE during decapsulation. Values are defined in422* enum %MPDU_START_DECAP_TYPE_*.423*424* rx_insert_vlan_c_tag_padding425* rx_insert_vlan_s_tag_padding426* Insert 4 byte of all zeros as VLAN tag or double VLAN tag if427* the rx payload does not have VLAN.428*429* strip_vlan_c_tag_decap430* strip_vlan_s_tag_decap431* Strip VLAN or double VLAN during decapsulation.432*433* pre_delim_count434* The number of delimiters before this MPDU. Note that this435* number is cleared at PPDU start. If this MPDU is the first436* received MPDU in the PPDU and this MPDU gets filtered-in,437* this field will indicate the number of delimiters located438* after the last MPDU in the previous PPDU.439*440* If this MPDU is located after the first received MPDU in441* an PPDU, this field will indicate the number of delimiters442* located between the previous MPDU and this MPDU.443*444* ampdu_flag445* Received frame was part of an A-MPDU.446*447* bar_frame448* Received frame is a BAR frame449*450* raw_mpdu451* Set when no 802.11 to nwifi/ethernet hdr conversion is done452*453* mpdu_length454* MPDU length before decapsulation.455*456* first_mpdu457* Indicates the first MSDU of the PPDU. If both first_mpdu458* and last_mpdu are set in the MSDU then this is a not an459* A-MPDU frame but a stand alone MPDU. Interior MPDU in an460* A-MPDU shall have both first_mpdu and last_mpdu bits set to461* 0. The PPDU start status will only be valid when this bit462* is set.463*464* mcast_bcast465* Multicast / broadcast indicator. Only set when the MAC466* address 1 bit 0 is set indicating mcast/bcast and the BSSID467* matches one of the 4 BSSID registers. Only set when468* first_msdu is set.469*470* ast_index_not_found471* Only valid when first_msdu is set. Indicates no AST matching472* entries within the max search count.473*474* ast_index_timeout475* Only valid when first_msdu is set. Indicates an unsuccessful476* search in the address search table due to timeout.477*478* power_mgmt479* Power management bit set in the 802.11 header. Only set480* when first_msdu is set.481*482* non_qos483* Set if packet is not a non-QoS data frame. Only set when484* first_msdu is set.485*486* null_data487* Set if frame type indicates either null data or QoS null488* data format. Only set when first_msdu is set.489*490* mgmt_type491* Set if packet is a management packet. Only set when492* first_msdu is set.493*494* ctrl_type495* Set if packet is a control packet. Only set when first_msdu496* is set.497*498* more_data499* Set if more bit in frame control is set. Only set when500* first_msdu is set.501*502* eosp503* Set if the EOSP (end of service period) bit in the QoS504* control field is set. Only set when first_msdu is set.505*506*507* fragment_flag508* Fragment indication509*510* order511* Set if the order bit in the frame control is set. Only512* set when first_msdu is set.513*514* u_apsd_trigger515* U-APSD trigger frame516*517* encrypt_required518* Indicates that this data type frame is not encrypted even if519* the policy for this MPDU requires encryption as indicated in520* the peer table key type.521*522* directed523* MPDU is a directed packet which means that the RA matched524* our STA addresses. In proxySTA it means that the TA matched525* an entry in our address search table with the corresponding526* 'no_ack' bit is the address search entry cleared.527* amsdu_present528* AMSDU present529*530* mpdu_frame_control_field531* Frame control field in header. Only valid when the field is marked valid.532*533* mpdu_duration_field534* Duration field in header. Only valid when the field is marked valid.535*536* mac_addr_adx537* MAC addresses in the received frame. Only valid when corresponding538* address valid bit is set539*540* mpdu_qos_control_field, mpdu_ht_control_field541* QoS/HT control fields from header. Valid only when corresponding fields542* are marked valid543*544* vdev_id545* Virtual device associated with this peer546* RXOLE uses this to determine intra-BSS routing.547*548* service_code549* Opaque service code between PPE and Wi-Fi550* This field gets passed on by REO to PPE in the EDMA descriptor551* ('REO_TO_PPE_RING').552*553* priority_valid554* This field gets passed on by REO to PPE in the EDMA descriptor555* ('REO_TO_PPE_RING').556*557* src_info558* Source (virtual) device/interface info. associated with559* this peer560* This field gets passed on by REO to PPE in the EDMA descriptor561* ('REO_TO_PPE_RING').562*563* multi_link_addr_ad1_ad2_valid564* If set, Rx OLE shall convert Address1 and Address2 of received565* data frames to multi-link addresses during decapsulation to eth/nwifi566*567* multi_link_addr_ad1,ad2568* Multi-link receiver address1,2. Only valid when corresponding569* valid bit is set570*571* authorize_to_send_wds572* If not set, RXDMA shall perform error-routing for WDS packets573* as the sender is not authorized and might misuse WDS frame574* format to inject packets with arbitrary DA/SA.575*576*/577578enum rx_msdu_start_pkt_type {579RX_MSDU_START_PKT_TYPE_11A,580RX_MSDU_START_PKT_TYPE_11B,581RX_MSDU_START_PKT_TYPE_11N,582RX_MSDU_START_PKT_TYPE_11AC,583RX_MSDU_START_PKT_TYPE_11AX,584};585586enum rx_msdu_start_sgi {587RX_MSDU_START_SGI_0_8_US,588RX_MSDU_START_SGI_0_4_US,589RX_MSDU_START_SGI_1_6_US,590RX_MSDU_START_SGI_3_2_US,591};592593enum rx_msdu_start_recv_bw {594RX_MSDU_START_RECV_BW_20MHZ,595RX_MSDU_START_RECV_BW_40MHZ,596RX_MSDU_START_RECV_BW_80MHZ,597RX_MSDU_START_RECV_BW_160MHZ,598};599600enum rx_msdu_start_reception_type {601RX_MSDU_START_RECEPTION_TYPE_SU,602RX_MSDU_START_RECEPTION_TYPE_DL_MU_MIMO,603RX_MSDU_START_RECEPTION_TYPE_DL_MU_OFDMA,604RX_MSDU_START_RECEPTION_TYPE_DL_MU_OFDMA_MIMO,605RX_MSDU_START_RECEPTION_TYPE_UL_MU_MIMO,606RX_MSDU_START_RECEPTION_TYPE_UL_MU_OFDMA,607RX_MSDU_START_RECEPTION_TYPE_UL_MU_OFDMA_MIMO,608};609610#define RX_MSDU_END_INFO0_RXPCU_MPDU_FITLER GENMASK(1, 0)611#define RX_MSDU_END_INFO0_SW_FRAME_GRP_ID GENMASK(8, 2)612613#define RX_MSDU_END_INFO1_REPORTED_MPDU_LENGTH GENMASK(13, 0)614615#define RX_MSDU_END_INFO2_CCE_SUPER_RULE GENMASK(13, 8)616#define RX_MSDU_END_INFO2_CCND_TRUNCATE BIT(14)617#define RX_MSDU_END_INFO2_CCND_CCE_DIS BIT(15)618619#define RX_MSDU_END_INFO3_DA_OFFSET GENMASK(5, 0)620#define RX_MSDU_END_INFO3_SA_OFFSET GENMASK(11, 6)621#define RX_MSDU_END_INFO3_DA_OFFSET_VALID BIT(12)622#define RX_MSDU_END_INFO3_SA_OFFSET_VALID BIT(13)623624#define RX_MSDU_END_INFO4_TCP_FLAG GENMASK(8, 0)625#define RX_MSDU_END_INFO4_LRO_ELIGIBLE BIT(9)626627#define RX_MSDU_END_INFO5_SA_IDX_TIMEOUT BIT(0)628#define RX_MSDU_END_INFO5_DA_IDX_TIMEOUT BIT(1)629#define RX_MSDU_END_INFO5_TO_DS BIT(2)630#define RX_MSDU_END_INFO5_TID GENMASK(6, 3)631#define RX_MSDU_END_INFO5_SA_IS_VALID BIT(7)632#define RX_MSDU_END_INFO5_DA_IS_VALID BIT(8)633#define RX_MSDU_END_INFO5_DA_IS_MCBC BIT(9)634#define RX_MSDU_END_INFO5_L3_HDR_PADDING GENMASK(11, 10)635#define RX_MSDU_END_INFO5_FIRST_MSDU BIT(12)636#define RX_MSDU_END_INFO5_LAST_MSDU BIT(13)637#define RX_MSDU_END_INFO5_FROM_DS BIT(14)638#define RX_MSDU_END_INFO5_IP_CHKSUM_FAIL_COPY BIT(15)639640#define RX_MSDU_END_INFO6_MSDU_DROP BIT(0)641#define RX_MSDU_END_INFO6_REO_DEST_IND GENMASK(5, 1)642#define RX_MSDU_END_INFO6_FLOW_IDX GENMASK(25, 6)643#define RX_MSDU_END_INFO6_USE_PPE BIT(26)644#define RX_MSDU_END_INFO6_MESH_STA GENMASK(28, 27)645#define RX_MSDU_END_INFO6_VLAN_CTAG_STRIPPED BIT(29)646#define RX_MSDU_END_INFO6_VLAN_STAG_STRIPPED BIT(30)647#define RX_MSDU_END_INFO6_FRAGMENT_FLAG BIT(31)648649#define RX_MSDU_END_INFO7_AGGR_COUNT GENMASK(7, 0)650#define RX_MSDU_END_INFO7_FLOW_AGGR_CONTN BIT(8)651#define RX_MSDU_END_INFO7_FISA_TIMEOUT BIT(9)652#define RX_MSDU_END_INFO7_TCPUDP_CSUM_FAIL_CPY BIT(10)653#define RX_MSDU_END_INFO7_MSDU_LIMIT_ERROR BIT(11)654#define RX_MSDU_END_INFO7_FLOW_IDX_TIMEOUT BIT(12)655#define RX_MSDU_END_INFO7_FLOW_IDX_INVALID BIT(13)656#define RX_MSDU_END_INFO7_CCE_MATCH BIT(14)657#define RX_MSDU_END_INFO7_AMSDU_PARSER_ERR BIT(15)658659#define RX_MSDU_END_INFO8_KEY_ID GENMASK(7, 0)660661#define RX_MSDU_END_INFO9_SERVICE_CODE GENMASK(14, 6)662#define RX_MSDU_END_INFO9_PRIORITY_VALID BIT(15)663#define RX_MSDU_END_INFO9_INRA_BSS BIT(16)664#define RX_MSDU_END_INFO9_DEST_CHIP_ID GENMASK(18, 17)665#define RX_MSDU_END_INFO9_MCAST_ECHO BIT(19)666#define RX_MSDU_END_INFO9_WDS_LEARN_EVENT BIT(20)667#define RX_MSDU_END_INFO9_WDS_ROAM_EVENT BIT(21)668#define RX_MSDU_END_INFO9_WDS_KEEP_ALIVE_EVENT BIT(22)669670#define RX_MSDU_END_INFO10_MSDU_LENGTH GENMASK(13, 0)671#define RX_MSDU_END_INFO10_STBC BIT(14)672#define RX_MSDU_END_INFO10_IPSEC_ESP BIT(15)673#define RX_MSDU_END_INFO10_L3_OFFSET GENMASK(22, 16)674#define RX_MSDU_END_INFO10_IPSEC_AH BIT(23)675#define RX_MSDU_END_INFO10_L4_OFFSET GENMASK(31, 24)676677#define RX_MSDU_END_INFO11_MSDU_NUMBER GENMASK(7, 0)678#define RX_MSDU_END_INFO11_DECAP_FORMAT GENMASK(9, 8)679#define RX_MSDU_END_INFO11_IPV4 BIT(10)680#define RX_MSDU_END_INFO11_IPV6 BIT(11)681#define RX_MSDU_END_INFO11_TCP BIT(12)682#define RX_MSDU_END_INFO11_UDP BIT(13)683#define RX_MSDU_END_INFO11_IP_FRAG BIT(14)684#define RX_MSDU_END_INFO11_TCP_ONLY_ACK BIT(15)685#define RX_MSDU_END_INFO11_DA_IS_BCAST_MCAST BIT(16)686#define RX_MSDU_END_INFO11_SEL_TOEPLITZ_HASH GENMASK(18, 17)687#define RX_MSDU_END_INFO11_IP_FIXED_HDR_VALID BIT(19)688#define RX_MSDU_END_INFO11_IP_EXTN_HDR_VALID BIT(20)689#define RX_MSDU_END_INFO11_IP_TCP_UDP_HDR_VALID BIT(21)690#define RX_MSDU_END_INFO11_MESH_CTRL_PRESENT BIT(22)691#define RX_MSDU_END_INFO11_LDPC BIT(23)692#define RX_MSDU_END_INFO11_IP4_IP6_NXT_HDR GENMASK(31, 24)693694#define RX_MSDU_END_INFO12_USER_RSSI GENMASK(7, 0)695#define RX_MSDU_END_INFO12_PKT_TYPE GENMASK(11, 8)696#define RX_MSDU_END_INFO12_SGI GENMASK(13, 12)697#define RX_MSDU_END_INFO12_RATE_MCS GENMASK(17, 14)698#define RX_MSDU_END_INFO12_RECV_BW GENMASK(20, 18)699#define RX_MSDU_END_INFO12_RECEPTION_TYPE GENMASK(23, 21)700#define RX_MSDU_END_INFO12_MIMO_SS_BITMAP GENMASK(30, 24)701#define RX_MSDU_END_INFO12_MIMO_DONE_COPY BIT(31)702703#define RX_MSDU_END_INFO13_FIRST_MPDU BIT(0)704#define RX_MSDU_END_INFO13_MCAST_BCAST BIT(2)705#define RX_MSDU_END_INFO13_AST_IDX_NOT_FOUND BIT(3)706#define RX_MSDU_END_INFO13_AST_IDX_TIMEDOUT BIT(4)707#define RX_MSDU_END_INFO13_POWER_MGMT BIT(5)708#define RX_MSDU_END_INFO13_NON_QOS BIT(6)709#define RX_MSDU_END_INFO13_NULL_DATA BIT(7)710#define RX_MSDU_END_INFO13_MGMT_TYPE BIT(8)711#define RX_MSDU_END_INFO13_CTRL_TYPE BIT(9)712#define RX_MSDU_END_INFO13_MORE_DATA BIT(10)713#define RX_MSDU_END_INFO13_EOSP BIT(11)714#define RX_MSDU_END_INFO13_A_MSDU_ERROR BIT(12)715#define RX_MSDU_END_INFO13_ORDER BIT(14)716#define RX_MSDU_END_INFO13_WIFI_PARSER_ERR BIT(15)717#define RX_MSDU_END_INFO13_OVERFLOW_ERR BIT(16)718#define RX_MSDU_END_INFO13_MSDU_LEN_ERR BIT(17)719#define RX_MSDU_END_INFO13_TCP_UDP_CKSUM_FAIL BIT(18)720#define RX_MSDU_END_INFO13_IP_CKSUM_FAIL BIT(19)721#define RX_MSDU_END_INFO13_SA_IDX_INVALID BIT(20)722#define RX_MSDU_END_INFO13_DA_IDX_INVALID BIT(21)723#define RX_MSDU_END_INFO13_AMSDU_ADDR_MISMATCH BIT(22)724#define RX_MSDU_END_INFO13_RX_IN_TX_DECRYPT_BYP BIT(23)725#define RX_MSDU_END_INFO13_ENCRYPT_REQUIRED BIT(24)726#define RX_MSDU_END_INFO13_DIRECTED BIT(25)727#define RX_MSDU_END_INFO13_BUFFER_FRAGMENT BIT(26)728#define RX_MSDU_END_INFO13_MPDU_LEN_ERR BIT(27)729#define RX_MSDU_END_INFO13_TKIP_MIC_ERR BIT(28)730#define RX_MSDU_END_INFO13_DECRYPT_ERR BIT(29)731#define RX_MSDU_END_INFO13_UNDECRYPT_FRAME_ERR BIT(30)732#define RX_MSDU_END_INFO13_FCS_ERR BIT(31)733734#define RX_MSDU_END_INFO14_DECRYPT_STATUS_CODE GENMASK(12, 10)735#define RX_MSDU_END_INFO14_RX_BITMAP_NOT_UPDED BIT(13)736#define RX_MSDU_END_INFO14_MSDU_DONE BIT(31)737738struct rx_msdu_end_qcn9274 {739__le16 info0;740__le16 phy_ppdu_id;741__le16 ip_hdr_cksum;742__le16 info1;743__le16 info2;744__le16 cumulative_l3_checksum;745__le32 rule_indication0;746__le32 ipv6_options_crc;747__le16 info3;748__le16 l3_type;749__le32 rule_indication1;750__le32 tcp_seq_num;751__le32 tcp_ack_num;752__le16 info4;753__le16 window_size;754__le16 sa_sw_peer_id;755__le16 info5;756__le16 sa_idx;757__le16 da_idx_or_sw_peer_id;758__le32 info6;759__le32 fse_metadata;760__le16 cce_metadata;761__le16 tcp_udp_cksum;762__le16 info7;763__le16 cumulative_ip_length;764__le32 info8;765__le32 info9;766__le32 info10;767__le32 info11;768__le16 vlan_ctag_ci;769__le16 vlan_stag_ci;770__le32 peer_meta_data;771__le32 info12;772__le32 flow_id_toeplitz;773__le32 ppdu_start_timestamp_63_32;774__le32 phy_meta_data;775__le32 ppdu_start_timestamp_31_0;776__le32 toeplitz_hash_2_or_4;777__le16 res0;778__le16 sa_15_0;779__le32 sa_47_16;780__le32 info13;781__le32 info14;782} __packed;783784/* rx_msdu_end785*786* rxpcu_mpdu_filter_in_category787* Field indicates what the reason was that this mpdu frame788* was allowed to come into the receive path by rxpcu. Values789* are defined in enum %RX_DESC_RXPCU_FILTER_*.790*791* sw_frame_group_id792* SW processes frames based on certain classifications. Values793* are defined in enum %RX_DESC_SW_FRAME_GRP_ID_*.794*795* phy_ppdu_id796* A ppdu counter value that PHY increments for every PPDU797* received. The counter value wraps around.798*799* ip_hdr_cksum800* This can include the IP header checksum or the pseudo801* header checksum used by TCP/UDP checksum.802*803* reported_mpdu_length804* MPDU length before decapsulation. Only valid when first_msdu is805* set. This field is taken directly from the length field of the806* A-MPDU delimiter or the preamble length field for non-A-MPDU807* frames.808*809* cce_super_rule810* Indicates the super filter rule.811*812* cce_classify_not_done_truncate813* Classification failed due to truncated frame.814*815* cce_classify_not_done_cce_dis816* Classification failed due to CCE global disable817*818* cumulative_l3_checksum819* FISA: IP header checksum including the total MSDU length820* that is part of this flow aggregated so far, reported if821* 'RXOLE_R0_FISA_CTRL. CHKSUM_CUM_IP_LEN_EN' is set822*823* rule_indication824* Bitmap indicating which of rules have matched.825*826* ipv6_options_crc827* 32 bit CRC computed out of IP v6 extension headers.828*829* da_offset830* Offset into MSDU buffer for DA.831*832* sa_offset833* Offset into MSDU buffer for SA.834*835* da_offset_valid836* da_offset field is valid. This will be set to 0 in case837* of a dynamic A-MSDU when DA is compressed.838*839* sa_offset_valid840* sa_offset field is valid. This will be set to 0 in case841* of a dynamic A-MSDU when SA is compressed.842*843* l3_type844* The 16-bit type value indicating the type of L3 later845* extracted from LLC/SNAP, set to zero if SNAP is not846* available.847*848* tcp_seq_number849* TCP sequence number.850*851* tcp_ack_number852* TCP acknowledge number.853*854* tcp_flag855* TCP flags {NS, CWR, ECE, URG, ACK, PSH, RST, SYN, FIN}.856*857* lro_eligible858* Computed out of TCP and IP fields to indicate that this859* MSDU is eligible for LRO.860*861* window_size862* TCP receive window size.863*864* sa_sw_peer_id865* sw_peer_id from the address search entry corresponding to the866* source address of the MSDU.867*868* sa_idx_timeout869* Indicates an unsuccessful MAC source address search due to the870* expiring of the search timer.871*872* da_idx_timeout873* Indicates an unsuccessful MAC destination address search due to874* the expiring of the search timer.875*876* to_ds877* Set if the to DS bit is set in the frame control.878*879* tid880* TID field in the QoS control field881*882* sa_is_valid883* Indicates that OLE found a valid SA entry.884*885* da_is_valid886* Indicates that OLE found a valid DA entry.887*888* da_is_mcbc889* Field Only valid if da_is_valid is set. Indicates the DA address890* was a Multicast of Broadcast address.891*892* l3_header_padding893* Number of bytes padded to make sure that the L3 header will894* always start of a Dword boundary.895*896* first_msdu897* Indicates the first MSDU of A-MSDU. If both first_msdu and898* last_msdu are set in the MSDU then this is a non-aggregated MSDU899* frame: normal MPDU. Interior MSDU in an A-MSDU shall have both900* first_mpdu and last_mpdu bits set to 0.901*902* last_msdu903* Indicates the last MSDU of the A-MSDU. MPDU end status is only904* valid when last_msdu is set.905*906* fr_ds907* Set if the from DS bit is set in the frame control.908*909* ip_chksum_fail_copy910* Indicates that the computed checksum did not match the911* checksum in the IP header.912*913* sa_idx914* The offset in the address table which matches the MAC source915* address.916*917* da_idx_or_sw_peer_id918* Based on a register configuration in RXOLE, this field will919* contain:920* The offset in the address table which matches the MAC destination921* address922* OR:923* sw_peer_id from the address search entry corresponding to924* the destination address of the MSDU925*926* msdu_drop927* REO shall drop this MSDU and not forward it to any other ring.928*929* The id of the reo exit ring where the msdu frame shall push930* after (MPDU level) reordering has finished. Values are defined931* in enum %HAL_RX_MSDU_DESC_REO_DEST_IND_.932*933* flow_idx934* Flow table index.935*936* use_ppe937* Indicates to RXDMA to ignore the REO_destination_indication938* and use a programmed value corresponding to the REO2PPE939* ring940*941* mesh_sta942* When set, this is a Mesh (11s) STA.943*944* vlan_ctag_stripped945* Set by RXOLE if it stripped 4-bytes of C-VLAN Tag from the946* packet947*948* vlan_stag_stripped949* Set by RXOLE if it stripped 4-bytes of S-VLAN Tag from the950* packet951*952* fragment_flag953* Indicates that this is an 802.11 fragment frame. This is954* set when either the more_frag bit is set in the frame control955* or the fragment number is not zero. Only set when first_msdu956* is set.957*958* fse_metadata959* FSE related meta data.960*961* cce_metadata962* CCE related meta data.963*964* tcp_udp_chksum965* The value of the computed TCP/UDP checksum. A mode bit966* selects whether this checksum is the full checksum or the967* partial checksum which does not include the pseudo header.968*969* aggregation_count970* Number of MSDU's aggregated so far971*972* flow_aggregation_continuation973* To indicate that this MSDU can be aggregated with974* the previous packet with the same flow id975*976* fisa_timeout977* To indicate that the aggregation has restarted for978* this flow due to timeout979*980* tcp_udp_chksum_fail981* Indicates that the computed checksum (tcp_udp_chksum) did982* not match the checksum in the TCP/UDP header.983*984* msdu_limit_error985* Indicates that the MSDU threshold was exceeded and thus all the986* rest of the MSDUs will not be scattered and will not be987* decapsulated but will be DMA'ed in RAW format as a single MSDU.988*989* flow_idx_timeout990* Indicates an unsuccessful flow search due to the expiring of991* the search timer.992*993* flow_idx_invalid994* flow id is not valid.995*996* cce_match997* Indicates that this status has a corresponding MSDU that998* requires FW processing. The OLE will have classification999* ring mask registers which will indicate the ring(s) for1000* packets and descriptors which need FW attention.1001*1002* amsdu_parser_error1003* A-MSDU could not be properly de-agregated.1004*1005* cumulative_ip_length1006* Total MSDU length that is part of this flow aggregated1007* so far1008*1009* key_id1010* The key ID octet from the IV. Only valid when first_msdu is set.1011*1012* service_code1013* Opaque service code between PPE and Wi-Fi1014*1015* priority_valid1016* This field gets passed on by REO to PPE in the EDMA descriptor1017*1018* intra_bss1019* This packet needs intra-BSS routing by SW as the 'vdev_id'1020* for the destination is the same as 'vdev_id' (from 'RX_MPDU_PCU_START')1021* that this MSDU was got in.1022*1023* dest_chip_id1024* If intra_bss is set, copied by RXOLE from 'ADDR_SEARCH_ENTRY'1025* to support intra-BSS routing with multi-chip multi-link1026* operation. This indicates into which chip's TCL the packet should be1027* queueued1028*1029* multicast_echo1030* If set, this packet is a multicast echo, i.e. the DA is1031* multicast and Rx OLE SA search with mcast_echo_check = 11032* passed. RXDMA should release such packets to WBM.1033*1034* wds_learning_event1035* If set, this packet has an SA search failure with WDS learning1036* enabled for the peer. RXOLE should route this TLV to the1037* RXDMA0 status ring to notify FW.1038*1039* wds_roaming_event1040* If set, this packet's SA 'Sw_peer_id' mismatches the 'Sw_peer_id'1041* of the peer through which the packet was got, indicating1042* the SA node has roamed. RXOLE should route this TLV to1043* the RXDMA0 status ring to notify FW.1044*1045* wds_keep_alive_event1046* If set, the AST timestamp for this packet's SA is older1047* than the current timestamp by more than a threshold programmed1048* in RXOLE. RXOLE should route this TLV to the RXDMA0 status1049* ring to notify FW to keep the AST entry for the SA alive.1050*1051* msdu_length1052* MSDU length in bytes after decapsulation.1053* This field is still valid for MPDU frames without A-MSDU.1054* It still represents MSDU length after decapsulation1055*1056* stbc1057* When set, use STBC transmission rates.1058*1059* ipsec_esp1060* Set if IPv4/v6 packet is using IPsec ESP.1061*1062* l3_offset1063* Depending upon mode bit, this field either indicates the1064* L3 offset in bytes from the start of the RX_HEADER or the IP1065* offset in bytes from the start of the packet after1066* decapsulation. The latter is only valid if ipv4_proto or1067* ipv6_proto is set.1068*1069* ipsec_ah1070* Set if IPv4/v6 packet is using IPsec AH1071*1072* l4_offset1073* Depending upon mode bit, this field either indicates the1074* L4 offset in bytes from the start of RX_HEADER (only valid1075* if either ipv4_proto or ipv6_proto is set to 1) or indicates1076* the offset in bytes to the start of TCP or UDP header from1077* the start of the IP header after decapsulation (Only valid if1078* tcp_proto or udp_proto is set). The value 0 indicates that1079* the offset is longer than 127 bytes.1080*1081* msdu_number1082* Indicates the MSDU number within a MPDU. This value is1083* reset to zero at the start of each MPDU. If the number of1084* MSDU exceeds 255 this number will wrap using modulo 256.1085*1086* decap_type1087* Indicates the format after decapsulation. Values are defined in1088* enum %MPDU_START_DECAP_TYPE_*.1089*1090* ipv4_proto1091* Set if L2 layer indicates IPv4 protocol.1092*1093* ipv6_proto1094* Set if L2 layer indicates IPv6 protocol.1095*1096* tcp_proto1097* Set if the ipv4_proto or ipv6_proto are set and the IP protocol1098* indicates TCP.1099*1100* udp_proto1101* Set if the ipv4_proto or ipv6_proto are set and the IP protocol1102* indicates UDP.1103*1104* ip_frag1105* Indicates that either the IP More frag bit is set or IP frag1106* number is non-zero. If set indicates that this is a fragmented1107* IP packet.1108*1109* tcp_only_ack1110* Set if only the TCP Ack bit is set in the TCP flags and if1111* the TCP payload is 0.1112*1113* da_is_bcast_mcast1114* The destination address is broadcast or multicast.1115*1116* toeplitz_hash1117* Actual chosen Hash.1118* 0 - Toeplitz hash of 2-tuple (IP source address, IP1119* destination address)1120* 1 - Toeplitz hash of 4-tuple (IP source address,1121* IP destination address, L4 (TCP/UDP) source port,1122* L4 (TCP/UDP) destination port)1123* 2 - Toeplitz of flow_id1124* 3 - Zero is used1125*1126* ip_fixed_header_valid1127* Fixed 20-byte IPv4 header or 40-byte IPv6 header parsed1128* fully within first 256 bytes of the packet1129*1130* ip_extn_header_valid1131* IPv6/IPv6 header, including IPv4 options and1132* recognizable extension headers parsed fully within first 2561133* bytes of the packet1134*1135* tcp_udp_header_valid1136* Fixed 20-byte TCP (excluding TCP options) or 8-byte UDP1137* header parsed fully within first 256 bytes of the packet1138*1139* mesh_control_present1140* When set, this MSDU includes the 'Mesh Control' field1141*1142* ldpc1143*1144* ip4_protocol_ip6_next_header1145* For IPv4, this is the 8 bit protocol field set). For IPv6 this1146* is the 8 bit next_header field.1147*1148*1149* vlan_ctag_ci1150* 2 bytes of C-VLAN Tag Control Information from WHO_L2_LLC1151*1152* vlan_stag_ci1153* 2 bytes of S-VLAN Tag Control Information from WHO_L2_LLC1154* in case of double VLAN1155*1156* peer_meta_data1157* Meta data that SW has programmed in the Peer table entry1158* of the transmitting STA.1159*1160* user_rssi1161* RSSI for this user1162*1163* pkt_type1164* Values are defined in enum %RX_MSDU_START_PKT_TYPE_*.1165*1166* sgi1167* Field only valid when pkt type is HT, VHT or HE. Values are1168* defined in enum %RX_MSDU_START_SGI_*.1169*1170* rate_mcs1171* MCS Rate used.1172*1173* receive_bandwidth1174* Full receive Bandwidth. Values are defined in enum1175* %RX_MSDU_START_RECV_*.1176*1177* reception_type1178* Indicates what type of reception this is and defined in enum1179* %RX_MSDU_START_RECEPTION_TYPE_*.1180*1181* mimo_ss_bitmap1182* Field only valid when1183* Reception_type is RX_MSDU_START_RECEPTION_TYPE_DL_MU_MIMO or1184* RX_MSDU_START_RECEPTION_TYPE_DL_MU_OFDMA_MIMO.1185*1186* Bitmap, with each bit indicating if the related spatial1187* stream is used for this STA1188*1189* LSB related to SS 01190*1191* 0 - spatial stream not used for this reception1192* 1 - spatial stream used for this reception1193*1194* msdu_done_copy1195* If set indicates that the RX packet data, RX header data,1196* RX PPDU start descriptor, RX MPDU start/end descriptor,1197* RX MSDU start/end descriptors and RX Attention descriptor1198* are all valid. This bit is in the last 64-bit of the descriptor1199* expected to be subscribed in future hardware.1200*1201* flow_id_toeplitz1202* Toeplitz hash of 5-tuple1203* {IP source address, IP destination address, IP source port, IP1204* destination port, L4 protocol} in case of non-IPSec.1205*1206* In case of IPSec - Toeplitz hash of 4-tuple1207* {IP source address, IP destination address, SPI, L4 protocol}1208*1209* The relevant Toeplitz key registers are provided in RxOLE's1210* instance of common parser module. These registers are separate1211* from the Toeplitz keys used by ASE/FSE modules inside RxOLE.1212* The actual value will be passed on from common parser module1213* to RxOLE in one of the WHO_* TLVs.1214*1215* ppdu_start_timestamp1216* Timestamp that indicates when the PPDU that contained this MPDU1217* started on the medium.1218*1219* phy_meta_data1220* SW programmed Meta data provided by the PHY. Can be used for SW1221* to indicate the channel the device is on.1222*1223* toeplitz_hash_2_or_41224* Controlled by multiple RxOLE registers for TCP/UDP over1225* IPv4/IPv6 - Either, Toeplitz hash computed over 2-tuple1226* IPv4 or IPv6 src/dest addresses is reported; or, Toeplitz1227* hash computed over 4-tuple IPv4 or IPv6 src/dest addresses1228* and src/dest ports is reported. The Flow_id_toeplitz hash1229* can also be reported here. Usually the hash reported here1230* is the one used for hash-based REO routing (see use_flow_id_toeplitz_clfy1231* in 'RXPT_CLASSIFY_INFO').1232*1233* sa1234* Source MAC address1235*1236* first_mpdu1237* Indicates the first MSDU of the PPDU. If both first_mpdu1238* and last_mpdu are set in the MSDU then this is a not an1239* A-MPDU frame but a stand alone MPDU. Interior MPDU in an1240* A-MPDU shall have both first_mpdu and last_mpdu bits set to1241* 0. The PPDU start status will only be valid when this bit1242* is set.1243*1244* mcast_bcast1245* Multicast / broadcast indicator. Only set when the MAC1246* address 1 bit 0 is set indicating mcast/bcast and the BSSID1247* matches one of the 4 BSSID registers. Only set when1248* first_msdu is set.1249*1250* ast_index_not_found1251* Only valid when first_msdu is set. Indicates no AST matching1252* entries within the max search count.1253*1254* ast_index_timeout1255* Only valid when first_msdu is set. Indicates an unsuccessful1256* search in the address search table due to timeout.1257*1258* power_mgmt1259* Power management bit set in the 802.11 header. Only set1260* when first_msdu is set.1261*1262* non_qos1263* Set if packet is not a non-QoS data frame. Only set when1264* first_msdu is set.1265*1266* null_data1267* Set if frame type indicates either null data or QoS null1268* data format. Only set when first_msdu is set.1269*1270* mgmt_type1271* Set if packet is a management packet. Only set when1272* first_msdu is set.1273*1274* ctrl_type1275* Set if packet is a control packet. Only set when first_msdu1276* is set.1277*1278* more_data1279* Set if more bit in frame control is set. Only set when1280* first_msdu is set.1281*1282* eosp1283* Set if the EOSP (end of service period) bit in the QoS1284* control field is set. Only set when first_msdu is set.1285*1286* a_msdu_error1287* Set if number of MSDUs in A-MSDU is above a threshold or if the1288* size of the MSDU is invalid. This receive buffer will contain1289* all of the remainder of MSDUs in this MPDU w/o decapsulation.1290*1291* order1292* Set if the order bit in the frame control is set. Only1293* set when first_msdu is set.1294*1295* wifi_parser_error1296* Indicates that the WiFi frame has one of the following errors1297*1298* overflow_err1299* RXPCU Receive FIFO ran out of space to receive the full MPDU.1300* Therefore this MPDU is terminated early and is thus corrupted.1301*1302* This MPDU will not be ACKed.1303*1304* RXPCU might still be able to correctly receive the following1305* MPDUs in the PPDU if enough fifo space became available in time.1306*1307* mpdu_length_err1308* Set by RXPCU if the expected MPDU length does not correspond1309* with the actually received number of bytes in the MPDU.1310*1311* tcp_udp_chksum_fail1312* Indicates that the computed checksum (tcp_udp_chksum) did1313* not match the checksum in the TCP/UDP header.1314*1315* ip_chksum_fail1316* Indicates that the computed checksum did not match the1317* checksum in the IP header.1318*1319* sa_idx_invalid1320* Indicates no matching entry was found in the address search1321* table for the source MAC address.1322*1323* da_idx_invalid1324* Indicates no matching entry was found in the address search1325* table for the destination MAC address.1326*1327* amsdu_addr_mismatch1328* Indicates that an A-MSDU with 'from DS = 0' had an SA mismatching1329* TA or an A-MDU with 'to DS = 0' had a DA mismatching RA1330*1331* rx_in_tx_decrypt_byp1332* Indicates that RX packet is not decrypted as Crypto is busy1333* with TX packet processing.1334*1335* encrypt_required1336* Indicates that this data type frame is not encrypted even if1337* the policy for this MPDU requires encryption as indicated in1338* the peer table key type.1339*1340* directed1341* MPDU is a directed packet which means that the RA matched1342* our STA addresses. In proxySTA it means that the TA matched1343* an entry in our address search table with the corresponding1344* 'no_ack' bit is the address search entry cleared.1345*1346* buffer_fragment1347* Indicates that at least one of the rx buffers has been1348* fragmented. If set the FW should look at the rx_frag_info1349* descriptor described below.1350*1351* mpdu_length_err1352* Indicates that the MPDU was pre-maturely terminated1353* resulting in a truncated MPDU. Don't trust the MPDU length1354* field.1355*1356* tkip_mic_err1357* Indicates that the MPDU Michael integrity check failed1358*1359* decrypt_err1360* Indicates that the MPDU decrypt integrity check failed1361*1362* fcs_err1363* Indicates that the MPDU FCS check failed1364*1365* flow_idx_timeout1366* Indicates an unsuccessful flow search due to the expiring of1367* the search timer.1368*1369* flow_idx_invalid1370* flow id is not valid.1371*1372* decrypt_status_code1373* Field provides insight into the decryption performed. Values1374* are defined in enum %RX_DESC_DECRYPT_STATUS_CODE_*.1375*1376* rx_bitmap_not_updated1377* Frame is received, but RXPCU could not update the receive bitmap1378* due to (temporary) fifo constraints.1379*1380* msdu_done1381* If set indicates that the RX packet data, RX header data, RX1382* PPDU start descriptor, RX MPDU start/end descriptor, RX MSDU1383* start/end descriptors and RX Attention descriptor are all1384* valid. This bit must be in the last octet of the1385* descriptor.1386*1387*/13881389/* TODO: Move to compact TLV approach1390* By default these tlv's are not aligned to 128b boundary1391* Need to remove unused qwords and make them compact/aligned1392*/1393struct hal_rx_desc_qcn9274 {1394struct rx_msdu_end_qcn9274 msdu_end;1395struct rx_mpdu_start_qcn9274 mpdu_start;1396u8 msdu_payload[];1397} __packed;13981399#define RX_BE_PADDING0_BYTES 81400#define RX_BE_PADDING1_BYTES 814011402#define HAL_RX_BE_PKT_HDR_TLV_LEN 11214031404struct rx_pkt_hdr_tlv {1405__le64 tag;1406__le64 phy_ppdu_id;1407u8 rx_pkt_hdr[HAL_RX_BE_PKT_HDR_TLV_LEN];1408};14091410struct hal_rx_desc_wcn7850 {1411__le64 msdu_end_tag;1412struct rx_msdu_end_qcn9274 msdu_end;1413u8 rx_padding0[RX_BE_PADDING0_BYTES];1414__le64 mpdu_start_tag;1415struct rx_mpdu_start_qcn9274 mpdu_start;1416struct rx_pkt_hdr_tlv pkt_hdr_tlv;1417u8 msdu_payload[];1418};14191420struct hal_rx_desc {1421union {1422struct hal_rx_desc_qcn9274 qcn9274;1423struct hal_rx_desc_wcn7850 wcn7850;1424} u;1425} __packed;14261427#define MAX_USER_POS 81428#define MAX_MU_GROUP_ID 641429#define MAX_MU_GROUP_SHOW 161430#define MAX_MU_GROUP_LENGTH (6 * MAX_MU_GROUP_SHOW)14311432#define HAL_RX_RU_ALLOC_TYPE_MAX 61433#define RU_26 11434#define RU_52 21435#define RU_106 41436#define RU_242 91437#define RU_484 181438#define RU_996 3714391440#endif /* ATH12K_RX_DESC_H */144114421443