162306a36Sopenharmony_ci/* SPDX-License-Identifier: ISC */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2005-2011 Atheros Communications Inc. 462306a36Sopenharmony_ci * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. 562306a36Sopenharmony_ci */ 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#ifndef _RX_DESC_H_ 862306a36Sopenharmony_ci#define _RX_DESC_H_ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#include <linux/bitops.h> 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_cienum rx_attention_flags { 1362306a36Sopenharmony_ci RX_ATTENTION_FLAGS_FIRST_MPDU = BIT(0), 1462306a36Sopenharmony_ci RX_ATTENTION_FLAGS_LAST_MPDU = BIT(1), 1562306a36Sopenharmony_ci RX_ATTENTION_FLAGS_MCAST_BCAST = BIT(2), 1662306a36Sopenharmony_ci RX_ATTENTION_FLAGS_PEER_IDX_INVALID = BIT(3), 1762306a36Sopenharmony_ci RX_ATTENTION_FLAGS_PEER_IDX_TIMEOUT = BIT(4), 1862306a36Sopenharmony_ci RX_ATTENTION_FLAGS_POWER_MGMT = BIT(5), 1962306a36Sopenharmony_ci RX_ATTENTION_FLAGS_NON_QOS = BIT(6), 2062306a36Sopenharmony_ci RX_ATTENTION_FLAGS_NULL_DATA = BIT(7), 2162306a36Sopenharmony_ci RX_ATTENTION_FLAGS_MGMT_TYPE = BIT(8), 2262306a36Sopenharmony_ci RX_ATTENTION_FLAGS_CTRL_TYPE = BIT(9), 2362306a36Sopenharmony_ci RX_ATTENTION_FLAGS_MORE_DATA = BIT(10), 2462306a36Sopenharmony_ci RX_ATTENTION_FLAGS_EOSP = BIT(11), 2562306a36Sopenharmony_ci RX_ATTENTION_FLAGS_U_APSD_TRIGGER = BIT(12), 2662306a36Sopenharmony_ci RX_ATTENTION_FLAGS_FRAGMENT = BIT(13), 2762306a36Sopenharmony_ci RX_ATTENTION_FLAGS_ORDER = BIT(14), 2862306a36Sopenharmony_ci RX_ATTENTION_FLAGS_CLASSIFICATION = BIT(15), 2962306a36Sopenharmony_ci RX_ATTENTION_FLAGS_OVERFLOW_ERR = BIT(16), 3062306a36Sopenharmony_ci RX_ATTENTION_FLAGS_MSDU_LENGTH_ERR = BIT(17), 3162306a36Sopenharmony_ci RX_ATTENTION_FLAGS_TCP_UDP_CHKSUM_FAIL = BIT(18), 3262306a36Sopenharmony_ci RX_ATTENTION_FLAGS_IP_CHKSUM_FAIL = BIT(19), 3362306a36Sopenharmony_ci RX_ATTENTION_FLAGS_SA_IDX_INVALID = BIT(20), 3462306a36Sopenharmony_ci RX_ATTENTION_FLAGS_DA_IDX_INVALID = BIT(21), 3562306a36Sopenharmony_ci RX_ATTENTION_FLAGS_SA_IDX_TIMEOUT = BIT(22), 3662306a36Sopenharmony_ci RX_ATTENTION_FLAGS_DA_IDX_TIMEOUT = BIT(23), 3762306a36Sopenharmony_ci RX_ATTENTION_FLAGS_ENCRYPT_REQUIRED = BIT(24), 3862306a36Sopenharmony_ci RX_ATTENTION_FLAGS_DIRECTED = BIT(25), 3962306a36Sopenharmony_ci RX_ATTENTION_FLAGS_BUFFER_FRAGMENT = BIT(26), 4062306a36Sopenharmony_ci RX_ATTENTION_FLAGS_MPDU_LENGTH_ERR = BIT(27), 4162306a36Sopenharmony_ci RX_ATTENTION_FLAGS_TKIP_MIC_ERR = BIT(28), 4262306a36Sopenharmony_ci RX_ATTENTION_FLAGS_DECRYPT_ERR = BIT(29), 4362306a36Sopenharmony_ci RX_ATTENTION_FLAGS_FCS_ERR = BIT(30), 4462306a36Sopenharmony_ci RX_ATTENTION_FLAGS_MSDU_DONE = BIT(31), 4562306a36Sopenharmony_ci}; 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_cistruct rx_attention { 4862306a36Sopenharmony_ci __le32 flags; /* %RX_ATTENTION_FLAGS_ */ 4962306a36Sopenharmony_ci} __packed; 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci/* 5262306a36Sopenharmony_ci * first_mpdu 5362306a36Sopenharmony_ci * Indicates the first MSDU of the PPDU. If both first_mpdu 5462306a36Sopenharmony_ci * and last_mpdu are set in the MSDU then this is a not an 5562306a36Sopenharmony_ci * A-MPDU frame but a stand alone MPDU. Interior MPDU in an 5662306a36Sopenharmony_ci * A-MPDU shall have both first_mpdu and last_mpdu bits set to 5762306a36Sopenharmony_ci * 0. The PPDU start status will only be valid when this bit 5862306a36Sopenharmony_ci * is set. 5962306a36Sopenharmony_ci * 6062306a36Sopenharmony_ci * last_mpdu 6162306a36Sopenharmony_ci * Indicates the last MSDU of the last MPDU of the PPDU. The 6262306a36Sopenharmony_ci * PPDU end status will only be valid when this bit is set. 6362306a36Sopenharmony_ci * 6462306a36Sopenharmony_ci * mcast_bcast 6562306a36Sopenharmony_ci * Multicast / broadcast indicator. Only set when the MAC 6662306a36Sopenharmony_ci * address 1 bit 0 is set indicating mcast/bcast and the BSSID 6762306a36Sopenharmony_ci * matches one of the 4 BSSID registers. Only set when 6862306a36Sopenharmony_ci * first_msdu is set. 6962306a36Sopenharmony_ci * 7062306a36Sopenharmony_ci * peer_idx_invalid 7162306a36Sopenharmony_ci * Indicates no matching entries within the max search 7262306a36Sopenharmony_ci * count. Only set when first_msdu is set. 7362306a36Sopenharmony_ci * 7462306a36Sopenharmony_ci * peer_idx_timeout 7562306a36Sopenharmony_ci * Indicates an unsuccessful search for the peer index due to 7662306a36Sopenharmony_ci * timeout. Only set when first_msdu is set. 7762306a36Sopenharmony_ci * 7862306a36Sopenharmony_ci * power_mgmt 7962306a36Sopenharmony_ci * Power management bit set in the 802.11 header. Only set 8062306a36Sopenharmony_ci * when first_msdu is set. 8162306a36Sopenharmony_ci * 8262306a36Sopenharmony_ci * non_qos 8362306a36Sopenharmony_ci * Set if packet is not a non-QoS data frame. Only set when 8462306a36Sopenharmony_ci * first_msdu is set. 8562306a36Sopenharmony_ci * 8662306a36Sopenharmony_ci * null_data 8762306a36Sopenharmony_ci * Set if frame type indicates either null data or QoS null 8862306a36Sopenharmony_ci * data format. Only set when first_msdu is set. 8962306a36Sopenharmony_ci * 9062306a36Sopenharmony_ci * mgmt_type 9162306a36Sopenharmony_ci * Set if packet is a management packet. Only set when 9262306a36Sopenharmony_ci * first_msdu is set. 9362306a36Sopenharmony_ci * 9462306a36Sopenharmony_ci * ctrl_type 9562306a36Sopenharmony_ci * Set if packet is a control packet. Only set when first_msdu 9662306a36Sopenharmony_ci * is set. 9762306a36Sopenharmony_ci * 9862306a36Sopenharmony_ci * more_data 9962306a36Sopenharmony_ci * Set if more bit in frame control is set. Only set when 10062306a36Sopenharmony_ci * first_msdu is set. 10162306a36Sopenharmony_ci * 10262306a36Sopenharmony_ci * eosp 10362306a36Sopenharmony_ci * Set if the EOSP (end of service period) bit in the QoS 10462306a36Sopenharmony_ci * control field is set. Only set when first_msdu is set. 10562306a36Sopenharmony_ci * 10662306a36Sopenharmony_ci * u_apsd_trigger 10762306a36Sopenharmony_ci * Set if packet is U-APSD trigger. Key table will have bits 10862306a36Sopenharmony_ci * per TID to indicate U-APSD trigger. 10962306a36Sopenharmony_ci * 11062306a36Sopenharmony_ci * fragment 11162306a36Sopenharmony_ci * Indicates that this is an 802.11 fragment frame. This is 11262306a36Sopenharmony_ci * set when either the more_frag bit is set in the frame 11362306a36Sopenharmony_ci * control or the fragment number is not zero. Only set when 11462306a36Sopenharmony_ci * first_msdu is set. 11562306a36Sopenharmony_ci * 11662306a36Sopenharmony_ci * order 11762306a36Sopenharmony_ci * Set if the order bit in the frame control is set. Only set 11862306a36Sopenharmony_ci * when first_msdu is set. 11962306a36Sopenharmony_ci * 12062306a36Sopenharmony_ci * classification 12162306a36Sopenharmony_ci * Indicates that this status has a corresponding MSDU that 12262306a36Sopenharmony_ci * requires FW processing. The OLE will have classification 12362306a36Sopenharmony_ci * ring mask registers which will indicate the ring(s) for 12462306a36Sopenharmony_ci * packets and descriptors which need FW attention. 12562306a36Sopenharmony_ci * 12662306a36Sopenharmony_ci * overflow_err 12762306a36Sopenharmony_ci * PCU Receive FIFO does not have enough space to store the 12862306a36Sopenharmony_ci * full receive packet. Enough space is reserved in the 12962306a36Sopenharmony_ci * receive FIFO for the status is written. This MPDU remaining 13062306a36Sopenharmony_ci * packets in the PPDU will be filtered and no Ack response 13162306a36Sopenharmony_ci * will be transmitted. 13262306a36Sopenharmony_ci * 13362306a36Sopenharmony_ci * msdu_length_err 13462306a36Sopenharmony_ci * Indicates that the MSDU length from the 802.3 encapsulated 13562306a36Sopenharmony_ci * length field extends beyond the MPDU boundary. 13662306a36Sopenharmony_ci * 13762306a36Sopenharmony_ci * tcp_udp_chksum_fail 13862306a36Sopenharmony_ci * Indicates that the computed checksum (tcp_udp_chksum) did 13962306a36Sopenharmony_ci * not match the checksum in the TCP/UDP header. 14062306a36Sopenharmony_ci * 14162306a36Sopenharmony_ci * ip_chksum_fail 14262306a36Sopenharmony_ci * Indicates that the computed checksum did not match the 14362306a36Sopenharmony_ci * checksum in the IP header. 14462306a36Sopenharmony_ci * 14562306a36Sopenharmony_ci * sa_idx_invalid 14662306a36Sopenharmony_ci * Indicates no matching entry was found in the address search 14762306a36Sopenharmony_ci * table for the source MAC address. 14862306a36Sopenharmony_ci * 14962306a36Sopenharmony_ci * da_idx_invalid 15062306a36Sopenharmony_ci * Indicates no matching entry was found in the address search 15162306a36Sopenharmony_ci * table for the destination MAC address. 15262306a36Sopenharmony_ci * 15362306a36Sopenharmony_ci * sa_idx_timeout 15462306a36Sopenharmony_ci * Indicates an unsuccessful search for the source MAC address 15562306a36Sopenharmony_ci * due to the expiring of the search timer. 15662306a36Sopenharmony_ci * 15762306a36Sopenharmony_ci * da_idx_timeout 15862306a36Sopenharmony_ci * Indicates an unsuccessful search for the destination MAC 15962306a36Sopenharmony_ci * address due to the expiring of the search timer. 16062306a36Sopenharmony_ci * 16162306a36Sopenharmony_ci * encrypt_required 16262306a36Sopenharmony_ci * Indicates that this data type frame is not encrypted even if 16362306a36Sopenharmony_ci * the policy for this MPDU requires encryption as indicated in 16462306a36Sopenharmony_ci * the peer table key type. 16562306a36Sopenharmony_ci * 16662306a36Sopenharmony_ci * directed 16762306a36Sopenharmony_ci * MPDU is a directed packet which means that the RA matched 16862306a36Sopenharmony_ci * our STA addresses. In proxySTA it means that the TA matched 16962306a36Sopenharmony_ci * an entry in our address search table with the corresponding 17062306a36Sopenharmony_ci * 'no_ack' bit is the address search entry cleared. 17162306a36Sopenharmony_ci * 17262306a36Sopenharmony_ci * buffer_fragment 17362306a36Sopenharmony_ci * Indicates that at least one of the rx buffers has been 17462306a36Sopenharmony_ci * fragmented. If set the FW should look at the rx_frag_info 17562306a36Sopenharmony_ci * descriptor described below. 17662306a36Sopenharmony_ci * 17762306a36Sopenharmony_ci * mpdu_length_err 17862306a36Sopenharmony_ci * Indicates that the MPDU was pre-maturely terminated 17962306a36Sopenharmony_ci * resulting in a truncated MPDU. Don't trust the MPDU length 18062306a36Sopenharmony_ci * field. 18162306a36Sopenharmony_ci * 18262306a36Sopenharmony_ci * tkip_mic_err 18362306a36Sopenharmony_ci * Indicates that the MPDU Michael integrity check failed 18462306a36Sopenharmony_ci * 18562306a36Sopenharmony_ci * decrypt_err 18662306a36Sopenharmony_ci * Indicates that the MPDU decrypt integrity check failed 18762306a36Sopenharmony_ci * 18862306a36Sopenharmony_ci * fcs_err 18962306a36Sopenharmony_ci * Indicates that the MPDU FCS check failed 19062306a36Sopenharmony_ci * 19162306a36Sopenharmony_ci * msdu_done 19262306a36Sopenharmony_ci * If set indicates that the RX packet data, RX header data, RX 19362306a36Sopenharmony_ci * PPDU start descriptor, RX MPDU start/end descriptor, RX MSDU 19462306a36Sopenharmony_ci * start/end descriptors and RX Attention descriptor are all 19562306a36Sopenharmony_ci * valid. This bit must be in the last octet of the 19662306a36Sopenharmony_ci * descriptor. 19762306a36Sopenharmony_ci */ 19862306a36Sopenharmony_ci 19962306a36Sopenharmony_cistruct rx_frag_info_common { 20062306a36Sopenharmony_ci u8 ring0_more_count; 20162306a36Sopenharmony_ci u8 ring1_more_count; 20262306a36Sopenharmony_ci u8 ring2_more_count; 20362306a36Sopenharmony_ci u8 ring3_more_count; 20462306a36Sopenharmony_ci} __packed; 20562306a36Sopenharmony_ci 20662306a36Sopenharmony_cistruct rx_frag_info_wcn3990 { 20762306a36Sopenharmony_ci u8 ring4_more_count; 20862306a36Sopenharmony_ci u8 ring5_more_count; 20962306a36Sopenharmony_ci u8 ring6_more_count; 21062306a36Sopenharmony_ci u8 ring7_more_count; 21162306a36Sopenharmony_ci} __packed; 21262306a36Sopenharmony_ci 21362306a36Sopenharmony_cistruct rx_frag_info { 21462306a36Sopenharmony_ci struct rx_frag_info_common common; 21562306a36Sopenharmony_ci union { 21662306a36Sopenharmony_ci struct rx_frag_info_wcn3990 wcn3990; 21762306a36Sopenharmony_ci } __packed; 21862306a36Sopenharmony_ci} __packed; 21962306a36Sopenharmony_ci 22062306a36Sopenharmony_cistruct rx_frag_info_v1 { 22162306a36Sopenharmony_ci struct rx_frag_info_common common; 22262306a36Sopenharmony_ci} __packed; 22362306a36Sopenharmony_ci 22462306a36Sopenharmony_ci/* 22562306a36Sopenharmony_ci * ring0_more_count 22662306a36Sopenharmony_ci * Indicates the number of more buffers associated with RX DMA 22762306a36Sopenharmony_ci * ring 0. Field is filled in by the RX_DMA. 22862306a36Sopenharmony_ci * 22962306a36Sopenharmony_ci * ring1_more_count 23062306a36Sopenharmony_ci * Indicates the number of more buffers associated with RX DMA 23162306a36Sopenharmony_ci * ring 1. Field is filled in by the RX_DMA. 23262306a36Sopenharmony_ci * 23362306a36Sopenharmony_ci * ring2_more_count 23462306a36Sopenharmony_ci * Indicates the number of more buffers associated with RX DMA 23562306a36Sopenharmony_ci * ring 2. Field is filled in by the RX_DMA. 23662306a36Sopenharmony_ci * 23762306a36Sopenharmony_ci * ring3_more_count 23862306a36Sopenharmony_ci * Indicates the number of more buffers associated with RX DMA 23962306a36Sopenharmony_ci * ring 3. Field is filled in by the RX_DMA. 24062306a36Sopenharmony_ci */ 24162306a36Sopenharmony_ci 24262306a36Sopenharmony_cienum htt_rx_mpdu_encrypt_type { 24362306a36Sopenharmony_ci HTT_RX_MPDU_ENCRYPT_WEP40 = 0, 24462306a36Sopenharmony_ci HTT_RX_MPDU_ENCRYPT_WEP104 = 1, 24562306a36Sopenharmony_ci HTT_RX_MPDU_ENCRYPT_TKIP_WITHOUT_MIC = 2, 24662306a36Sopenharmony_ci HTT_RX_MPDU_ENCRYPT_WEP128 = 3, 24762306a36Sopenharmony_ci HTT_RX_MPDU_ENCRYPT_TKIP_WPA = 4, 24862306a36Sopenharmony_ci HTT_RX_MPDU_ENCRYPT_WAPI = 5, 24962306a36Sopenharmony_ci HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2 = 6, 25062306a36Sopenharmony_ci HTT_RX_MPDU_ENCRYPT_NONE = 7, 25162306a36Sopenharmony_ci HTT_RX_MPDU_ENCRYPT_AES_CCM256_WPA2 = 8, 25262306a36Sopenharmony_ci HTT_RX_MPDU_ENCRYPT_AES_GCMP_WPA2 = 9, 25362306a36Sopenharmony_ci HTT_RX_MPDU_ENCRYPT_AES_GCMP256_WPA2 = 10, 25462306a36Sopenharmony_ci}; 25562306a36Sopenharmony_ci 25662306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_PEER_IDX_MASK 0x000007ff 25762306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_PEER_IDX_LSB 0 25862306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_SEQ_NUM_MASK 0x0fff0000 25962306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_SEQ_NUM_LSB 16 26062306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_ENCRYPT_TYPE_MASK 0xf0000000 26162306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_ENCRYPT_TYPE_LSB 28 26262306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_FROM_DS BIT(11) 26362306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_TO_DS BIT(12) 26462306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_ENCRYPTED BIT(13) 26562306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_RETRY BIT(14) 26662306a36Sopenharmony_ci#define RX_MPDU_START_INFO0_TXBF_H_INFO BIT(15) 26762306a36Sopenharmony_ci 26862306a36Sopenharmony_ci#define RX_MPDU_START_INFO1_TID_MASK 0xf0000000 26962306a36Sopenharmony_ci#define RX_MPDU_START_INFO1_TID_LSB 28 27062306a36Sopenharmony_ci#define RX_MPDU_START_INFO1_DIRECTED BIT(16) 27162306a36Sopenharmony_ci 27262306a36Sopenharmony_cistruct rx_mpdu_start { 27362306a36Sopenharmony_ci __le32 info0; 27462306a36Sopenharmony_ci union { 27562306a36Sopenharmony_ci struct { 27662306a36Sopenharmony_ci __le32 pn31_0; 27762306a36Sopenharmony_ci __le32 info1; /* %RX_MPDU_START_INFO1_ */ 27862306a36Sopenharmony_ci } __packed; 27962306a36Sopenharmony_ci struct { 28062306a36Sopenharmony_ci u8 pn[6]; 28162306a36Sopenharmony_ci } __packed; 28262306a36Sopenharmony_ci } __packed; 28362306a36Sopenharmony_ci} __packed; 28462306a36Sopenharmony_ci 28562306a36Sopenharmony_ci/* 28662306a36Sopenharmony_ci * peer_idx 28762306a36Sopenharmony_ci * The index of the address search table which associated with 28862306a36Sopenharmony_ci * the peer table entry corresponding to this MPDU. Only valid 28962306a36Sopenharmony_ci * when first_msdu is set. 29062306a36Sopenharmony_ci * 29162306a36Sopenharmony_ci * fr_ds 29262306a36Sopenharmony_ci * Set if the from DS bit is set in the frame control. Only 29362306a36Sopenharmony_ci * valid when first_msdu is set. 29462306a36Sopenharmony_ci * 29562306a36Sopenharmony_ci * to_ds 29662306a36Sopenharmony_ci * Set if the to DS bit is set in the frame control. Only 29762306a36Sopenharmony_ci * valid when first_msdu is set. 29862306a36Sopenharmony_ci * 29962306a36Sopenharmony_ci * encrypted 30062306a36Sopenharmony_ci * Protected bit from the frame control. Only valid when 30162306a36Sopenharmony_ci * first_msdu is set. 30262306a36Sopenharmony_ci * 30362306a36Sopenharmony_ci * retry 30462306a36Sopenharmony_ci * Retry bit from the frame control. Only valid when 30562306a36Sopenharmony_ci * first_msdu is set. 30662306a36Sopenharmony_ci * 30762306a36Sopenharmony_ci * txbf_h_info 30862306a36Sopenharmony_ci * The MPDU data will contain H information. Primarily used 30962306a36Sopenharmony_ci * for debug. 31062306a36Sopenharmony_ci * 31162306a36Sopenharmony_ci * seq_num 31262306a36Sopenharmony_ci * The sequence number from the 802.11 header. Only valid when 31362306a36Sopenharmony_ci * first_msdu is set. 31462306a36Sopenharmony_ci * 31562306a36Sopenharmony_ci * encrypt_type 31662306a36Sopenharmony_ci * Indicates type of decrypt cipher used (as defined in the 31762306a36Sopenharmony_ci * peer table) 31862306a36Sopenharmony_ci * 0: WEP40 31962306a36Sopenharmony_ci * 1: WEP104 32062306a36Sopenharmony_ci * 2: TKIP without MIC 32162306a36Sopenharmony_ci * 3: WEP128 32262306a36Sopenharmony_ci * 4: TKIP (WPA) 32362306a36Sopenharmony_ci * 5: WAPI 32462306a36Sopenharmony_ci * 6: AES-CCM (WPA2) 32562306a36Sopenharmony_ci * 7: No cipher 32662306a36Sopenharmony_ci * Only valid when first_msdu_is set 32762306a36Sopenharmony_ci * 32862306a36Sopenharmony_ci * pn_31_0 32962306a36Sopenharmony_ci * Bits [31:0] of the PN number extracted from the IV field 33062306a36Sopenharmony_ci * WEP: IV = {key_id_octet, pn2, pn1, pn0}. Only pn[23:0] is 33162306a36Sopenharmony_ci * valid. 33262306a36Sopenharmony_ci * TKIP: IV = {pn5, pn4, pn3, pn2, key_id_octet, pn0, 33362306a36Sopenharmony_ci * WEPSeed[1], pn1}. Only pn[47:0] is valid. 33462306a36Sopenharmony_ci * AES-CCM: IV = {pn5, pn4, pn3, pn2, key_id_octet, 0x0, pn1, 33562306a36Sopenharmony_ci * pn0}. Only pn[47:0] is valid. 33662306a36Sopenharmony_ci * WAPI: IV = {key_id_octet, 0x0, pn15, pn14, pn13, pn12, pn11, 33762306a36Sopenharmony_ci * pn10, pn9, pn8, pn7, pn6, pn5, pn4, pn3, pn2, pn1, pn0}. 33862306a36Sopenharmony_ci * The ext_wapi_pn[127:48] in the rx_msdu_misc descriptor and 33962306a36Sopenharmony_ci * pn[47:0] are valid. 34062306a36Sopenharmony_ci * Only valid when first_msdu is set. 34162306a36Sopenharmony_ci * 34262306a36Sopenharmony_ci * pn_47_32 34362306a36Sopenharmony_ci * Bits [47:32] of the PN number. See description for 34462306a36Sopenharmony_ci * pn_31_0. The remaining PN fields are in the rx_msdu_end 34562306a36Sopenharmony_ci * descriptor 34662306a36Sopenharmony_ci * 34762306a36Sopenharmony_ci * pn 34862306a36Sopenharmony_ci * Use this field to access the pn without worrying about 34962306a36Sopenharmony_ci * byte-order and bitmasking/bitshifting. 35062306a36Sopenharmony_ci * 35162306a36Sopenharmony_ci * directed 35262306a36Sopenharmony_ci * See definition in RX attention descriptor 35362306a36Sopenharmony_ci * 35462306a36Sopenharmony_ci * reserved_2 35562306a36Sopenharmony_ci * Reserved: HW should fill with zero. FW should ignore. 35662306a36Sopenharmony_ci * 35762306a36Sopenharmony_ci * tid 35862306a36Sopenharmony_ci * The TID field in the QoS control field 35962306a36Sopenharmony_ci */ 36062306a36Sopenharmony_ci 36162306a36Sopenharmony_ci#define RX_MPDU_END_INFO0_RESERVED_0_MASK 0x00001fff 36262306a36Sopenharmony_ci#define RX_MPDU_END_INFO0_RESERVED_0_LSB 0 36362306a36Sopenharmony_ci#define RX_MPDU_END_INFO0_POST_DELIM_CNT_MASK 0x0fff0000 36462306a36Sopenharmony_ci#define RX_MPDU_END_INFO0_POST_DELIM_CNT_LSB 16 36562306a36Sopenharmony_ci#define RX_MPDU_END_INFO0_OVERFLOW_ERR BIT(13) 36662306a36Sopenharmony_ci#define RX_MPDU_END_INFO0_LAST_MPDU BIT(14) 36762306a36Sopenharmony_ci#define RX_MPDU_END_INFO0_POST_DELIM_ERR BIT(15) 36862306a36Sopenharmony_ci#define RX_MPDU_END_INFO0_MPDU_LENGTH_ERR BIT(28) 36962306a36Sopenharmony_ci#define RX_MPDU_END_INFO0_TKIP_MIC_ERR BIT(29) 37062306a36Sopenharmony_ci#define RX_MPDU_END_INFO0_DECRYPT_ERR BIT(30) 37162306a36Sopenharmony_ci#define RX_MPDU_END_INFO0_FCS_ERR BIT(31) 37262306a36Sopenharmony_ci 37362306a36Sopenharmony_cistruct rx_mpdu_end { 37462306a36Sopenharmony_ci __le32 info0; 37562306a36Sopenharmony_ci} __packed; 37662306a36Sopenharmony_ci 37762306a36Sopenharmony_ci/* 37862306a36Sopenharmony_ci * reserved_0 37962306a36Sopenharmony_ci * Reserved 38062306a36Sopenharmony_ci * 38162306a36Sopenharmony_ci * overflow_err 38262306a36Sopenharmony_ci * PCU Receive FIFO does not have enough space to store the 38362306a36Sopenharmony_ci * full receive packet. Enough space is reserved in the 38462306a36Sopenharmony_ci * receive FIFO for the status is written. This MPDU remaining 38562306a36Sopenharmony_ci * packets in the PPDU will be filtered and no Ack response 38662306a36Sopenharmony_ci * will be transmitted. 38762306a36Sopenharmony_ci * 38862306a36Sopenharmony_ci * last_mpdu 38962306a36Sopenharmony_ci * Indicates that this is the last MPDU of a PPDU. 39062306a36Sopenharmony_ci * 39162306a36Sopenharmony_ci * post_delim_err 39262306a36Sopenharmony_ci * Indicates that a delimiter FCS error occurred after this 39362306a36Sopenharmony_ci * MPDU before the next MPDU. Only valid when last_msdu is 39462306a36Sopenharmony_ci * set. 39562306a36Sopenharmony_ci * 39662306a36Sopenharmony_ci * post_delim_cnt 39762306a36Sopenharmony_ci * Count of the delimiters after this MPDU. This requires the 39862306a36Sopenharmony_ci * last MPDU to be held until all the EOF descriptors have been 39962306a36Sopenharmony_ci * received. This may be inefficient in the future when 40062306a36Sopenharmony_ci * ML-MIMO is used. Only valid when last_mpdu is set. 40162306a36Sopenharmony_ci * 40262306a36Sopenharmony_ci * mpdu_length_err 40362306a36Sopenharmony_ci * See definition in RX attention descriptor 40462306a36Sopenharmony_ci * 40562306a36Sopenharmony_ci * tkip_mic_err 40662306a36Sopenharmony_ci * See definition in RX attention descriptor 40762306a36Sopenharmony_ci * 40862306a36Sopenharmony_ci * decrypt_err 40962306a36Sopenharmony_ci * See definition in RX attention descriptor 41062306a36Sopenharmony_ci * 41162306a36Sopenharmony_ci * fcs_err 41262306a36Sopenharmony_ci * See definition in RX attention descriptor 41362306a36Sopenharmony_ci */ 41462306a36Sopenharmony_ci 41562306a36Sopenharmony_ci#define RX_MSDU_START_INFO0_MSDU_LENGTH_MASK 0x00003fff 41662306a36Sopenharmony_ci#define RX_MSDU_START_INFO0_MSDU_LENGTH_LSB 0 41762306a36Sopenharmony_ci#define RX_MSDU_START_INFO0_IP_OFFSET_MASK 0x000fc000 41862306a36Sopenharmony_ci#define RX_MSDU_START_INFO0_IP_OFFSET_LSB 14 41962306a36Sopenharmony_ci#define RX_MSDU_START_INFO0_RING_MASK_MASK 0x00f00000 42062306a36Sopenharmony_ci#define RX_MSDU_START_INFO0_RING_MASK_LSB 20 42162306a36Sopenharmony_ci#define RX_MSDU_START_INFO0_TCP_UDP_OFFSET_MASK 0x7f000000 42262306a36Sopenharmony_ci#define RX_MSDU_START_INFO0_TCP_UDP_OFFSET_LSB 24 42362306a36Sopenharmony_ci 42462306a36Sopenharmony_ci#define RX_MSDU_START_INFO1_MSDU_NUMBER_MASK 0x000000ff 42562306a36Sopenharmony_ci#define RX_MSDU_START_INFO1_MSDU_NUMBER_LSB 0 42662306a36Sopenharmony_ci#define RX_MSDU_START_INFO1_DECAP_FORMAT_MASK 0x00000300 42762306a36Sopenharmony_ci#define RX_MSDU_START_INFO1_DECAP_FORMAT_LSB 8 42862306a36Sopenharmony_ci#define RX_MSDU_START_INFO1_SA_IDX_MASK 0x07ff0000 42962306a36Sopenharmony_ci#define RX_MSDU_START_INFO1_SA_IDX_LSB 16 43062306a36Sopenharmony_ci#define RX_MSDU_START_INFO1_IPV4_PROTO BIT(10) 43162306a36Sopenharmony_ci#define RX_MSDU_START_INFO1_IPV6_PROTO BIT(11) 43262306a36Sopenharmony_ci#define RX_MSDU_START_INFO1_TCP_PROTO BIT(12) 43362306a36Sopenharmony_ci#define RX_MSDU_START_INFO1_UDP_PROTO BIT(13) 43462306a36Sopenharmony_ci#define RX_MSDU_START_INFO1_IP_FRAG BIT(14) 43562306a36Sopenharmony_ci#define RX_MSDU_START_INFO1_TCP_ONLY_ACK BIT(15) 43662306a36Sopenharmony_ci 43762306a36Sopenharmony_ci#define RX_MSDU_START_INFO2_DA_IDX_MASK 0x000007ff 43862306a36Sopenharmony_ci#define RX_MSDU_START_INFO2_DA_IDX_LSB 0 43962306a36Sopenharmony_ci#define RX_MSDU_START_INFO2_IP_PROTO_FIELD_MASK 0x00ff0000 44062306a36Sopenharmony_ci#define RX_MSDU_START_INFO2_IP_PROTO_FIELD_LSB 16 44162306a36Sopenharmony_ci#define RX_MSDU_START_INFO2_DA_BCAST_MCAST BIT(11) 44262306a36Sopenharmony_ci 44362306a36Sopenharmony_ci/* The decapped header (rx_hdr_status) contains the following: 44462306a36Sopenharmony_ci * a) 802.11 header 44562306a36Sopenharmony_ci * [padding to 4 bytes] 44662306a36Sopenharmony_ci * b) HW crypto parameter 44762306a36Sopenharmony_ci * - 0 bytes for no security 44862306a36Sopenharmony_ci * - 4 bytes for WEP 44962306a36Sopenharmony_ci * - 8 bytes for TKIP, AES 45062306a36Sopenharmony_ci * [padding to 4 bytes] 45162306a36Sopenharmony_ci * c) A-MSDU subframe header (14 bytes) if applicable 45262306a36Sopenharmony_ci * d) LLC/SNAP (RFC1042, 8 bytes) 45362306a36Sopenharmony_ci * 45462306a36Sopenharmony_ci * In case of A-MSDU only first frame in sequence contains (a) and (b). 45562306a36Sopenharmony_ci */ 45662306a36Sopenharmony_cienum rx_msdu_decap_format { 45762306a36Sopenharmony_ci RX_MSDU_DECAP_RAW = 0, 45862306a36Sopenharmony_ci 45962306a36Sopenharmony_ci /* Note: QoS frames are reported as non-QoS. The rx_hdr_status in 46062306a36Sopenharmony_ci * htt_rx_desc contains the original decapped 802.11 header. 46162306a36Sopenharmony_ci */ 46262306a36Sopenharmony_ci RX_MSDU_DECAP_NATIVE_WIFI = 1, 46362306a36Sopenharmony_ci 46462306a36Sopenharmony_ci /* Payload contains an ethernet header (struct ethhdr). */ 46562306a36Sopenharmony_ci RX_MSDU_DECAP_ETHERNET2_DIX = 2, 46662306a36Sopenharmony_ci 46762306a36Sopenharmony_ci /* Payload contains two 48-bit addresses and 2-byte length (14 bytes 46862306a36Sopenharmony_ci * total), followed by an RFC1042 header (8 bytes). 46962306a36Sopenharmony_ci */ 47062306a36Sopenharmony_ci RX_MSDU_DECAP_8023_SNAP_LLC = 3 47162306a36Sopenharmony_ci}; 47262306a36Sopenharmony_ci 47362306a36Sopenharmony_cistruct rx_msdu_start_common { 47462306a36Sopenharmony_ci __le32 info0; /* %RX_MSDU_START_INFO0_ */ 47562306a36Sopenharmony_ci __le32 flow_id_crc; 47662306a36Sopenharmony_ci __le32 info1; /* %RX_MSDU_START_INFO1_ */ 47762306a36Sopenharmony_ci} __packed; 47862306a36Sopenharmony_ci 47962306a36Sopenharmony_cistruct rx_msdu_start_qca99x0 { 48062306a36Sopenharmony_ci __le32 info2; /* %RX_MSDU_START_INFO2_ */ 48162306a36Sopenharmony_ci} __packed; 48262306a36Sopenharmony_ci 48362306a36Sopenharmony_cistruct rx_msdu_start_wcn3990 { 48462306a36Sopenharmony_ci __le32 info2; /* %RX_MSDU_START_INFO2_ */ 48562306a36Sopenharmony_ci __le32 info3; /* %RX_MSDU_START_INFO3_ */ 48662306a36Sopenharmony_ci} __packed; 48762306a36Sopenharmony_ci 48862306a36Sopenharmony_cistruct rx_msdu_start { 48962306a36Sopenharmony_ci struct rx_msdu_start_common common; 49062306a36Sopenharmony_ci union { 49162306a36Sopenharmony_ci struct rx_msdu_start_wcn3990 wcn3990; 49262306a36Sopenharmony_ci } __packed; 49362306a36Sopenharmony_ci} __packed; 49462306a36Sopenharmony_ci 49562306a36Sopenharmony_cistruct rx_msdu_start_v1 { 49662306a36Sopenharmony_ci struct rx_msdu_start_common common; 49762306a36Sopenharmony_ci union { 49862306a36Sopenharmony_ci struct rx_msdu_start_qca99x0 qca99x0; 49962306a36Sopenharmony_ci } __packed; 50062306a36Sopenharmony_ci} __packed; 50162306a36Sopenharmony_ci 50262306a36Sopenharmony_ci/* 50362306a36Sopenharmony_ci * msdu_length 50462306a36Sopenharmony_ci * MSDU length in bytes after decapsulation. This field is 50562306a36Sopenharmony_ci * still valid for MPDU frames without A-MSDU. It still 50662306a36Sopenharmony_ci * represents MSDU length after decapsulation 50762306a36Sopenharmony_ci * 50862306a36Sopenharmony_ci * ip_offset 50962306a36Sopenharmony_ci * Indicates the IP offset in bytes from the start of the 51062306a36Sopenharmony_ci * packet after decapsulation. Only valid if ipv4_proto or 51162306a36Sopenharmony_ci * ipv6_proto is set. 51262306a36Sopenharmony_ci * 51362306a36Sopenharmony_ci * ring_mask 51462306a36Sopenharmony_ci * Indicates the destination RX rings for this MSDU. 51562306a36Sopenharmony_ci * 51662306a36Sopenharmony_ci * tcp_udp_offset 51762306a36Sopenharmony_ci * Indicates the offset in bytes to the start of TCP or UDP 51862306a36Sopenharmony_ci * header from the start of the IP header after decapsulation. 51962306a36Sopenharmony_ci * Only valid if tcp_prot or udp_prot is set. The value 0 52062306a36Sopenharmony_ci * indicates that the offset is longer than 127 bytes. 52162306a36Sopenharmony_ci * 52262306a36Sopenharmony_ci * reserved_0c 52362306a36Sopenharmony_ci * Reserved: HW should fill with zero. FW should ignore. 52462306a36Sopenharmony_ci * 52562306a36Sopenharmony_ci * flow_id_crc 52662306a36Sopenharmony_ci * The flow_id_crc runs CRC32 on the following information: 52762306a36Sopenharmony_ci * IPv4 option: dest_addr[31:0], src_addr [31:0], {24'b0, 52862306a36Sopenharmony_ci * protocol[7:0]}. 52962306a36Sopenharmony_ci * IPv6 option: dest_addr[127:0], src_addr [127:0], {24'b0, 53062306a36Sopenharmony_ci * next_header[7:0]} 53162306a36Sopenharmony_ci * UDP case: sort_port[15:0], dest_port[15:0] 53262306a36Sopenharmony_ci * TCP case: sort_port[15:0], dest_port[15:0], 53362306a36Sopenharmony_ci * {header_length[3:0], 6'b0, flags[5:0], window_size[15:0]}, 53462306a36Sopenharmony_ci * {16'b0, urgent_ptr[15:0]}, all options except 32-bit 53562306a36Sopenharmony_ci * timestamp. 53662306a36Sopenharmony_ci * 53762306a36Sopenharmony_ci * msdu_number 53862306a36Sopenharmony_ci * Indicates the MSDU number within a MPDU. This value is 53962306a36Sopenharmony_ci * reset to zero at the start of each MPDU. If the number of 54062306a36Sopenharmony_ci * MSDU exceeds 255 this number will wrap using modulo 256. 54162306a36Sopenharmony_ci * 54262306a36Sopenharmony_ci * decap_format 54362306a36Sopenharmony_ci * Indicates the format after decapsulation: 54462306a36Sopenharmony_ci * 0: RAW: No decapsulation 54562306a36Sopenharmony_ci * 1: Native WiFi 54662306a36Sopenharmony_ci * 2: Ethernet 2 (DIX) 54762306a36Sopenharmony_ci * 3: 802.3 (SNAP/LLC) 54862306a36Sopenharmony_ci * 54962306a36Sopenharmony_ci * ipv4_proto 55062306a36Sopenharmony_ci * Set if L2 layer indicates IPv4 protocol. 55162306a36Sopenharmony_ci * 55262306a36Sopenharmony_ci * ipv6_proto 55362306a36Sopenharmony_ci * Set if L2 layer indicates IPv6 protocol. 55462306a36Sopenharmony_ci * 55562306a36Sopenharmony_ci * tcp_proto 55662306a36Sopenharmony_ci * Set if the ipv4_proto or ipv6_proto are set and the IP 55762306a36Sopenharmony_ci * protocol indicates TCP. 55862306a36Sopenharmony_ci * 55962306a36Sopenharmony_ci * udp_proto 56062306a36Sopenharmony_ci * Set if the ipv4_proto or ipv6_proto are set and the IP 56162306a36Sopenharmony_ci * protocol indicates UDP. 56262306a36Sopenharmony_ci * 56362306a36Sopenharmony_ci * ip_frag 56462306a36Sopenharmony_ci * Indicates that either the IP More frag bit is set or IP frag 56562306a36Sopenharmony_ci * number is non-zero. If set indicates that this is a 56662306a36Sopenharmony_ci * fragmented IP packet. 56762306a36Sopenharmony_ci * 56862306a36Sopenharmony_ci * tcp_only_ack 56962306a36Sopenharmony_ci * Set if only the TCP Ack bit is set in the TCP flags and if 57062306a36Sopenharmony_ci * the TCP payload is 0. 57162306a36Sopenharmony_ci * 57262306a36Sopenharmony_ci * sa_idx 57362306a36Sopenharmony_ci * The offset in the address table which matches the MAC source 57462306a36Sopenharmony_ci * address. 57562306a36Sopenharmony_ci * 57662306a36Sopenharmony_ci * reserved_2b 57762306a36Sopenharmony_ci * Reserved: HW should fill with zero. FW should ignore. 57862306a36Sopenharmony_ci */ 57962306a36Sopenharmony_ci 58062306a36Sopenharmony_ci#define RX_MSDU_END_INFO0_REPORTED_MPDU_LENGTH_MASK 0x00003fff 58162306a36Sopenharmony_ci#define RX_MSDU_END_INFO0_REPORTED_MPDU_LENGTH_LSB 0 58262306a36Sopenharmony_ci#define RX_MSDU_END_INFO0_FIRST_MSDU BIT(14) 58362306a36Sopenharmony_ci#define RX_MSDU_END_INFO0_LAST_MSDU BIT(15) 58462306a36Sopenharmony_ci#define RX_MSDU_END_INFO0_MSDU_LIMIT_ERR BIT(18) 58562306a36Sopenharmony_ci#define RX_MSDU_END_INFO0_PRE_DELIM_ERR BIT(30) 58662306a36Sopenharmony_ci#define RX_MSDU_END_INFO0_RESERVED_3B BIT(31) 58762306a36Sopenharmony_ci 58862306a36Sopenharmony_cistruct rx_msdu_end_common { 58962306a36Sopenharmony_ci __le16 ip_hdr_cksum; 59062306a36Sopenharmony_ci __le16 tcp_hdr_cksum; 59162306a36Sopenharmony_ci u8 key_id_octet; 59262306a36Sopenharmony_ci u8 classification_filter; 59362306a36Sopenharmony_ci u8 wapi_pn[10]; 59462306a36Sopenharmony_ci __le32 info0; 59562306a36Sopenharmony_ci} __packed; 59662306a36Sopenharmony_ci 59762306a36Sopenharmony_ci#define RX_MSDU_END_INFO1_TCP_FLAG_MASK 0x000001ff 59862306a36Sopenharmony_ci#define RX_MSDU_END_INFO1_TCP_FLAG_LSB 0 59962306a36Sopenharmony_ci#define RX_MSDU_END_INFO1_L3_HDR_PAD_MASK 0x00001c00 60062306a36Sopenharmony_ci#define RX_MSDU_END_INFO1_L3_HDR_PAD_LSB 10 60162306a36Sopenharmony_ci#define RX_MSDU_END_INFO1_WINDOW_SIZE_MASK 0xffff0000 60262306a36Sopenharmony_ci#define RX_MSDU_END_INFO1_WINDOW_SIZE_LSB 16 60362306a36Sopenharmony_ci#define RX_MSDU_END_INFO1_IRO_ELIGIBLE BIT(9) 60462306a36Sopenharmony_ci 60562306a36Sopenharmony_ci#define RX_MSDU_END_INFO2_DA_OFFSET_MASK 0x0000003f 60662306a36Sopenharmony_ci#define RX_MSDU_END_INFO2_DA_OFFSET_LSB 0 60762306a36Sopenharmony_ci#define RX_MSDU_END_INFO2_SA_OFFSET_MASK 0x00000fc0 60862306a36Sopenharmony_ci#define RX_MSDU_END_INFO2_SA_OFFSET_LSB 6 60962306a36Sopenharmony_ci#define RX_MSDU_END_INFO2_TYPE_OFFSET_MASK 0x0003f000 61062306a36Sopenharmony_ci#define RX_MSDU_END_INFO2_TYPE_OFFSET_LSB 12 61162306a36Sopenharmony_ci 61262306a36Sopenharmony_cistruct rx_msdu_end_qca99x0 { 61362306a36Sopenharmony_ci __le32 ipv6_crc; 61462306a36Sopenharmony_ci __le32 tcp_seq_no; 61562306a36Sopenharmony_ci __le32 tcp_ack_no; 61662306a36Sopenharmony_ci __le32 info1; 61762306a36Sopenharmony_ci __le32 info2; 61862306a36Sopenharmony_ci} __packed; 61962306a36Sopenharmony_ci 62062306a36Sopenharmony_cistruct rx_msdu_end_wcn3990 { 62162306a36Sopenharmony_ci __le32 ipv6_crc; 62262306a36Sopenharmony_ci __le32 tcp_seq_no; 62362306a36Sopenharmony_ci __le32 tcp_ack_no; 62462306a36Sopenharmony_ci __le32 info1; 62562306a36Sopenharmony_ci __le32 info2; 62662306a36Sopenharmony_ci __le32 rule_indication_0; 62762306a36Sopenharmony_ci __le32 rule_indication_1; 62862306a36Sopenharmony_ci __le32 rule_indication_2; 62962306a36Sopenharmony_ci __le32 rule_indication_3; 63062306a36Sopenharmony_ci} __packed; 63162306a36Sopenharmony_ci 63262306a36Sopenharmony_cistruct rx_msdu_end { 63362306a36Sopenharmony_ci struct rx_msdu_end_common common; 63462306a36Sopenharmony_ci union { 63562306a36Sopenharmony_ci struct rx_msdu_end_wcn3990 wcn3990; 63662306a36Sopenharmony_ci } __packed; 63762306a36Sopenharmony_ci} __packed; 63862306a36Sopenharmony_ci 63962306a36Sopenharmony_cistruct rx_msdu_end_v1 { 64062306a36Sopenharmony_ci struct rx_msdu_end_common common; 64162306a36Sopenharmony_ci union { 64262306a36Sopenharmony_ci struct rx_msdu_end_qca99x0 qca99x0; 64362306a36Sopenharmony_ci } __packed; 64462306a36Sopenharmony_ci} __packed; 64562306a36Sopenharmony_ci 64662306a36Sopenharmony_ci/* 64762306a36Sopenharmony_ci *ip_hdr_chksum 64862306a36Sopenharmony_ci * This can include the IP header checksum or the pseudo header 64962306a36Sopenharmony_ci * checksum used by TCP/UDP checksum. 65062306a36Sopenharmony_ci * 65162306a36Sopenharmony_ci *tcp_udp_chksum 65262306a36Sopenharmony_ci * The value of the computed TCP/UDP checksum. A mode bit 65362306a36Sopenharmony_ci * selects whether this checksum is the full checksum or the 65462306a36Sopenharmony_ci * partial checksum which does not include the pseudo header. 65562306a36Sopenharmony_ci * 65662306a36Sopenharmony_ci *key_id_octet 65762306a36Sopenharmony_ci * The key ID octet from the IV. Only valid when first_msdu is 65862306a36Sopenharmony_ci * set. 65962306a36Sopenharmony_ci * 66062306a36Sopenharmony_ci *classification_filter 66162306a36Sopenharmony_ci * Indicates the number classification filter rule 66262306a36Sopenharmony_ci * 66362306a36Sopenharmony_ci *ext_wapi_pn_63_48 66462306a36Sopenharmony_ci * Extension PN (packet number) which is only used by WAPI. 66562306a36Sopenharmony_ci * This corresponds to WAPI PN bits [63:48] (pn6 and pn7). The 66662306a36Sopenharmony_ci * WAPI PN bits [63:0] are in the pn field of the rx_mpdu_start 66762306a36Sopenharmony_ci * descriptor. 66862306a36Sopenharmony_ci * 66962306a36Sopenharmony_ci *ext_wapi_pn_95_64 67062306a36Sopenharmony_ci * Extension PN (packet number) which is only used by WAPI. 67162306a36Sopenharmony_ci * This corresponds to WAPI PN bits [95:64] (pn8, pn9, pn10 and 67262306a36Sopenharmony_ci * pn11). 67362306a36Sopenharmony_ci * 67462306a36Sopenharmony_ci *ext_wapi_pn_127_96 67562306a36Sopenharmony_ci * Extension PN (packet number) which is only used by WAPI. 67662306a36Sopenharmony_ci * This corresponds to WAPI PN bits [127:96] (pn12, pn13, pn14, 67762306a36Sopenharmony_ci * pn15). 67862306a36Sopenharmony_ci * 67962306a36Sopenharmony_ci *reported_mpdu_length 68062306a36Sopenharmony_ci * MPDU length before decapsulation. Only valid when 68162306a36Sopenharmony_ci * first_msdu is set. This field is taken directly from the 68262306a36Sopenharmony_ci * length field of the A-MPDU delimiter or the preamble length 68362306a36Sopenharmony_ci * field for non-A-MPDU frames. 68462306a36Sopenharmony_ci * 68562306a36Sopenharmony_ci *first_msdu 68662306a36Sopenharmony_ci * Indicates the first MSDU of A-MSDU. If both first_msdu and 68762306a36Sopenharmony_ci * last_msdu are set in the MSDU then this is a non-aggregated 68862306a36Sopenharmony_ci * MSDU frame: normal MPDU. Interior MSDU in an A-MSDU shall 68962306a36Sopenharmony_ci * have both first_mpdu and last_mpdu bits set to 0. 69062306a36Sopenharmony_ci * 69162306a36Sopenharmony_ci *last_msdu 69262306a36Sopenharmony_ci * Indicates the last MSDU of the A-MSDU. MPDU end status is 69362306a36Sopenharmony_ci * only valid when last_msdu is set. 69462306a36Sopenharmony_ci * 69562306a36Sopenharmony_ci *msdu_limit_error 69662306a36Sopenharmony_ci * Indicates that the MSDU threshold was exceeded and thus 69762306a36Sopenharmony_ci * all the rest of the MSDUs will not be scattered and 69862306a36Sopenharmony_ci * will not be decapsulated but will be received in RAW format 69962306a36Sopenharmony_ci * as a single MSDU buffer. 70062306a36Sopenharmony_ci * 70162306a36Sopenharmony_ci *reserved_3a 70262306a36Sopenharmony_ci * Reserved: HW should fill with zero. FW should ignore. 70362306a36Sopenharmony_ci * 70462306a36Sopenharmony_ci *pre_delim_err 70562306a36Sopenharmony_ci * Indicates that the first delimiter had a FCS failure. Only 70662306a36Sopenharmony_ci * valid when first_mpdu and first_msdu are set. 70762306a36Sopenharmony_ci * 70862306a36Sopenharmony_ci *reserved_3b 70962306a36Sopenharmony_ci * Reserved: HW should fill with zero. FW should ignore. 71062306a36Sopenharmony_ci */ 71162306a36Sopenharmony_ci 71262306a36Sopenharmony_ci#define HTT_RX_PPDU_START_PREAMBLE_LEGACY 0x04 71362306a36Sopenharmony_ci#define HTT_RX_PPDU_START_PREAMBLE_HT 0x08 71462306a36Sopenharmony_ci#define HTT_RX_PPDU_START_PREAMBLE_HT_WITH_TXBF 0x09 71562306a36Sopenharmony_ci#define HTT_RX_PPDU_START_PREAMBLE_VHT 0x0C 71662306a36Sopenharmony_ci#define HTT_RX_PPDU_START_PREAMBLE_VHT_WITH_TXBF 0x0D 71762306a36Sopenharmony_ci 71862306a36Sopenharmony_ci#define RX_PPDU_START_INFO0_IS_GREENFIELD BIT(0) 71962306a36Sopenharmony_ci 72062306a36Sopenharmony_ci#define RX_PPDU_START_INFO1_L_SIG_RATE_MASK 0x0000000f 72162306a36Sopenharmony_ci#define RX_PPDU_START_INFO1_L_SIG_RATE_LSB 0 72262306a36Sopenharmony_ci#define RX_PPDU_START_INFO1_L_SIG_LENGTH_MASK 0x0001ffe0 72362306a36Sopenharmony_ci#define RX_PPDU_START_INFO1_L_SIG_LENGTH_LSB 5 72462306a36Sopenharmony_ci#define RX_PPDU_START_INFO1_L_SIG_TAIL_MASK 0x00fc0000 72562306a36Sopenharmony_ci#define RX_PPDU_START_INFO1_L_SIG_TAIL_LSB 18 72662306a36Sopenharmony_ci#define RX_PPDU_START_INFO1_PREAMBLE_TYPE_MASK 0xff000000 72762306a36Sopenharmony_ci#define RX_PPDU_START_INFO1_PREAMBLE_TYPE_LSB 24 72862306a36Sopenharmony_ci#define RX_PPDU_START_INFO1_L_SIG_RATE_SELECT BIT(4) 72962306a36Sopenharmony_ci#define RX_PPDU_START_INFO1_L_SIG_PARITY BIT(17) 73062306a36Sopenharmony_ci 73162306a36Sopenharmony_ci#define RX_PPDU_START_INFO2_HT_SIG_VHT_SIG_A_1_MASK 0x00ffffff 73262306a36Sopenharmony_ci#define RX_PPDU_START_INFO2_HT_SIG_VHT_SIG_A_1_LSB 0 73362306a36Sopenharmony_ci 73462306a36Sopenharmony_ci#define RX_PPDU_START_INFO3_HT_SIG_VHT_SIG_A_2_MASK 0x00ffffff 73562306a36Sopenharmony_ci#define RX_PPDU_START_INFO3_HT_SIG_VHT_SIG_A_2_LSB 0 73662306a36Sopenharmony_ci#define RX_PPDU_START_INFO3_TXBF_H_INFO BIT(24) 73762306a36Sopenharmony_ci 73862306a36Sopenharmony_ci#define RX_PPDU_START_INFO4_VHT_SIG_B_MASK 0x1fffffff 73962306a36Sopenharmony_ci#define RX_PPDU_START_INFO4_VHT_SIG_B_LSB 0 74062306a36Sopenharmony_ci 74162306a36Sopenharmony_ci#define RX_PPDU_START_INFO5_SERVICE_MASK 0x0000ffff 74262306a36Sopenharmony_ci#define RX_PPDU_START_INFO5_SERVICE_LSB 0 74362306a36Sopenharmony_ci 74462306a36Sopenharmony_ci/* No idea what this flag means. It seems to be always set in rate. */ 74562306a36Sopenharmony_ci#define RX_PPDU_START_RATE_FLAG BIT(3) 74662306a36Sopenharmony_ci 74762306a36Sopenharmony_cistruct rx_ppdu_start { 74862306a36Sopenharmony_ci struct { 74962306a36Sopenharmony_ci u8 pri20_mhz; 75062306a36Sopenharmony_ci u8 ext20_mhz; 75162306a36Sopenharmony_ci u8 ext40_mhz; 75262306a36Sopenharmony_ci u8 ext80_mhz; 75362306a36Sopenharmony_ci } rssi_chains[4]; 75462306a36Sopenharmony_ci u8 rssi_comb; 75562306a36Sopenharmony_ci __le16 rsvd0; 75662306a36Sopenharmony_ci u8 info0; /* %RX_PPDU_START_INFO0_ */ 75762306a36Sopenharmony_ci __le32 info1; /* %RX_PPDU_START_INFO1_ */ 75862306a36Sopenharmony_ci __le32 info2; /* %RX_PPDU_START_INFO2_ */ 75962306a36Sopenharmony_ci __le32 info3; /* %RX_PPDU_START_INFO3_ */ 76062306a36Sopenharmony_ci __le32 info4; /* %RX_PPDU_START_INFO4_ */ 76162306a36Sopenharmony_ci __le32 info5; /* %RX_PPDU_START_INFO5_ */ 76262306a36Sopenharmony_ci} __packed; 76362306a36Sopenharmony_ci 76462306a36Sopenharmony_ci/* 76562306a36Sopenharmony_ci * rssi_chain0_pri20 76662306a36Sopenharmony_ci * RSSI of RX PPDU on chain 0 of primary 20 MHz bandwidth. 76762306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 76862306a36Sopenharmony_ci * 76962306a36Sopenharmony_ci * rssi_chain0_sec20 77062306a36Sopenharmony_ci * RSSI of RX PPDU on chain 0 of secondary 20 MHz bandwidth. 77162306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 77262306a36Sopenharmony_ci * 77362306a36Sopenharmony_ci * rssi_chain0_sec40 77462306a36Sopenharmony_ci * RSSI of RX PPDU on chain 0 of secondary 40 MHz bandwidth. 77562306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 77662306a36Sopenharmony_ci * 77762306a36Sopenharmony_ci * rssi_chain0_sec80 77862306a36Sopenharmony_ci * RSSI of RX PPDU on chain 0 of secondary 80 MHz bandwidth. 77962306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 78062306a36Sopenharmony_ci * 78162306a36Sopenharmony_ci * rssi_chain1_pri20 78262306a36Sopenharmony_ci * RSSI of RX PPDU on chain 1 of primary 20 MHz bandwidth. 78362306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 78462306a36Sopenharmony_ci * 78562306a36Sopenharmony_ci * rssi_chain1_sec20 78662306a36Sopenharmony_ci * RSSI of RX PPDU on chain 1 of secondary 20 MHz bandwidth. 78762306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 78862306a36Sopenharmony_ci * 78962306a36Sopenharmony_ci * rssi_chain1_sec40 79062306a36Sopenharmony_ci * RSSI of RX PPDU on chain 1 of secondary 40 MHz bandwidth. 79162306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 79262306a36Sopenharmony_ci * 79362306a36Sopenharmony_ci * rssi_chain1_sec80 79462306a36Sopenharmony_ci * RSSI of RX PPDU on chain 1 of secondary 80 MHz bandwidth. 79562306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 79662306a36Sopenharmony_ci * 79762306a36Sopenharmony_ci * rssi_chain2_pri20 79862306a36Sopenharmony_ci * RSSI of RX PPDU on chain 2 of primary 20 MHz bandwidth. 79962306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 80062306a36Sopenharmony_ci * 80162306a36Sopenharmony_ci * rssi_chain2_sec20 80262306a36Sopenharmony_ci * RSSI of RX PPDU on chain 2 of secondary 20 MHz bandwidth. 80362306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 80462306a36Sopenharmony_ci * 80562306a36Sopenharmony_ci * rssi_chain2_sec40 80662306a36Sopenharmony_ci * RSSI of RX PPDU on chain 2 of secondary 40 MHz bandwidth. 80762306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 80862306a36Sopenharmony_ci * 80962306a36Sopenharmony_ci * rssi_chain2_sec80 81062306a36Sopenharmony_ci * RSSI of RX PPDU on chain 2 of secondary 80 MHz bandwidth. 81162306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 81262306a36Sopenharmony_ci * 81362306a36Sopenharmony_ci * rssi_chain3_pri20 81462306a36Sopenharmony_ci * RSSI of RX PPDU on chain 3 of primary 20 MHz bandwidth. 81562306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 81662306a36Sopenharmony_ci * 81762306a36Sopenharmony_ci * rssi_chain3_sec20 81862306a36Sopenharmony_ci * RSSI of RX PPDU on chain 3 of secondary 20 MHz bandwidth. 81962306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 82062306a36Sopenharmony_ci * 82162306a36Sopenharmony_ci * rssi_chain3_sec40 82262306a36Sopenharmony_ci * RSSI of RX PPDU on chain 3 of secondary 40 MHz bandwidth. 82362306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 82462306a36Sopenharmony_ci * 82562306a36Sopenharmony_ci * rssi_chain3_sec80 82662306a36Sopenharmony_ci * RSSI of RX PPDU on chain 3 of secondary 80 MHz bandwidth. 82762306a36Sopenharmony_ci * Value of 0x80 indicates invalid. 82862306a36Sopenharmony_ci * 82962306a36Sopenharmony_ci * rssi_comb 83062306a36Sopenharmony_ci * The combined RSSI of RX PPDU of all active chains and 83162306a36Sopenharmony_ci * bandwidths. Value of 0x80 indicates invalid. 83262306a36Sopenharmony_ci * 83362306a36Sopenharmony_ci * reserved_4a 83462306a36Sopenharmony_ci * Reserved: HW should fill with 0, FW should ignore. 83562306a36Sopenharmony_ci * 83662306a36Sopenharmony_ci * is_greenfield 83762306a36Sopenharmony_ci * Do we really support this? 83862306a36Sopenharmony_ci * 83962306a36Sopenharmony_ci * reserved_4b 84062306a36Sopenharmony_ci * Reserved: HW should fill with 0, FW should ignore. 84162306a36Sopenharmony_ci * 84262306a36Sopenharmony_ci * l_sig_rate 84362306a36Sopenharmony_ci * If l_sig_rate_select is 0: 84462306a36Sopenharmony_ci * 0x8: OFDM 48 Mbps 84562306a36Sopenharmony_ci * 0x9: OFDM 24 Mbps 84662306a36Sopenharmony_ci * 0xA: OFDM 12 Mbps 84762306a36Sopenharmony_ci * 0xB: OFDM 6 Mbps 84862306a36Sopenharmony_ci * 0xC: OFDM 54 Mbps 84962306a36Sopenharmony_ci * 0xD: OFDM 36 Mbps 85062306a36Sopenharmony_ci * 0xE: OFDM 18 Mbps 85162306a36Sopenharmony_ci * 0xF: OFDM 9 Mbps 85262306a36Sopenharmony_ci * If l_sig_rate_select is 1: 85362306a36Sopenharmony_ci * 0x8: CCK 11 Mbps long preamble 85462306a36Sopenharmony_ci * 0x9: CCK 5.5 Mbps long preamble 85562306a36Sopenharmony_ci * 0xA: CCK 2 Mbps long preamble 85662306a36Sopenharmony_ci * 0xB: CCK 1 Mbps long preamble 85762306a36Sopenharmony_ci * 0xC: CCK 11 Mbps short preamble 85862306a36Sopenharmony_ci * 0xD: CCK 5.5 Mbps short preamble 85962306a36Sopenharmony_ci * 0xE: CCK 2 Mbps short preamble 86062306a36Sopenharmony_ci * 86162306a36Sopenharmony_ci * l_sig_rate_select 86262306a36Sopenharmony_ci * Legacy signal rate select. If set then l_sig_rate indicates 86362306a36Sopenharmony_ci * CCK rates. If clear then l_sig_rate indicates OFDM rates. 86462306a36Sopenharmony_ci * 86562306a36Sopenharmony_ci * l_sig_length 86662306a36Sopenharmony_ci * Length of legacy frame in octets. 86762306a36Sopenharmony_ci * 86862306a36Sopenharmony_ci * l_sig_parity 86962306a36Sopenharmony_ci * Odd parity over l_sig_rate and l_sig_length 87062306a36Sopenharmony_ci * 87162306a36Sopenharmony_ci * l_sig_tail 87262306a36Sopenharmony_ci * Tail bits for Viterbi decoder 87362306a36Sopenharmony_ci * 87462306a36Sopenharmony_ci * preamble_type 87562306a36Sopenharmony_ci * Indicates the type of preamble ahead: 87662306a36Sopenharmony_ci * 0x4: Legacy (OFDM/CCK) 87762306a36Sopenharmony_ci * 0x8: HT 87862306a36Sopenharmony_ci * 0x9: HT with TxBF 87962306a36Sopenharmony_ci * 0xC: VHT 88062306a36Sopenharmony_ci * 0xD: VHT with TxBF 88162306a36Sopenharmony_ci * 0x80 - 0xFF: Reserved for special baseband data types such 88262306a36Sopenharmony_ci * as radar and spectral scan. 88362306a36Sopenharmony_ci * 88462306a36Sopenharmony_ci * ht_sig_vht_sig_a_1 88562306a36Sopenharmony_ci * If preamble_type == 0x8 or 0x9 88662306a36Sopenharmony_ci * HT-SIG (first 24 bits) 88762306a36Sopenharmony_ci * If preamble_type == 0xC or 0xD 88862306a36Sopenharmony_ci * VHT-SIG A (first 24 bits) 88962306a36Sopenharmony_ci * Else 89062306a36Sopenharmony_ci * Reserved 89162306a36Sopenharmony_ci * 89262306a36Sopenharmony_ci * reserved_6 89362306a36Sopenharmony_ci * Reserved: HW should fill with 0, FW should ignore. 89462306a36Sopenharmony_ci * 89562306a36Sopenharmony_ci * ht_sig_vht_sig_a_2 89662306a36Sopenharmony_ci * If preamble_type == 0x8 or 0x9 89762306a36Sopenharmony_ci * HT-SIG (last 24 bits) 89862306a36Sopenharmony_ci * If preamble_type == 0xC or 0xD 89962306a36Sopenharmony_ci * VHT-SIG A (last 24 bits) 90062306a36Sopenharmony_ci * Else 90162306a36Sopenharmony_ci * Reserved 90262306a36Sopenharmony_ci * 90362306a36Sopenharmony_ci * txbf_h_info 90462306a36Sopenharmony_ci * Indicates that the packet data carries H information which 90562306a36Sopenharmony_ci * is used for TxBF debug. 90662306a36Sopenharmony_ci * 90762306a36Sopenharmony_ci * reserved_7 90862306a36Sopenharmony_ci * Reserved: HW should fill with 0, FW should ignore. 90962306a36Sopenharmony_ci * 91062306a36Sopenharmony_ci * vht_sig_b 91162306a36Sopenharmony_ci * WiFi 1.0 and WiFi 2.0 will likely have this field to be all 91262306a36Sopenharmony_ci * 0s since the BB does not plan on decoding VHT SIG-B. 91362306a36Sopenharmony_ci * 91462306a36Sopenharmony_ci * reserved_8 91562306a36Sopenharmony_ci * Reserved: HW should fill with 0, FW should ignore. 91662306a36Sopenharmony_ci * 91762306a36Sopenharmony_ci * service 91862306a36Sopenharmony_ci * Service field from BB for OFDM, HT and VHT packets. CCK 91962306a36Sopenharmony_ci * packets will have service field of 0. 92062306a36Sopenharmony_ci * 92162306a36Sopenharmony_ci * reserved_9 92262306a36Sopenharmony_ci * Reserved: HW should fill with 0, FW should ignore. 92362306a36Sopenharmony_ci */ 92462306a36Sopenharmony_ci 92562306a36Sopenharmony_ci#define RX_PPDU_END_FLAGS_PHY_ERR BIT(0) 92662306a36Sopenharmony_ci#define RX_PPDU_END_FLAGS_RX_LOCATION BIT(1) 92762306a36Sopenharmony_ci#define RX_PPDU_END_FLAGS_TXBF_H_INFO BIT(2) 92862306a36Sopenharmony_ci 92962306a36Sopenharmony_ci#define RX_PPDU_END_INFO0_RX_ANTENNA_MASK 0x00ffffff 93062306a36Sopenharmony_ci#define RX_PPDU_END_INFO0_RX_ANTENNA_LSB 0 93162306a36Sopenharmony_ci#define RX_PPDU_END_INFO0_FLAGS_TX_HT_VHT_ACK BIT(24) 93262306a36Sopenharmony_ci#define RX_PPDU_END_INFO0_BB_CAPTURED_CHANNEL BIT(25) 93362306a36Sopenharmony_ci 93462306a36Sopenharmony_ci#define RX_PPDU_END_INFO1_PEER_IDX_MASK 0x1ffc 93562306a36Sopenharmony_ci#define RX_PPDU_END_INFO1_PEER_IDX_LSB 2 93662306a36Sopenharmony_ci#define RX_PPDU_END_INFO1_BB_DATA BIT(0) 93762306a36Sopenharmony_ci#define RX_PPDU_END_INFO1_PEER_IDX_VALID BIT(1) 93862306a36Sopenharmony_ci#define RX_PPDU_END_INFO1_PPDU_DONE BIT(15) 93962306a36Sopenharmony_ci 94062306a36Sopenharmony_cistruct rx_ppdu_end_common { 94162306a36Sopenharmony_ci __le32 evm_p0; 94262306a36Sopenharmony_ci __le32 evm_p1; 94362306a36Sopenharmony_ci __le32 evm_p2; 94462306a36Sopenharmony_ci __le32 evm_p3; 94562306a36Sopenharmony_ci __le32 evm_p4; 94662306a36Sopenharmony_ci __le32 evm_p5; 94762306a36Sopenharmony_ci __le32 evm_p6; 94862306a36Sopenharmony_ci __le32 evm_p7; 94962306a36Sopenharmony_ci __le32 evm_p8; 95062306a36Sopenharmony_ci __le32 evm_p9; 95162306a36Sopenharmony_ci __le32 evm_p10; 95262306a36Sopenharmony_ci __le32 evm_p11; 95362306a36Sopenharmony_ci __le32 evm_p12; 95462306a36Sopenharmony_ci __le32 evm_p13; 95562306a36Sopenharmony_ci __le32 evm_p14; 95662306a36Sopenharmony_ci __le32 evm_p15; 95762306a36Sopenharmony_ci __le32 tsf_timestamp; 95862306a36Sopenharmony_ci __le32 wb_timestamp; 95962306a36Sopenharmony_ci} __packed; 96062306a36Sopenharmony_ci 96162306a36Sopenharmony_cistruct rx_ppdu_end_qca988x { 96262306a36Sopenharmony_ci u8 locationing_timestamp; 96362306a36Sopenharmony_ci u8 phy_err_code; 96462306a36Sopenharmony_ci __le16 flags; /* %RX_PPDU_END_FLAGS_ */ 96562306a36Sopenharmony_ci __le32 info0; /* %RX_PPDU_END_INFO0_ */ 96662306a36Sopenharmony_ci __le16 bb_length; 96762306a36Sopenharmony_ci __le16 info1; /* %RX_PPDU_END_INFO1_ */ 96862306a36Sopenharmony_ci} __packed; 96962306a36Sopenharmony_ci 97062306a36Sopenharmony_ci#define RX_PPDU_END_RTT_CORRELATION_VALUE_MASK 0x00ffffff 97162306a36Sopenharmony_ci#define RX_PPDU_END_RTT_CORRELATION_VALUE_LSB 0 97262306a36Sopenharmony_ci#define RX_PPDU_END_RTT_UNUSED_MASK 0x7f000000 97362306a36Sopenharmony_ci#define RX_PPDU_END_RTT_UNUSED_LSB 24 97462306a36Sopenharmony_ci#define RX_PPDU_END_RTT_NORMAL_MODE BIT(31) 97562306a36Sopenharmony_ci 97662306a36Sopenharmony_cistruct rx_ppdu_end_qca6174 { 97762306a36Sopenharmony_ci u8 locationing_timestamp; 97862306a36Sopenharmony_ci u8 phy_err_code; 97962306a36Sopenharmony_ci __le16 flags; /* %RX_PPDU_END_FLAGS_ */ 98062306a36Sopenharmony_ci __le32 info0; /* %RX_PPDU_END_INFO0_ */ 98162306a36Sopenharmony_ci __le32 rtt; /* %RX_PPDU_END_RTT_ */ 98262306a36Sopenharmony_ci __le16 bb_length; 98362306a36Sopenharmony_ci __le16 info1; /* %RX_PPDU_END_INFO1_ */ 98462306a36Sopenharmony_ci} __packed; 98562306a36Sopenharmony_ci 98662306a36Sopenharmony_ci#define RX_PKT_END_INFO0_RX_SUCCESS BIT(0) 98762306a36Sopenharmony_ci#define RX_PKT_END_INFO0_ERR_TX_INTERRUPT_RX BIT(3) 98862306a36Sopenharmony_ci#define RX_PKT_END_INFO0_ERR_OFDM_POWER_DROP BIT(4) 98962306a36Sopenharmony_ci#define RX_PKT_END_INFO0_ERR_OFDM_RESTART BIT(5) 99062306a36Sopenharmony_ci#define RX_PKT_END_INFO0_ERR_CCK_POWER_DROP BIT(6) 99162306a36Sopenharmony_ci#define RX_PKT_END_INFO0_ERR_CCK_RESTART BIT(7) 99262306a36Sopenharmony_ci 99362306a36Sopenharmony_ci#define RX_LOCATION_INFO_RTT_CORR_VAL_MASK 0x0001ffff 99462306a36Sopenharmony_ci#define RX_LOCATION_INFO_RTT_CORR_VAL_LSB 0 99562306a36Sopenharmony_ci#define RX_LOCATION_INFO_FAC_STATUS_MASK 0x000c0000 99662306a36Sopenharmony_ci#define RX_LOCATION_INFO_FAC_STATUS_LSB 18 99762306a36Sopenharmony_ci#define RX_LOCATION_INFO_PKT_BW_MASK 0x00700000 99862306a36Sopenharmony_ci#define RX_LOCATION_INFO_PKT_BW_LSB 20 99962306a36Sopenharmony_ci#define RX_LOCATION_INFO_RTT_TX_FRAME_PHASE_MASK 0x01800000 100062306a36Sopenharmony_ci#define RX_LOCATION_INFO_RTT_TX_FRAME_PHASE_LSB 23 100162306a36Sopenharmony_ci#define RX_LOCATION_INFO_CIR_STATUS BIT(17) 100262306a36Sopenharmony_ci#define RX_LOCATION_INFO_RTT_MAC_PHY_PHASE BIT(25) 100362306a36Sopenharmony_ci#define RX_LOCATION_INFO_RTT_TX_DATA_START_X BIT(26) 100462306a36Sopenharmony_ci#define RX_LOCATION_INFO_HW_IFFT_MODE BIT(30) 100562306a36Sopenharmony_ci#define RX_LOCATION_INFO_RX_LOCATION_VALID BIT(31) 100662306a36Sopenharmony_ci 100762306a36Sopenharmony_cistruct rx_pkt_end { 100862306a36Sopenharmony_ci __le32 info0; /* %RX_PKT_END_INFO0_ */ 100962306a36Sopenharmony_ci __le32 phy_timestamp_1; 101062306a36Sopenharmony_ci __le32 phy_timestamp_2; 101162306a36Sopenharmony_ci} __packed; 101262306a36Sopenharmony_ci 101362306a36Sopenharmony_cistruct rx_pkt_end_wcn3990 { 101462306a36Sopenharmony_ci __le32 info0; /* %RX_PKT_END_INFO0_ */ 101562306a36Sopenharmony_ci __le64 phy_timestamp_1; 101662306a36Sopenharmony_ci __le64 phy_timestamp_2; 101762306a36Sopenharmony_ci} __packed; 101862306a36Sopenharmony_ci 101962306a36Sopenharmony_ci#define RX_LOCATION_INFO0_RTT_FAC_LEGACY_MASK 0x00003fff 102062306a36Sopenharmony_ci#define RX_LOCATION_INFO0_RTT_FAC_LEGACY_LSB 0 102162306a36Sopenharmony_ci#define RX_LOCATION_INFO0_RTT_FAC_VHT_MASK 0x1fff8000 102262306a36Sopenharmony_ci#define RX_LOCATION_INFO0_RTT_FAC_VHT_LSB 15 102362306a36Sopenharmony_ci#define RX_LOCATION_INFO0_RTT_STRONGEST_CHAIN_MASK 0xc0000000 102462306a36Sopenharmony_ci#define RX_LOCATION_INFO0_RTT_STRONGEST_CHAIN_LSB 30 102562306a36Sopenharmony_ci#define RX_LOCATION_INFO0_RTT_FAC_LEGACY_STATUS BIT(14) 102662306a36Sopenharmony_ci#define RX_LOCATION_INFO0_RTT_FAC_VHT_STATUS BIT(29) 102762306a36Sopenharmony_ci 102862306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_PREAMBLE_TYPE_MASK 0x0000000c 102962306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_PREAMBLE_TYPE_LSB 2 103062306a36Sopenharmony_ci#define RX_LOCATION_INFO1_PKT_BW_MASK 0x00000030 103162306a36Sopenharmony_ci#define RX_LOCATION_INFO1_PKT_BW_LSB 4 103262306a36Sopenharmony_ci#define RX_LOCATION_INFO1_SKIP_P_SKIP_BTCF_MASK 0x0000ff00 103362306a36Sopenharmony_ci#define RX_LOCATION_INFO1_SKIP_P_SKIP_BTCF_LSB 8 103462306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_MSC_RATE_MASK 0x000f0000 103562306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_MSC_RATE_LSB 16 103662306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_PBD_LEG_BW_MASK 0x00300000 103762306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_PBD_LEG_BW_LSB 20 103862306a36Sopenharmony_ci#define RX_LOCATION_INFO1_TIMING_BACKOFF_MASK 0x07c00000 103962306a36Sopenharmony_ci#define RX_LOCATION_INFO1_TIMING_BACKOFF_LSB 22 104062306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_TX_FRAME_PHASE_MASK 0x18000000 104162306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_TX_FRAME_PHASE_LSB 27 104262306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_CFR_STATUS BIT(0) 104362306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_CIR_STATUS BIT(1) 104462306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_GI_TYPE BIT(7) 104562306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_MAC_PHY_PHASE BIT(29) 104662306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RTT_TX_DATA_START_X_PHASE BIT(30) 104762306a36Sopenharmony_ci#define RX_LOCATION_INFO1_RX_LOCATION_VALID BIT(31) 104862306a36Sopenharmony_ci 104962306a36Sopenharmony_cistruct rx_location_info { 105062306a36Sopenharmony_ci __le32 rx_location_info0; /* %RX_LOCATION_INFO0_ */ 105162306a36Sopenharmony_ci __le32 rx_location_info1; /* %RX_LOCATION_INFO1_ */ 105262306a36Sopenharmony_ci} __packed; 105362306a36Sopenharmony_ci 105462306a36Sopenharmony_cistruct rx_location_info_wcn3990 { 105562306a36Sopenharmony_ci __le32 rx_location_info0; /* %RX_LOCATION_INFO0_ */ 105662306a36Sopenharmony_ci __le32 rx_location_info1; /* %RX_LOCATION_INFO1_ */ 105762306a36Sopenharmony_ci __le32 rx_location_info2; /* %RX_LOCATION_INFO2_ */ 105862306a36Sopenharmony_ci} __packed; 105962306a36Sopenharmony_ci 106062306a36Sopenharmony_cienum rx_phy_ppdu_end_info0 { 106162306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_RADAR = BIT(2), 106262306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_RX_ABORT = BIT(3), 106362306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_RX_NAP = BIT(4), 106462306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_OFDM_TIMING = BIT(5), 106562306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_OFDM_PARITY = BIT(6), 106662306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_OFDM_RATE = BIT(7), 106762306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_OFDM_LENGTH = BIT(8), 106862306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_OFDM_RESTART = BIT(9), 106962306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_OFDM_SERVICE = BIT(10), 107062306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_OFDM_POWER_DROP = BIT(11), 107162306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_CCK_BLOCKER = BIT(12), 107262306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_CCK_TIMING = BIT(13), 107362306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_CCK_HEADER_CRC = BIT(14), 107462306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_CCK_RATE = BIT(15), 107562306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_CCK_LENGTH = BIT(16), 107662306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_CCK_RESTART = BIT(17), 107762306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_CCK_SERVICE = BIT(18), 107862306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_CCK_POWER_DROP = BIT(19), 107962306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_HT_CRC = BIT(20), 108062306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_HT_LENGTH = BIT(21), 108162306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_HT_RATE = BIT(22), 108262306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_HT_ZLF = BIT(23), 108362306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_FALSE_RADAR_EXT = BIT(24), 108462306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_GREEN_FIELD = BIT(25), 108562306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_SPECTRAL_SCAN = BIT(26), 108662306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_RX_DYN_BW = BIT(27), 108762306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_LEG_HT_MISMATCH = BIT(28), 108862306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_VHT_CRC = BIT(29), 108962306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_VHT_SIGA = BIT(30), 109062306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO0_ERR_VHT_LSIG = BIT(31), 109162306a36Sopenharmony_ci}; 109262306a36Sopenharmony_ci 109362306a36Sopenharmony_cienum rx_phy_ppdu_end_info1 { 109462306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_VHT_NDP = BIT(0), 109562306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_VHT_NSYM = BIT(1), 109662306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_VHT_RX_EXT_SYM = BIT(2), 109762306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_VHT_RX_SKIP_ID0 = BIT(3), 109862306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_VHT_RX_SKIP_ID1_62 = BIT(4), 109962306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_VHT_RX_SKIP_ID63 = BIT(5), 110062306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_OFDM_LDPC_DECODER = BIT(6), 110162306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_DEFER_NAP = BIT(7), 110262306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_FDOMAIN_TIMEOUT = BIT(8), 110362306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_LSIG_REL_CHECK = BIT(9), 110462306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_BT_COLLISION = BIT(10), 110562306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_MU_FEEDBACK = BIT(11), 110662306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_TX_INTERRUPT_RX = BIT(12), 110762306a36Sopenharmony_ci RX_PHY_PPDU_END_INFO1_ERR_RX_CBF = BIT(13), 110862306a36Sopenharmony_ci}; 110962306a36Sopenharmony_ci 111062306a36Sopenharmony_cistruct rx_phy_ppdu_end { 111162306a36Sopenharmony_ci __le32 info0; /* %RX_PHY_PPDU_END_INFO0_ */ 111262306a36Sopenharmony_ci __le32 info1; /* %RX_PHY_PPDU_END_INFO1_ */ 111362306a36Sopenharmony_ci} __packed; 111462306a36Sopenharmony_ci 111562306a36Sopenharmony_ci#define RX_PPDU_END_RX_TIMING_OFFSET_MASK 0x00000fff 111662306a36Sopenharmony_ci#define RX_PPDU_END_RX_TIMING_OFFSET_LSB 0 111762306a36Sopenharmony_ci 111862306a36Sopenharmony_ci#define RX_PPDU_END_RX_INFO_RX_ANTENNA_MASK 0x00ffffff 111962306a36Sopenharmony_ci#define RX_PPDU_END_RX_INFO_RX_ANTENNA_LSB 0 112062306a36Sopenharmony_ci#define RX_PPDU_END_RX_INFO_TX_HT_VHT_ACK BIT(24) 112162306a36Sopenharmony_ci#define RX_PPDU_END_RX_INFO_RX_PKT_END_VALID BIT(25) 112262306a36Sopenharmony_ci#define RX_PPDU_END_RX_INFO_RX_PHY_PPDU_END_VALID BIT(26) 112362306a36Sopenharmony_ci#define RX_PPDU_END_RX_INFO_RX_TIMING_OFFSET_VALID BIT(27) 112462306a36Sopenharmony_ci#define RX_PPDU_END_RX_INFO_BB_CAPTURED_CHANNEL BIT(28) 112562306a36Sopenharmony_ci#define RX_PPDU_END_RX_INFO_UNSUPPORTED_MU_NC BIT(29) 112662306a36Sopenharmony_ci#define RX_PPDU_END_RX_INFO_OTP_TXBF_DISABLE BIT(30) 112762306a36Sopenharmony_ci 112862306a36Sopenharmony_cistruct rx_ppdu_end_qca99x0 { 112962306a36Sopenharmony_ci struct rx_pkt_end rx_pkt_end; 113062306a36Sopenharmony_ci __le32 rx_location_info; /* %RX_LOCATION_INFO_ */ 113162306a36Sopenharmony_ci struct rx_phy_ppdu_end rx_phy_ppdu_end; 113262306a36Sopenharmony_ci __le32 rx_timing_offset; /* %RX_PPDU_END_RX_TIMING_OFFSET_ */ 113362306a36Sopenharmony_ci __le32 rx_info; /* %RX_PPDU_END_RX_INFO_ */ 113462306a36Sopenharmony_ci __le16 bb_length; 113562306a36Sopenharmony_ci __le16 info1; /* %RX_PPDU_END_INFO1_ */ 113662306a36Sopenharmony_ci} __packed; 113762306a36Sopenharmony_ci 113862306a36Sopenharmony_cistruct rx_ppdu_end_qca9984 { 113962306a36Sopenharmony_ci struct rx_pkt_end rx_pkt_end; 114062306a36Sopenharmony_ci struct rx_location_info rx_location_info; 114162306a36Sopenharmony_ci struct rx_phy_ppdu_end rx_phy_ppdu_end; 114262306a36Sopenharmony_ci __le32 rx_timing_offset; /* %RX_PPDU_END_RX_TIMING_OFFSET_ */ 114362306a36Sopenharmony_ci __le32 rx_info; /* %RX_PPDU_END_RX_INFO_ */ 114462306a36Sopenharmony_ci __le16 bb_length; 114562306a36Sopenharmony_ci __le16 info1; /* %RX_PPDU_END_INFO1_ */ 114662306a36Sopenharmony_ci} __packed; 114762306a36Sopenharmony_ci 114862306a36Sopenharmony_cistruct rx_ppdu_end_wcn3990 { 114962306a36Sopenharmony_ci struct rx_pkt_end_wcn3990 rx_pkt_end; 115062306a36Sopenharmony_ci struct rx_location_info_wcn3990 rx_location_info; 115162306a36Sopenharmony_ci struct rx_phy_ppdu_end rx_phy_ppdu_end; 115262306a36Sopenharmony_ci __le32 rx_timing_offset; 115362306a36Sopenharmony_ci __le32 reserved_info_0; 115462306a36Sopenharmony_ci __le32 reserved_info_1; 115562306a36Sopenharmony_ci __le32 rx_antenna_info; 115662306a36Sopenharmony_ci __le32 rx_coex_info; 115762306a36Sopenharmony_ci __le32 rx_mpdu_cnt_info; 115862306a36Sopenharmony_ci __le64 phy_timestamp_tx; 115962306a36Sopenharmony_ci __le32 rx_bb_length; 116062306a36Sopenharmony_ci} __packed; 116162306a36Sopenharmony_ci 116262306a36Sopenharmony_cistruct rx_ppdu_end { 116362306a36Sopenharmony_ci struct rx_ppdu_end_common common; 116462306a36Sopenharmony_ci union { 116562306a36Sopenharmony_ci struct rx_ppdu_end_wcn3990 wcn3990; 116662306a36Sopenharmony_ci } __packed; 116762306a36Sopenharmony_ci} __packed; 116862306a36Sopenharmony_ci 116962306a36Sopenharmony_cistruct rx_ppdu_end_v1 { 117062306a36Sopenharmony_ci struct rx_ppdu_end_common common; 117162306a36Sopenharmony_ci union { 117262306a36Sopenharmony_ci struct rx_ppdu_end_qca988x qca988x; 117362306a36Sopenharmony_ci struct rx_ppdu_end_qca6174 qca6174; 117462306a36Sopenharmony_ci struct rx_ppdu_end_qca99x0 qca99x0; 117562306a36Sopenharmony_ci struct rx_ppdu_end_qca9984 qca9984; 117662306a36Sopenharmony_ci } __packed; 117762306a36Sopenharmony_ci} __packed; 117862306a36Sopenharmony_ci 117962306a36Sopenharmony_ci/* 118062306a36Sopenharmony_ci * evm_p0 118162306a36Sopenharmony_ci * EVM for pilot 0. Contain EVM for streams: 0, 1, 2 and 3. 118262306a36Sopenharmony_ci * 118362306a36Sopenharmony_ci * evm_p1 118462306a36Sopenharmony_ci * EVM for pilot 1. Contain EVM for streams: 0, 1, 2 and 3. 118562306a36Sopenharmony_ci * 118662306a36Sopenharmony_ci * evm_p2 118762306a36Sopenharmony_ci * EVM for pilot 2. Contain EVM for streams: 0, 1, 2 and 3. 118862306a36Sopenharmony_ci * 118962306a36Sopenharmony_ci * evm_p3 119062306a36Sopenharmony_ci * EVM for pilot 3. Contain EVM for streams: 0, 1, 2 and 3. 119162306a36Sopenharmony_ci * 119262306a36Sopenharmony_ci * evm_p4 119362306a36Sopenharmony_ci * EVM for pilot 4. Contain EVM for streams: 0, 1, 2 and 3. 119462306a36Sopenharmony_ci * 119562306a36Sopenharmony_ci * evm_p5 119662306a36Sopenharmony_ci * EVM for pilot 5. Contain EVM for streams: 0, 1, 2 and 3. 119762306a36Sopenharmony_ci * 119862306a36Sopenharmony_ci * evm_p6 119962306a36Sopenharmony_ci * EVM for pilot 6. Contain EVM for streams: 0, 1, 2 and 3. 120062306a36Sopenharmony_ci * 120162306a36Sopenharmony_ci * evm_p7 120262306a36Sopenharmony_ci * EVM for pilot 7. Contain EVM for streams: 0, 1, 2 and 3. 120362306a36Sopenharmony_ci * 120462306a36Sopenharmony_ci * evm_p8 120562306a36Sopenharmony_ci * EVM for pilot 8. Contain EVM for streams: 0, 1, 2 and 3. 120662306a36Sopenharmony_ci * 120762306a36Sopenharmony_ci * evm_p9 120862306a36Sopenharmony_ci * EVM for pilot 9. Contain EVM for streams: 0, 1, 2 and 3. 120962306a36Sopenharmony_ci * 121062306a36Sopenharmony_ci * evm_p10 121162306a36Sopenharmony_ci * EVM for pilot 10. Contain EVM for streams: 0, 1, 2 and 3. 121262306a36Sopenharmony_ci * 121362306a36Sopenharmony_ci * evm_p11 121462306a36Sopenharmony_ci * EVM for pilot 11. Contain EVM for streams: 0, 1, 2 and 3. 121562306a36Sopenharmony_ci * 121662306a36Sopenharmony_ci * evm_p12 121762306a36Sopenharmony_ci * EVM for pilot 12. Contain EVM for streams: 0, 1, 2 and 3. 121862306a36Sopenharmony_ci * 121962306a36Sopenharmony_ci * evm_p13 122062306a36Sopenharmony_ci * EVM for pilot 13. Contain EVM for streams: 0, 1, 2 and 3. 122162306a36Sopenharmony_ci * 122262306a36Sopenharmony_ci * evm_p14 122362306a36Sopenharmony_ci * EVM for pilot 14. Contain EVM for streams: 0, 1, 2 and 3. 122462306a36Sopenharmony_ci * 122562306a36Sopenharmony_ci * evm_p15 122662306a36Sopenharmony_ci * EVM for pilot 15. Contain EVM for streams: 0, 1, 2 and 3. 122762306a36Sopenharmony_ci * 122862306a36Sopenharmony_ci * tsf_timestamp 122962306a36Sopenharmony_ci * Receive TSF timestamp sampled on the rising edge of 123062306a36Sopenharmony_ci * rx_clear. For PHY errors this may be the current TSF when 123162306a36Sopenharmony_ci * phy_error is asserted if the rx_clear does not assert before 123262306a36Sopenharmony_ci * the end of the PHY error. 123362306a36Sopenharmony_ci * 123462306a36Sopenharmony_ci * wb_timestamp 123562306a36Sopenharmony_ci * WLAN/BT timestamp is a 1 usec resolution timestamp which 123662306a36Sopenharmony_ci * does not get updated based on receive beacon like TSF. The 123762306a36Sopenharmony_ci * same rules for capturing tsf_timestamp are used to capture 123862306a36Sopenharmony_ci * the wb_timestamp. 123962306a36Sopenharmony_ci * 124062306a36Sopenharmony_ci * locationing_timestamp 124162306a36Sopenharmony_ci * Timestamp used for locationing. This timestamp is used to 124262306a36Sopenharmony_ci * indicate fractions of usec. For example if the MAC clock is 124362306a36Sopenharmony_ci * running at 80 MHz, the timestamp will increment every 12.5 124462306a36Sopenharmony_ci * nsec. The value starts at 0 and increments to 79 and 124562306a36Sopenharmony_ci * returns to 0 and repeats. This information is valid for 124662306a36Sopenharmony_ci * every PPDU. This information can be used in conjunction 124762306a36Sopenharmony_ci * with wb_timestamp to capture large delta times. 124862306a36Sopenharmony_ci * 124962306a36Sopenharmony_ci * phy_err_code 125062306a36Sopenharmony_ci * See the 1.10.8.1.2 for the list of the PHY error codes. 125162306a36Sopenharmony_ci * 125262306a36Sopenharmony_ci * phy_err 125362306a36Sopenharmony_ci * Indicates a PHY error was detected for this PPDU. 125462306a36Sopenharmony_ci * 125562306a36Sopenharmony_ci * rx_location 125662306a36Sopenharmony_ci * Indicates that location information was requested. 125762306a36Sopenharmony_ci * 125862306a36Sopenharmony_ci * txbf_h_info 125962306a36Sopenharmony_ci * Indicates that the packet data carries H information which 126062306a36Sopenharmony_ci * is used for TxBF debug. 126162306a36Sopenharmony_ci * 126262306a36Sopenharmony_ci * reserved_18 126362306a36Sopenharmony_ci * Reserved: HW should fill with 0, FW should ignore. 126462306a36Sopenharmony_ci * 126562306a36Sopenharmony_ci * rx_antenna 126662306a36Sopenharmony_ci * Receive antenna value 126762306a36Sopenharmony_ci * 126862306a36Sopenharmony_ci * tx_ht_vht_ack 126962306a36Sopenharmony_ci * Indicates that a HT or VHT Ack/BA frame was transmitted in 127062306a36Sopenharmony_ci * response to this receive packet. 127162306a36Sopenharmony_ci * 127262306a36Sopenharmony_ci * bb_captured_channel 127362306a36Sopenharmony_ci * Indicates that the BB has captured a channel dump. FW can 127462306a36Sopenharmony_ci * then read the channel dump memory. This may indicate that 127562306a36Sopenharmony_ci * the channel was captured either based on PCU setting the 127662306a36Sopenharmony_ci * capture_channel bit BB descriptor or FW setting the 127762306a36Sopenharmony_ci * capture_channel mode bit. 127862306a36Sopenharmony_ci * 127962306a36Sopenharmony_ci * reserved_19 128062306a36Sopenharmony_ci * Reserved: HW should fill with 0, FW should ignore. 128162306a36Sopenharmony_ci * 128262306a36Sopenharmony_ci * bb_length 128362306a36Sopenharmony_ci * Indicates the number of bytes of baseband information for 128462306a36Sopenharmony_ci * PPDUs where the BB descriptor preamble type is 0x80 to 0xFF 128562306a36Sopenharmony_ci * which indicates that this is not a normal PPDU but rather 128662306a36Sopenharmony_ci * contains baseband debug information. 128762306a36Sopenharmony_ci * 128862306a36Sopenharmony_ci * reserved_20 128962306a36Sopenharmony_ci * Reserved: HW should fill with 0, FW should ignore. 129062306a36Sopenharmony_ci * 129162306a36Sopenharmony_ci * ppdu_done 129262306a36Sopenharmony_ci * PPDU end status is only valid when ppdu_done bit is set. 129362306a36Sopenharmony_ci * Every time HW sets this bit in memory FW/SW must clear this 129462306a36Sopenharmony_ci * bit in memory. FW will initialize all the ppdu_done dword 129562306a36Sopenharmony_ci * to 0. 129662306a36Sopenharmony_ci */ 129762306a36Sopenharmony_ci 129862306a36Sopenharmony_ci#define FW_RX_DESC_INFO0_DISCARD BIT(0) 129962306a36Sopenharmony_ci#define FW_RX_DESC_INFO0_FORWARD BIT(1) 130062306a36Sopenharmony_ci#define FW_RX_DESC_INFO0_INSPECT BIT(5) 130162306a36Sopenharmony_ci#define FW_RX_DESC_INFO0_EXT_MASK 0xC0 130262306a36Sopenharmony_ci#define FW_RX_DESC_INFO0_EXT_LSB 6 130362306a36Sopenharmony_ci 130462306a36Sopenharmony_cistruct fw_rx_desc_base { 130562306a36Sopenharmony_ci u8 info0; 130662306a36Sopenharmony_ci} __packed; 130762306a36Sopenharmony_ci 130862306a36Sopenharmony_ci#define FW_RX_DESC_FLAGS_FIRST_MSDU (1 << 0) 130962306a36Sopenharmony_ci#define FW_RX_DESC_FLAGS_LAST_MSDU (1 << 1) 131062306a36Sopenharmony_ci#define FW_RX_DESC_C3_FAILED (1 << 2) 131162306a36Sopenharmony_ci#define FW_RX_DESC_C4_FAILED (1 << 3) 131262306a36Sopenharmony_ci#define FW_RX_DESC_IPV6 (1 << 4) 131362306a36Sopenharmony_ci#define FW_RX_DESC_TCP (1 << 5) 131462306a36Sopenharmony_ci#define FW_RX_DESC_UDP (1 << 6) 131562306a36Sopenharmony_ci 131662306a36Sopenharmony_cistruct fw_rx_desc_hl { 131762306a36Sopenharmony_ci union { 131862306a36Sopenharmony_ci struct { 131962306a36Sopenharmony_ci u8 discard:1, 132062306a36Sopenharmony_ci forward:1, 132162306a36Sopenharmony_ci any_err:1, 132262306a36Sopenharmony_ci dup_err:1, 132362306a36Sopenharmony_ci reserved:1, 132462306a36Sopenharmony_ci inspect:1, 132562306a36Sopenharmony_ci extension:2; 132662306a36Sopenharmony_ci } bits; 132762306a36Sopenharmony_ci u8 info0; 132862306a36Sopenharmony_ci } u; 132962306a36Sopenharmony_ci 133062306a36Sopenharmony_ci u8 version; 133162306a36Sopenharmony_ci u8 len; 133262306a36Sopenharmony_ci u8 flags; 133362306a36Sopenharmony_ci} __packed; 133462306a36Sopenharmony_ci 133562306a36Sopenharmony_ci#endif /* _RX_DESC_H_ */ 1336