Path: blob/main/sys/contrib/dev/athk/ath10k/rx_desc.h
108091 views
/* SPDX-License-Identifier: ISC */1/*2* Copyright (c) 2005-2011 Atheros Communications Inc.3* Copyright (c) 2011-2017 Qualcomm Atheros, Inc.4* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.5*/67#ifndef _RX_DESC_H_8#define _RX_DESC_H_910#include <linux/bitops.h>1112enum rx_attention_flags {13RX_ATTENTION_FLAGS_FIRST_MPDU = BIT(0),14RX_ATTENTION_FLAGS_LAST_MPDU = BIT(1),15RX_ATTENTION_FLAGS_MCAST_BCAST = BIT(2),16RX_ATTENTION_FLAGS_PEER_IDX_INVALID = BIT(3),17RX_ATTENTION_FLAGS_PEER_IDX_TIMEOUT = BIT(4),18RX_ATTENTION_FLAGS_POWER_MGMT = BIT(5),19RX_ATTENTION_FLAGS_NON_QOS = BIT(6),20RX_ATTENTION_FLAGS_NULL_DATA = BIT(7),21RX_ATTENTION_FLAGS_MGMT_TYPE = BIT(8),22RX_ATTENTION_FLAGS_CTRL_TYPE = BIT(9),23RX_ATTENTION_FLAGS_MORE_DATA = BIT(10),24RX_ATTENTION_FLAGS_EOSP = BIT(11),25RX_ATTENTION_FLAGS_U_APSD_TRIGGER = BIT(12),26RX_ATTENTION_FLAGS_FRAGMENT = BIT(13),27RX_ATTENTION_FLAGS_ORDER = BIT(14),28RX_ATTENTION_FLAGS_CLASSIFICATION = BIT(15),29RX_ATTENTION_FLAGS_OVERFLOW_ERR = BIT(16),30RX_ATTENTION_FLAGS_MSDU_LENGTH_ERR = BIT(17),31RX_ATTENTION_FLAGS_TCP_UDP_CHKSUM_FAIL = BIT(18),32RX_ATTENTION_FLAGS_IP_CHKSUM_FAIL = BIT(19),33RX_ATTENTION_FLAGS_SA_IDX_INVALID = BIT(20),34RX_ATTENTION_FLAGS_DA_IDX_INVALID = BIT(21),35RX_ATTENTION_FLAGS_SA_IDX_TIMEOUT = BIT(22),36RX_ATTENTION_FLAGS_DA_IDX_TIMEOUT = BIT(23),37RX_ATTENTION_FLAGS_ENCRYPT_REQUIRED = BIT(24),38RX_ATTENTION_FLAGS_DIRECTED = BIT(25),39RX_ATTENTION_FLAGS_BUFFER_FRAGMENT = BIT(26),40RX_ATTENTION_FLAGS_MPDU_LENGTH_ERR = BIT(27),41RX_ATTENTION_FLAGS_TKIP_MIC_ERR = BIT(28),42RX_ATTENTION_FLAGS_DECRYPT_ERR = BIT(29),43RX_ATTENTION_FLAGS_FCS_ERR = BIT(30),44RX_ATTENTION_FLAGS_MSDU_DONE = BIT(31),45};4647struct rx_attention {48__le32 flags; /* %RX_ATTENTION_FLAGS_ */49} __packed;5051/*52* first_mpdu53* Indicates the first MSDU of the PPDU. If both first_mpdu54* and last_mpdu are set in the MSDU then this is a not an55* A-MPDU frame but a stand alone MPDU. Interior MPDU in an56* A-MPDU shall have both first_mpdu and last_mpdu bits set to57* 0. The PPDU start status will only be valid when this bit58* is set.59*60* last_mpdu61* Indicates the last MSDU of the last MPDU of the PPDU. The62* PPDU end status will only be valid when this bit is set.63*64* mcast_bcast65* Multicast / broadcast indicator. Only set when the MAC66* address 1 bit 0 is set indicating mcast/bcast and the BSSID67* matches one of the 4 BSSID registers. Only set when68* first_msdu is set.69*70* peer_idx_invalid71* Indicates no matching entries within the max search72* count. Only set when first_msdu is set.73*74* peer_idx_timeout75* Indicates an unsuccessful search for the peer index due to76* timeout. Only set when first_msdu is set.77*78* power_mgmt79* Power management bit set in the 802.11 header. Only set80* when first_msdu is set.81*82* non_qos83* Set if packet is not a non-QoS data frame. Only set when84* first_msdu is set.85*86* null_data87* Set if frame type indicates either null data or QoS null88* data format. Only set when first_msdu is set.89*90* mgmt_type91* Set if packet is a management packet. Only set when92* first_msdu is set.93*94* ctrl_type95* Set if packet is a control packet. Only set when first_msdu96* is set.97*98* more_data99* Set if more bit in frame control is set. Only set when100* first_msdu is set.101*102* eosp103* Set if the EOSP (end of service period) bit in the QoS104* control field is set. Only set when first_msdu is set.105*106* u_apsd_trigger107* Set if packet is U-APSD trigger. Key table will have bits108* per TID to indicate U-APSD trigger.109*110* fragment111* Indicates that this is an 802.11 fragment frame. This is112* set when either the more_frag bit is set in the frame113* control or the fragment number is not zero. Only set when114* first_msdu is set.115*116* order117* Set if the order bit in the frame control is set. Only set118* when first_msdu is set.119*120* classification121* Indicates that this status has a corresponding MSDU that122* requires FW processing. The OLE will have classification123* ring mask registers which will indicate the ring(s) for124* packets and descriptors which need FW attention.125*126* overflow_err127* PCU Receive FIFO does not have enough space to store the128* full receive packet. Enough space is reserved in the129* receive FIFO for the status is written. This MPDU remaining130* packets in the PPDU will be filtered and no Ack response131* will be transmitted.132*133* msdu_length_err134* Indicates that the MSDU length from the 802.3 encapsulated135* length field extends beyond the MPDU boundary.136*137* tcp_udp_chksum_fail138* Indicates that the computed checksum (tcp_udp_chksum) did139* not match the checksum in the TCP/UDP header.140*141* ip_chksum_fail142* Indicates that the computed checksum did not match the143* checksum in the IP header.144*145* sa_idx_invalid146* Indicates no matching entry was found in the address search147* table for the source MAC address.148*149* da_idx_invalid150* Indicates no matching entry was found in the address search151* table for the destination MAC address.152*153* sa_idx_timeout154* Indicates an unsuccessful search for the source MAC address155* due to the expiring of the search timer.156*157* da_idx_timeout158* Indicates an unsuccessful search for the destination MAC159* address due to the expiring of the search timer.160*161* encrypt_required162* Indicates that this data type frame is not encrypted even if163* the policy for this MPDU requires encryption as indicated in164* the peer table key type.165*166* directed167* MPDU is a directed packet which means that the RA matched168* our STA addresses. In proxySTA it means that the TA matched169* an entry in our address search table with the corresponding170* 'no_ack' bit is the address search entry cleared.171*172* buffer_fragment173* Indicates that at least one of the rx buffers has been174* fragmented. If set the FW should look at the rx_frag_info175* descriptor described below.176*177* mpdu_length_err178* Indicates that the MPDU was pre-maturely terminated179* resulting in a truncated MPDU. Don't trust the MPDU length180* field.181*182* tkip_mic_err183* Indicates that the MPDU Michael integrity check failed184*185* decrypt_err186* Indicates that the MPDU decrypt integrity check failed187*188* fcs_err189* Indicates that the MPDU FCS check failed190*191* msdu_done192* If set indicates that the RX packet data, RX header data, RX193* PPDU start descriptor, RX MPDU start/end descriptor, RX MSDU194* start/end descriptors and RX Attention descriptor are all195* valid. This bit must be in the last octet of the196* descriptor.197*/198199struct rx_frag_info_common {200u8 ring0_more_count;201u8 ring1_more_count;202u8 ring2_more_count;203u8 ring3_more_count;204} __packed;205206struct rx_frag_info_wcn3990 {207u8 ring4_more_count;208u8 ring5_more_count;209u8 ring6_more_count;210u8 ring7_more_count;211} __packed;212213struct rx_frag_info {214struct rx_frag_info_common common;215union {216struct rx_frag_info_wcn3990 wcn3990;217} __packed;218} __packed;219220struct rx_frag_info_v1 {221struct rx_frag_info_common common;222} __packed;223224/*225* ring0_more_count226* Indicates the number of more buffers associated with RX DMA227* ring 0. Field is filled in by the RX_DMA.228*229* ring1_more_count230* Indicates the number of more buffers associated with RX DMA231* ring 1. Field is filled in by the RX_DMA.232*233* ring2_more_count234* Indicates the number of more buffers associated with RX DMA235* ring 2. Field is filled in by the RX_DMA.236*237* ring3_more_count238* Indicates the number of more buffers associated with RX DMA239* ring 3. Field is filled in by the RX_DMA.240*/241242enum htt_rx_mpdu_encrypt_type {243HTT_RX_MPDU_ENCRYPT_WEP40 = 0,244HTT_RX_MPDU_ENCRYPT_WEP104 = 1,245HTT_RX_MPDU_ENCRYPT_TKIP_WITHOUT_MIC = 2,246HTT_RX_MPDU_ENCRYPT_WEP128 = 3,247HTT_RX_MPDU_ENCRYPT_TKIP_WPA = 4,248HTT_RX_MPDU_ENCRYPT_WAPI = 5,249HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2 = 6,250HTT_RX_MPDU_ENCRYPT_NONE = 7,251HTT_RX_MPDU_ENCRYPT_AES_CCM256_WPA2 = 8,252HTT_RX_MPDU_ENCRYPT_AES_GCMP_WPA2 = 9,253HTT_RX_MPDU_ENCRYPT_AES_GCMP256_WPA2 = 10,254};255256#define RX_MPDU_START_INFO0_PEER_IDX_MASK 0x000007ff257#define RX_MPDU_START_INFO0_PEER_IDX_LSB 0258#define RX_MPDU_START_INFO0_SEQ_NUM_MASK 0x0fff0000259#define RX_MPDU_START_INFO0_SEQ_NUM_LSB 16260#define RX_MPDU_START_INFO0_ENCRYPT_TYPE_MASK 0xf0000000261#define RX_MPDU_START_INFO0_ENCRYPT_TYPE_LSB 28262#define RX_MPDU_START_INFO0_FROM_DS BIT(11)263#define RX_MPDU_START_INFO0_TO_DS BIT(12)264#define RX_MPDU_START_INFO0_ENCRYPTED BIT(13)265#define RX_MPDU_START_INFO0_RETRY BIT(14)266#define RX_MPDU_START_INFO0_TXBF_H_INFO BIT(15)267268#define RX_MPDU_START_INFO1_TID_MASK 0xf0000000269#define RX_MPDU_START_INFO1_TID_LSB 28270#define RX_MPDU_START_INFO1_DIRECTED BIT(16)271272struct rx_mpdu_start {273__le32 info0;274union {275struct {276__le32 pn31_0;277__le32 info1; /* %RX_MPDU_START_INFO1_ */278} __packed;279struct {280u8 pn[6];281} __packed;282} __packed;283} __packed;284285/*286* peer_idx287* The index of the address search table which associated with288* the peer table entry corresponding to this MPDU. Only valid289* when first_msdu is set.290*291* fr_ds292* Set if the from DS bit is set in the frame control. Only293* valid when first_msdu is set.294*295* to_ds296* Set if the to DS bit is set in the frame control. Only297* valid when first_msdu is set.298*299* encrypted300* Protected bit from the frame control. Only valid when301* first_msdu is set.302*303* retry304* Retry bit from the frame control. Only valid when305* first_msdu is set.306*307* txbf_h_info308* The MPDU data will contain H information. Primarily used309* for debug.310*311* seq_num312* The sequence number from the 802.11 header. Only valid when313* first_msdu is set.314*315* encrypt_type316* Indicates type of decrypt cipher used (as defined in the317* peer table)318* 0: WEP40319* 1: WEP104320* 2: TKIP without MIC321* 3: WEP128322* 4: TKIP (WPA)323* 5: WAPI324* 6: AES-CCM (WPA2)325* 7: No cipher326* Only valid when first_msdu_is set327*328* pn_31_0329* Bits [31:0] of the PN number extracted from the IV field330* WEP: IV = {key_id_octet, pn2, pn1, pn0}. Only pn[23:0] is331* valid.332* TKIP: IV = {pn5, pn4, pn3, pn2, key_id_octet, pn0,333* WEPSeed[1], pn1}. Only pn[47:0] is valid.334* AES-CCM: IV = {pn5, pn4, pn3, pn2, key_id_octet, 0x0, pn1,335* pn0}. Only pn[47:0] is valid.336* WAPI: IV = {key_id_octet, 0x0, pn15, pn14, pn13, pn12, pn11,337* pn10, pn9, pn8, pn7, pn6, pn5, pn4, pn3, pn2, pn1, pn0}.338* The ext_wapi_pn[127:48] in the rx_msdu_misc descriptor and339* pn[47:0] are valid.340* Only valid when first_msdu is set.341*342* pn_47_32343* Bits [47:32] of the PN number. See description for344* pn_31_0. The remaining PN fields are in the rx_msdu_end345* descriptor346*347* pn348* Use this field to access the pn without worrying about349* byte-order and bitmasking/bitshifting.350*351* directed352* See definition in RX attention descriptor353*354* reserved_2355* Reserved: HW should fill with zero. FW should ignore.356*357* tid358* The TID field in the QoS control field359*/360361#define RX_MPDU_END_INFO0_RESERVED_0_MASK 0x00001fff362#define RX_MPDU_END_INFO0_RESERVED_0_LSB 0363#define RX_MPDU_END_INFO0_POST_DELIM_CNT_MASK 0x0fff0000364#define RX_MPDU_END_INFO0_POST_DELIM_CNT_LSB 16365#define RX_MPDU_END_INFO0_OVERFLOW_ERR BIT(13)366#define RX_MPDU_END_INFO0_LAST_MPDU BIT(14)367#define RX_MPDU_END_INFO0_POST_DELIM_ERR BIT(15)368#define RX_MPDU_END_INFO0_MPDU_LENGTH_ERR BIT(28)369#define RX_MPDU_END_INFO0_TKIP_MIC_ERR BIT(29)370#define RX_MPDU_END_INFO0_DECRYPT_ERR BIT(30)371#define RX_MPDU_END_INFO0_FCS_ERR BIT(31)372373struct rx_mpdu_end {374__le32 info0;375} __packed;376377/*378* reserved_0379* Reserved380*381* overflow_err382* PCU Receive FIFO does not have enough space to store the383* full receive packet. Enough space is reserved in the384* receive FIFO for the status is written. This MPDU remaining385* packets in the PPDU will be filtered and no Ack response386* will be transmitted.387*388* last_mpdu389* Indicates that this is the last MPDU of a PPDU.390*391* post_delim_err392* Indicates that a delimiter FCS error occurred after this393* MPDU before the next MPDU. Only valid when last_msdu is394* set.395*396* post_delim_cnt397* Count of the delimiters after this MPDU. This requires the398* last MPDU to be held until all the EOF descriptors have been399* received. This may be inefficient in the future when400* ML-MIMO is used. Only valid when last_mpdu is set.401*402* mpdu_length_err403* See definition in RX attention descriptor404*405* tkip_mic_err406* See definition in RX attention descriptor407*408* decrypt_err409* See definition in RX attention descriptor410*411* fcs_err412* See definition in RX attention descriptor413*/414415#define RX_MSDU_START_INFO0_MSDU_LENGTH_MASK 0x00003fff416#define RX_MSDU_START_INFO0_MSDU_LENGTH_LSB 0417#define RX_MSDU_START_INFO0_IP_OFFSET_MASK 0x000fc000418#define RX_MSDU_START_INFO0_IP_OFFSET_LSB 14419#define RX_MSDU_START_INFO0_RING_MASK_MASK 0x00f00000420#define RX_MSDU_START_INFO0_RING_MASK_LSB 20421#define RX_MSDU_START_INFO0_TCP_UDP_OFFSET_MASK 0x7f000000422#define RX_MSDU_START_INFO0_TCP_UDP_OFFSET_LSB 24423424#define RX_MSDU_START_INFO1_MSDU_NUMBER_MASK 0x000000ff425#define RX_MSDU_START_INFO1_MSDU_NUMBER_LSB 0426#define RX_MSDU_START_INFO1_DECAP_FORMAT_MASK 0x00000300427#define RX_MSDU_START_INFO1_DECAP_FORMAT_LSB 8428#define RX_MSDU_START_INFO1_SA_IDX_MASK 0x07ff0000429#define RX_MSDU_START_INFO1_SA_IDX_LSB 16430#define RX_MSDU_START_INFO1_IPV4_PROTO BIT(10)431#define RX_MSDU_START_INFO1_IPV6_PROTO BIT(11)432#define RX_MSDU_START_INFO1_TCP_PROTO BIT(12)433#define RX_MSDU_START_INFO1_UDP_PROTO BIT(13)434#define RX_MSDU_START_INFO1_IP_FRAG BIT(14)435#define RX_MSDU_START_INFO1_TCP_ONLY_ACK BIT(15)436437#define RX_MSDU_START_INFO2_DA_IDX_MASK 0x000007ff438#define RX_MSDU_START_INFO2_DA_IDX_LSB 0439#define RX_MSDU_START_INFO2_IP_PROTO_FIELD_MASK 0x00ff0000440#define RX_MSDU_START_INFO2_IP_PROTO_FIELD_LSB 16441#define RX_MSDU_START_INFO2_DA_BCAST_MCAST BIT(11)442443/* The decapped header (rx_hdr_status) contains the following:444* a) 802.11 header445* [padding to 4 bytes]446* b) HW crypto parameter447* - 0 bytes for no security448* - 4 bytes for WEP449* - 8 bytes for TKIP, AES450* [padding to 4 bytes]451* c) A-MSDU subframe header (14 bytes) if applicable452* d) LLC/SNAP (RFC1042, 8 bytes)453*454* In case of A-MSDU only first frame in sequence contains (a) and (b).455*/456enum rx_msdu_decap_format {457RX_MSDU_DECAP_RAW = 0,458459/* Note: QoS frames are reported as non-QoS. The rx_hdr_status in460* htt_rx_desc contains the original decapped 802.11 header.461*/462RX_MSDU_DECAP_NATIVE_WIFI = 1,463464/* Payload contains an ethernet header (struct ethhdr). */465RX_MSDU_DECAP_ETHERNET2_DIX = 2,466467/* Payload contains two 48-bit addresses and 2-byte length (14 bytes468* total), followed by an RFC1042 header (8 bytes).469*/470RX_MSDU_DECAP_8023_SNAP_LLC = 3471};472473struct rx_msdu_start_common {474__le32 info0; /* %RX_MSDU_START_INFO0_ */475__le32 flow_id_crc;476__le32 info1; /* %RX_MSDU_START_INFO1_ */477} __packed;478479struct rx_msdu_start_qca99x0 {480__le32 info2; /* %RX_MSDU_START_INFO2_ */481} __packed;482483struct rx_msdu_start_wcn3990 {484__le32 info2; /* %RX_MSDU_START_INFO2_ */485__le32 info3; /* %RX_MSDU_START_INFO3_ */486} __packed;487488struct rx_msdu_start {489struct rx_msdu_start_common common;490union {491struct rx_msdu_start_wcn3990 wcn3990;492} __packed;493} __packed;494495struct rx_msdu_start_v1 {496struct rx_msdu_start_common common;497union {498struct rx_msdu_start_qca99x0 qca99x0;499} __packed;500} __packed;501502/*503* msdu_length504* MSDU length in bytes after decapsulation. This field is505* still valid for MPDU frames without A-MSDU. It still506* represents MSDU length after decapsulation507*508* ip_offset509* Indicates the IP offset in bytes from the start of the510* packet after decapsulation. Only valid if ipv4_proto or511* ipv6_proto is set.512*513* ring_mask514* Indicates the destination RX rings for this MSDU.515*516* tcp_udp_offset517* Indicates the offset in bytes to the start of TCP or UDP518* header from the start of the IP header after decapsulation.519* Only valid if tcp_prot or udp_prot is set. The value 0520* indicates that the offset is longer than 127 bytes.521*522* reserved_0c523* Reserved: HW should fill with zero. FW should ignore.524*525* flow_id_crc526* The flow_id_crc runs CRC32 on the following information:527* IPv4 option: dest_addr[31:0], src_addr [31:0], {24'b0,528* protocol[7:0]}.529* IPv6 option: dest_addr[127:0], src_addr [127:0], {24'b0,530* next_header[7:0]}531* UDP case: sort_port[15:0], dest_port[15:0]532* TCP case: sort_port[15:0], dest_port[15:0],533* {header_length[3:0], 6'b0, flags[5:0], window_size[15:0]},534* {16'b0, urgent_ptr[15:0]}, all options except 32-bit535* timestamp.536*537* msdu_number538* Indicates the MSDU number within a MPDU. This value is539* reset to zero at the start of each MPDU. If the number of540* MSDU exceeds 255 this number will wrap using modulo 256.541*542* decap_format543* Indicates the format after decapsulation:544* 0: RAW: No decapsulation545* 1: Native WiFi546* 2: Ethernet 2 (DIX)547* 3: 802.3 (SNAP/LLC)548*549* ipv4_proto550* Set if L2 layer indicates IPv4 protocol.551*552* ipv6_proto553* Set if L2 layer indicates IPv6 protocol.554*555* tcp_proto556* Set if the ipv4_proto or ipv6_proto are set and the IP557* protocol indicates TCP.558*559* udp_proto560* Set if the ipv4_proto or ipv6_proto are set and the IP561* protocol indicates UDP.562*563* ip_frag564* Indicates that either the IP More frag bit is set or IP frag565* number is non-zero. If set indicates that this is a566* fragmented IP packet.567*568* tcp_only_ack569* Set if only the TCP Ack bit is set in the TCP flags and if570* the TCP payload is 0.571*572* sa_idx573* The offset in the address table which matches the MAC source574* address.575*576* reserved_2b577* Reserved: HW should fill with zero. FW should ignore.578*/579580#define RX_MSDU_END_INFO0_REPORTED_MPDU_LENGTH_MASK 0x00003fff581#define RX_MSDU_END_INFO0_REPORTED_MPDU_LENGTH_LSB 0582#define RX_MSDU_END_INFO0_FIRST_MSDU BIT(14)583#define RX_MSDU_END_INFO0_LAST_MSDU BIT(15)584#define RX_MSDU_END_INFO0_MSDU_LIMIT_ERR BIT(18)585#define RX_MSDU_END_INFO0_PRE_DELIM_ERR BIT(30)586#define RX_MSDU_END_INFO0_RESERVED_3B BIT(31)587588struct rx_msdu_end_common {589__le16 ip_hdr_cksum;590__le16 tcp_hdr_cksum;591u8 key_id_octet;592u8 classification_filter;593u8 wapi_pn[10];594__le32 info0;595} __packed;596597#define RX_MSDU_END_INFO1_TCP_FLAG_MASK 0x000001ff598#define RX_MSDU_END_INFO1_TCP_FLAG_LSB 0599#define RX_MSDU_END_INFO1_L3_HDR_PAD_MASK 0x00001c00600#define RX_MSDU_END_INFO1_L3_HDR_PAD_LSB 10601#define RX_MSDU_END_INFO1_WINDOW_SIZE_MASK 0xffff0000602#define RX_MSDU_END_INFO1_WINDOW_SIZE_LSB 16603#define RX_MSDU_END_INFO1_IRO_ELIGIBLE BIT(9)604605#define RX_MSDU_END_INFO2_DA_OFFSET_MASK 0x0000003f606#define RX_MSDU_END_INFO2_DA_OFFSET_LSB 0607#define RX_MSDU_END_INFO2_SA_OFFSET_MASK 0x00000fc0608#define RX_MSDU_END_INFO2_SA_OFFSET_LSB 6609#define RX_MSDU_END_INFO2_TYPE_OFFSET_MASK 0x0003f000610#define RX_MSDU_END_INFO2_TYPE_OFFSET_LSB 12611612struct rx_msdu_end_qca99x0 {613__le32 ipv6_crc;614__le32 tcp_seq_no;615__le32 tcp_ack_no;616__le32 info1;617__le32 info2;618} __packed;619620struct rx_msdu_end_wcn3990 {621__le32 ipv6_crc;622__le32 tcp_seq_no;623__le32 tcp_ack_no;624__le32 info1;625__le32 info2;626__le32 rule_indication_0;627__le32 rule_indication_1;628__le32 rule_indication_2;629__le32 rule_indication_3;630} __packed;631632struct rx_msdu_end {633struct rx_msdu_end_common common;634union {635struct rx_msdu_end_wcn3990 wcn3990;636} __packed;637} __packed;638639struct rx_msdu_end_v1 {640struct rx_msdu_end_common common;641union {642struct rx_msdu_end_qca99x0 qca99x0;643} __packed;644} __packed;645646/*647*ip_hdr_chksum648* This can include the IP header checksum or the pseudo header649* checksum used by TCP/UDP checksum.650*651*tcp_udp_chksum652* The value of the computed TCP/UDP checksum. A mode bit653* selects whether this checksum is the full checksum or the654* partial checksum which does not include the pseudo header.655*656*key_id_octet657* The key ID octet from the IV. Only valid when first_msdu is658* set.659*660*classification_filter661* Indicates the number classification filter rule662*663*ext_wapi_pn_63_48664* Extension PN (packet number) which is only used by WAPI.665* This corresponds to WAPI PN bits [63:48] (pn6 and pn7). The666* WAPI PN bits [63:0] are in the pn field of the rx_mpdu_start667* descriptor.668*669*ext_wapi_pn_95_64670* Extension PN (packet number) which is only used by WAPI.671* This corresponds to WAPI PN bits [95:64] (pn8, pn9, pn10 and672* pn11).673*674*ext_wapi_pn_127_96675* Extension PN (packet number) which is only used by WAPI.676* This corresponds to WAPI PN bits [127:96] (pn12, pn13, pn14,677* pn15).678*679*reported_mpdu_length680* MPDU length before decapsulation. Only valid when681* first_msdu is set. This field is taken directly from the682* length field of the A-MPDU delimiter or the preamble length683* field for non-A-MPDU frames.684*685*first_msdu686* Indicates the first MSDU of A-MSDU. If both first_msdu and687* last_msdu are set in the MSDU then this is a non-aggregated688* MSDU frame: normal MPDU. Interior MSDU in an A-MSDU shall689* have both first_mpdu and last_mpdu bits set to 0.690*691*last_msdu692* Indicates the last MSDU of the A-MSDU. MPDU end status is693* only valid when last_msdu is set.694*695*msdu_limit_error696* Indicates that the MSDU threshold was exceeded and thus697* all the rest of the MSDUs will not be scattered and698* will not be decapsulated but will be received in RAW format699* as a single MSDU buffer.700*701*reserved_3a702* Reserved: HW should fill with zero. FW should ignore.703*704*pre_delim_err705* Indicates that the first delimiter had a FCS failure. Only706* valid when first_mpdu and first_msdu are set.707*708*reserved_3b709* Reserved: HW should fill with zero. FW should ignore.710*/711712#define HTT_RX_PPDU_START_PREAMBLE_LEGACY 0x04713#define HTT_RX_PPDU_START_PREAMBLE_HT 0x08714#define HTT_RX_PPDU_START_PREAMBLE_HT_WITH_TXBF 0x09715#define HTT_RX_PPDU_START_PREAMBLE_VHT 0x0C716#define HTT_RX_PPDU_START_PREAMBLE_VHT_WITH_TXBF 0x0D717718#define RX_PPDU_START_INFO0_IS_GREENFIELD BIT(0)719720#define RX_PPDU_START_INFO1_L_SIG_RATE_MASK 0x0000000f721#define RX_PPDU_START_INFO1_L_SIG_RATE_LSB 0722#define RX_PPDU_START_INFO1_L_SIG_LENGTH_MASK 0x0001ffe0723#define RX_PPDU_START_INFO1_L_SIG_LENGTH_LSB 5724#define RX_PPDU_START_INFO1_L_SIG_TAIL_MASK 0x00fc0000725#define RX_PPDU_START_INFO1_L_SIG_TAIL_LSB 18726#define RX_PPDU_START_INFO1_PREAMBLE_TYPE_MASK 0xff000000727#define RX_PPDU_START_INFO1_PREAMBLE_TYPE_LSB 24728#define RX_PPDU_START_INFO1_L_SIG_RATE_SELECT BIT(4)729#define RX_PPDU_START_INFO1_L_SIG_PARITY BIT(17)730731#define RX_PPDU_START_INFO2_HT_SIG_VHT_SIG_A_1_MASK 0x00ffffff732#define RX_PPDU_START_INFO2_HT_SIG_VHT_SIG_A_1_LSB 0733734#define RX_PPDU_START_INFO3_HT_SIG_VHT_SIG_A_2_MASK 0x00ffffff735#define RX_PPDU_START_INFO3_HT_SIG_VHT_SIG_A_2_LSB 0736#define RX_PPDU_START_INFO3_TXBF_H_INFO BIT(24)737738#define RX_PPDU_START_INFO4_VHT_SIG_B_MASK 0x1fffffff739#define RX_PPDU_START_INFO4_VHT_SIG_B_LSB 0740741#define RX_PPDU_START_INFO5_SERVICE_MASK 0x0000ffff742#define RX_PPDU_START_INFO5_SERVICE_LSB 0743744/* No idea what this flag means. It seems to be always set in rate. */745#define RX_PPDU_START_RATE_FLAG BIT(3)746747struct rx_ppdu_start {748struct {749u8 pri20_mhz;750u8 ext20_mhz;751u8 ext40_mhz;752u8 ext80_mhz;753} rssi_chains[4];754u8 rssi_comb;755__le16 rsvd0;756u8 info0; /* %RX_PPDU_START_INFO0_ */757__le32 info1; /* %RX_PPDU_START_INFO1_ */758__le32 info2; /* %RX_PPDU_START_INFO2_ */759__le32 info3; /* %RX_PPDU_START_INFO3_ */760__le32 info4; /* %RX_PPDU_START_INFO4_ */761__le32 info5; /* %RX_PPDU_START_INFO5_ */762} __packed;763764/*765* rssi_chain0_pri20766* RSSI of RX PPDU on chain 0 of primary 20 MHz bandwidth.767* Value of 0x80 indicates invalid.768*769* rssi_chain0_sec20770* RSSI of RX PPDU on chain 0 of secondary 20 MHz bandwidth.771* Value of 0x80 indicates invalid.772*773* rssi_chain0_sec40774* RSSI of RX PPDU on chain 0 of secondary 40 MHz bandwidth.775* Value of 0x80 indicates invalid.776*777* rssi_chain0_sec80778* RSSI of RX PPDU on chain 0 of secondary 80 MHz bandwidth.779* Value of 0x80 indicates invalid.780*781* rssi_chain1_pri20782* RSSI of RX PPDU on chain 1 of primary 20 MHz bandwidth.783* Value of 0x80 indicates invalid.784*785* rssi_chain1_sec20786* RSSI of RX PPDU on chain 1 of secondary 20 MHz bandwidth.787* Value of 0x80 indicates invalid.788*789* rssi_chain1_sec40790* RSSI of RX PPDU on chain 1 of secondary 40 MHz bandwidth.791* Value of 0x80 indicates invalid.792*793* rssi_chain1_sec80794* RSSI of RX PPDU on chain 1 of secondary 80 MHz bandwidth.795* Value of 0x80 indicates invalid.796*797* rssi_chain2_pri20798* RSSI of RX PPDU on chain 2 of primary 20 MHz bandwidth.799* Value of 0x80 indicates invalid.800*801* rssi_chain2_sec20802* RSSI of RX PPDU on chain 2 of secondary 20 MHz bandwidth.803* Value of 0x80 indicates invalid.804*805* rssi_chain2_sec40806* RSSI of RX PPDU on chain 2 of secondary 40 MHz bandwidth.807* Value of 0x80 indicates invalid.808*809* rssi_chain2_sec80810* RSSI of RX PPDU on chain 2 of secondary 80 MHz bandwidth.811* Value of 0x80 indicates invalid.812*813* rssi_chain3_pri20814* RSSI of RX PPDU on chain 3 of primary 20 MHz bandwidth.815* Value of 0x80 indicates invalid.816*817* rssi_chain3_sec20818* RSSI of RX PPDU on chain 3 of secondary 20 MHz bandwidth.819* Value of 0x80 indicates invalid.820*821* rssi_chain3_sec40822* RSSI of RX PPDU on chain 3 of secondary 40 MHz bandwidth.823* Value of 0x80 indicates invalid.824*825* rssi_chain3_sec80826* RSSI of RX PPDU on chain 3 of secondary 80 MHz bandwidth.827* Value of 0x80 indicates invalid.828*829* rssi_comb830* The combined RSSI of RX PPDU of all active chains and831* bandwidths. Value of 0x80 indicates invalid.832*833* reserved_4a834* Reserved: HW should fill with 0, FW should ignore.835*836* is_greenfield837* Do we really support this?838*839* reserved_4b840* Reserved: HW should fill with 0, FW should ignore.841*842* l_sig_rate843* If l_sig_rate_select is 0:844* 0x8: OFDM 48 Mbps845* 0x9: OFDM 24 Mbps846* 0xA: OFDM 12 Mbps847* 0xB: OFDM 6 Mbps848* 0xC: OFDM 54 Mbps849* 0xD: OFDM 36 Mbps850* 0xE: OFDM 18 Mbps851* 0xF: OFDM 9 Mbps852* If l_sig_rate_select is 1:853* 0x8: CCK 11 Mbps long preamble854* 0x9: CCK 5.5 Mbps long preamble855* 0xA: CCK 2 Mbps long preamble856* 0xB: CCK 1 Mbps long preamble857* 0xC: CCK 11 Mbps short preamble858* 0xD: CCK 5.5 Mbps short preamble859* 0xE: CCK 2 Mbps short preamble860*861* l_sig_rate_select862* Legacy signal rate select. If set then l_sig_rate indicates863* CCK rates. If clear then l_sig_rate indicates OFDM rates.864*865* l_sig_length866* Length of legacy frame in octets.867*868* l_sig_parity869* Odd parity over l_sig_rate and l_sig_length870*871* l_sig_tail872* Tail bits for Viterbi decoder873*874* preamble_type875* Indicates the type of preamble ahead:876* 0x4: Legacy (OFDM/CCK)877* 0x8: HT878* 0x9: HT with TxBF879* 0xC: VHT880* 0xD: VHT with TxBF881* 0x80 - 0xFF: Reserved for special baseband data types such882* as radar and spectral scan.883*884* ht_sig_vht_sig_a_1885* If preamble_type == 0x8 or 0x9886* HT-SIG (first 24 bits)887* If preamble_type == 0xC or 0xD888* VHT-SIG A (first 24 bits)889* Else890* Reserved891*892* reserved_6893* Reserved: HW should fill with 0, FW should ignore.894*895* ht_sig_vht_sig_a_2896* If preamble_type == 0x8 or 0x9897* HT-SIG (last 24 bits)898* If preamble_type == 0xC or 0xD899* VHT-SIG A (last 24 bits)900* Else901* Reserved902*903* txbf_h_info904* Indicates that the packet data carries H information which905* is used for TxBF debug.906*907* reserved_7908* Reserved: HW should fill with 0, FW should ignore.909*910* vht_sig_b911* WiFi 1.0 and WiFi 2.0 will likely have this field to be all912* 0s since the BB does not plan on decoding VHT SIG-B.913*914* reserved_8915* Reserved: HW should fill with 0, FW should ignore.916*917* service918* Service field from BB for OFDM, HT and VHT packets. CCK919* packets will have service field of 0.920*921* reserved_9922* Reserved: HW should fill with 0, FW should ignore.923*/924925#define RX_PPDU_END_FLAGS_PHY_ERR BIT(0)926#define RX_PPDU_END_FLAGS_RX_LOCATION BIT(1)927#define RX_PPDU_END_FLAGS_TXBF_H_INFO BIT(2)928929#define RX_PPDU_END_INFO0_RX_ANTENNA_MASK 0x00ffffff930#define RX_PPDU_END_INFO0_RX_ANTENNA_LSB 0931#define RX_PPDU_END_INFO0_FLAGS_TX_HT_VHT_ACK BIT(24)932#define RX_PPDU_END_INFO0_BB_CAPTURED_CHANNEL BIT(25)933934#define RX_PPDU_END_INFO1_PEER_IDX_MASK 0x1ffc935#define RX_PPDU_END_INFO1_PEER_IDX_LSB 2936#define RX_PPDU_END_INFO1_BB_DATA BIT(0)937#define RX_PPDU_END_INFO1_PEER_IDX_VALID BIT(1)938#define RX_PPDU_END_INFO1_PPDU_DONE BIT(15)939940struct rx_ppdu_end_common {941__le32 evm_p0;942__le32 evm_p1;943__le32 evm_p2;944__le32 evm_p3;945__le32 evm_p4;946__le32 evm_p5;947__le32 evm_p6;948__le32 evm_p7;949__le32 evm_p8;950__le32 evm_p9;951__le32 evm_p10;952__le32 evm_p11;953__le32 evm_p12;954__le32 evm_p13;955__le32 evm_p14;956__le32 evm_p15;957__le32 tsf_timestamp;958__le32 wb_timestamp;959} __packed;960961struct rx_ppdu_end_qca988x {962u8 locationing_timestamp;963u8 phy_err_code;964__le16 flags; /* %RX_PPDU_END_FLAGS_ */965__le32 info0; /* %RX_PPDU_END_INFO0_ */966__le16 bb_length;967__le16 info1; /* %RX_PPDU_END_INFO1_ */968} __packed;969970#define RX_PPDU_END_RTT_CORRELATION_VALUE_MASK 0x00ffffff971#define RX_PPDU_END_RTT_CORRELATION_VALUE_LSB 0972#define RX_PPDU_END_RTT_UNUSED_MASK 0x7f000000973#define RX_PPDU_END_RTT_UNUSED_LSB 24974#define RX_PPDU_END_RTT_NORMAL_MODE BIT(31)975976struct rx_ppdu_end_qca6174 {977u8 locationing_timestamp;978u8 phy_err_code;979__le16 flags; /* %RX_PPDU_END_FLAGS_ */980__le32 info0; /* %RX_PPDU_END_INFO0_ */981__le32 rtt; /* %RX_PPDU_END_RTT_ */982__le16 bb_length;983__le16 info1; /* %RX_PPDU_END_INFO1_ */984} __packed;985986#define RX_PKT_END_INFO0_RX_SUCCESS BIT(0)987#define RX_PKT_END_INFO0_ERR_TX_INTERRUPT_RX BIT(3)988#define RX_PKT_END_INFO0_ERR_OFDM_POWER_DROP BIT(4)989#define RX_PKT_END_INFO0_ERR_OFDM_RESTART BIT(5)990#define RX_PKT_END_INFO0_ERR_CCK_POWER_DROP BIT(6)991#define RX_PKT_END_INFO0_ERR_CCK_RESTART BIT(7)992993#define RX_LOCATION_INFO_RTT_CORR_VAL_MASK 0x0001ffff994#define RX_LOCATION_INFO_RTT_CORR_VAL_LSB 0995#define RX_LOCATION_INFO_FAC_STATUS_MASK 0x000c0000996#define RX_LOCATION_INFO_FAC_STATUS_LSB 18997#define RX_LOCATION_INFO_PKT_BW_MASK 0x00700000998#define RX_LOCATION_INFO_PKT_BW_LSB 20999#define RX_LOCATION_INFO_RTT_TX_FRAME_PHASE_MASK 0x018000001000#define RX_LOCATION_INFO_RTT_TX_FRAME_PHASE_LSB 231001#define RX_LOCATION_INFO_CIR_STATUS BIT(17)1002#define RX_LOCATION_INFO_RTT_MAC_PHY_PHASE BIT(25)1003#define RX_LOCATION_INFO_RTT_TX_DATA_START_X BIT(26)1004#define RX_LOCATION_INFO_HW_IFFT_MODE BIT(30)1005#define RX_LOCATION_INFO_RX_LOCATION_VALID BIT(31)10061007struct rx_pkt_end {1008__le32 info0; /* %RX_PKT_END_INFO0_ */1009__le32 phy_timestamp_1;1010__le32 phy_timestamp_2;1011} __packed;10121013struct rx_pkt_end_wcn3990 {1014__le32 info0; /* %RX_PKT_END_INFO0_ */1015__le64 phy_timestamp_1;1016__le64 phy_timestamp_2;1017} __packed;10181019#define RX_LOCATION_INFO0_RTT_FAC_LEGACY_MASK 0x00003fff1020#define RX_LOCATION_INFO0_RTT_FAC_LEGACY_LSB 01021#define RX_LOCATION_INFO0_RTT_FAC_VHT_MASK 0x1fff80001022#define RX_LOCATION_INFO0_RTT_FAC_VHT_LSB 151023#define RX_LOCATION_INFO0_RTT_STRONGEST_CHAIN_MASK 0xc00000001024#define RX_LOCATION_INFO0_RTT_STRONGEST_CHAIN_LSB 301025#define RX_LOCATION_INFO0_RTT_FAC_LEGACY_STATUS BIT(14)1026#define RX_LOCATION_INFO0_RTT_FAC_VHT_STATUS BIT(29)10271028#define RX_LOCATION_INFO1_RTT_PREAMBLE_TYPE_MASK 0x0000000c1029#define RX_LOCATION_INFO1_RTT_PREAMBLE_TYPE_LSB 21030#define RX_LOCATION_INFO1_PKT_BW_MASK 0x000000301031#define RX_LOCATION_INFO1_PKT_BW_LSB 41032#define RX_LOCATION_INFO1_SKIP_P_SKIP_BTCF_MASK 0x0000ff001033#define RX_LOCATION_INFO1_SKIP_P_SKIP_BTCF_LSB 81034#define RX_LOCATION_INFO1_RTT_MSC_RATE_MASK 0x000f00001035#define RX_LOCATION_INFO1_RTT_MSC_RATE_LSB 161036#define RX_LOCATION_INFO1_RTT_PBD_LEG_BW_MASK 0x003000001037#define RX_LOCATION_INFO1_RTT_PBD_LEG_BW_LSB 201038#define RX_LOCATION_INFO1_TIMING_BACKOFF_MASK 0x07c000001039#define RX_LOCATION_INFO1_TIMING_BACKOFF_LSB 221040#define RX_LOCATION_INFO1_RTT_TX_FRAME_PHASE_MASK 0x180000001041#define RX_LOCATION_INFO1_RTT_TX_FRAME_PHASE_LSB 271042#define RX_LOCATION_INFO1_RTT_CFR_STATUS BIT(0)1043#define RX_LOCATION_INFO1_RTT_CIR_STATUS BIT(1)1044#define RX_LOCATION_INFO1_RTT_GI_TYPE BIT(7)1045#define RX_LOCATION_INFO1_RTT_MAC_PHY_PHASE BIT(29)1046#define RX_LOCATION_INFO1_RTT_TX_DATA_START_X_PHASE BIT(30)1047#define RX_LOCATION_INFO1_RX_LOCATION_VALID BIT(31)10481049struct rx_location_info {1050__le32 rx_location_info0; /* %RX_LOCATION_INFO0_ */1051__le32 rx_location_info1; /* %RX_LOCATION_INFO1_ */1052} __packed;10531054struct rx_location_info_wcn3990 {1055__le32 rx_location_info0; /* %RX_LOCATION_INFO0_ */1056__le32 rx_location_info1; /* %RX_LOCATION_INFO1_ */1057__le32 rx_location_info2; /* %RX_LOCATION_INFO2_ */1058} __packed;10591060enum rx_phy_ppdu_end_info0 {1061RX_PHY_PPDU_END_INFO0_ERR_RADAR = BIT(2),1062RX_PHY_PPDU_END_INFO0_ERR_RX_ABORT = BIT(3),1063RX_PHY_PPDU_END_INFO0_ERR_RX_NAP = BIT(4),1064RX_PHY_PPDU_END_INFO0_ERR_OFDM_TIMING = BIT(5),1065RX_PHY_PPDU_END_INFO0_ERR_OFDM_PARITY = BIT(6),1066RX_PHY_PPDU_END_INFO0_ERR_OFDM_RATE = BIT(7),1067RX_PHY_PPDU_END_INFO0_ERR_OFDM_LENGTH = BIT(8),1068RX_PHY_PPDU_END_INFO0_ERR_OFDM_RESTART = BIT(9),1069RX_PHY_PPDU_END_INFO0_ERR_OFDM_SERVICE = BIT(10),1070RX_PHY_PPDU_END_INFO0_ERR_OFDM_POWER_DROP = BIT(11),1071RX_PHY_PPDU_END_INFO0_ERR_CCK_BLOCKER = BIT(12),1072RX_PHY_PPDU_END_INFO0_ERR_CCK_TIMING = BIT(13),1073RX_PHY_PPDU_END_INFO0_ERR_CCK_HEADER_CRC = BIT(14),1074RX_PHY_PPDU_END_INFO0_ERR_CCK_RATE = BIT(15),1075RX_PHY_PPDU_END_INFO0_ERR_CCK_LENGTH = BIT(16),1076RX_PHY_PPDU_END_INFO0_ERR_CCK_RESTART = BIT(17),1077RX_PHY_PPDU_END_INFO0_ERR_CCK_SERVICE = BIT(18),1078RX_PHY_PPDU_END_INFO0_ERR_CCK_POWER_DROP = BIT(19),1079RX_PHY_PPDU_END_INFO0_ERR_HT_CRC = BIT(20),1080RX_PHY_PPDU_END_INFO0_ERR_HT_LENGTH = BIT(21),1081RX_PHY_PPDU_END_INFO0_ERR_HT_RATE = BIT(22),1082RX_PHY_PPDU_END_INFO0_ERR_HT_ZLF = BIT(23),1083RX_PHY_PPDU_END_INFO0_ERR_FALSE_RADAR_EXT = BIT(24),1084RX_PHY_PPDU_END_INFO0_ERR_GREEN_FIELD = BIT(25),1085RX_PHY_PPDU_END_INFO0_ERR_SPECTRAL_SCAN = BIT(26),1086RX_PHY_PPDU_END_INFO0_ERR_RX_DYN_BW = BIT(27),1087RX_PHY_PPDU_END_INFO0_ERR_LEG_HT_MISMATCH = BIT(28),1088RX_PHY_PPDU_END_INFO0_ERR_VHT_CRC = BIT(29),1089RX_PHY_PPDU_END_INFO0_ERR_VHT_SIGA = BIT(30),1090RX_PHY_PPDU_END_INFO0_ERR_VHT_LSIG = BIT(31),1091};10921093enum rx_phy_ppdu_end_info1 {1094RX_PHY_PPDU_END_INFO1_ERR_VHT_NDP = BIT(0),1095RX_PHY_PPDU_END_INFO1_ERR_VHT_NSYM = BIT(1),1096RX_PHY_PPDU_END_INFO1_ERR_VHT_RX_EXT_SYM = BIT(2),1097RX_PHY_PPDU_END_INFO1_ERR_VHT_RX_SKIP_ID0 = BIT(3),1098RX_PHY_PPDU_END_INFO1_ERR_VHT_RX_SKIP_ID1_62 = BIT(4),1099RX_PHY_PPDU_END_INFO1_ERR_VHT_RX_SKIP_ID63 = BIT(5),1100RX_PHY_PPDU_END_INFO1_ERR_OFDM_LDPC_DECODER = BIT(6),1101RX_PHY_PPDU_END_INFO1_ERR_DEFER_NAP = BIT(7),1102RX_PHY_PPDU_END_INFO1_ERR_FDOMAIN_TIMEOUT = BIT(8),1103RX_PHY_PPDU_END_INFO1_ERR_LSIG_REL_CHECK = BIT(9),1104RX_PHY_PPDU_END_INFO1_ERR_BT_COLLISION = BIT(10),1105RX_PHY_PPDU_END_INFO1_ERR_MU_FEEDBACK = BIT(11),1106RX_PHY_PPDU_END_INFO1_ERR_TX_INTERRUPT_RX = BIT(12),1107RX_PHY_PPDU_END_INFO1_ERR_RX_CBF = BIT(13),1108};11091110struct rx_phy_ppdu_end {1111__le32 info0; /* %RX_PHY_PPDU_END_INFO0_ */1112__le32 info1; /* %RX_PHY_PPDU_END_INFO1_ */1113} __packed;11141115#define RX_PPDU_END_RX_TIMING_OFFSET_MASK 0x00000fff1116#define RX_PPDU_END_RX_TIMING_OFFSET_LSB 011171118#define RX_PPDU_END_RX_INFO_RX_ANTENNA_MASK 0x00ffffff1119#define RX_PPDU_END_RX_INFO_RX_ANTENNA_LSB 01120#define RX_PPDU_END_RX_INFO_TX_HT_VHT_ACK BIT(24)1121#define RX_PPDU_END_RX_INFO_RX_PKT_END_VALID BIT(25)1122#define RX_PPDU_END_RX_INFO_RX_PHY_PPDU_END_VALID BIT(26)1123#define RX_PPDU_END_RX_INFO_RX_TIMING_OFFSET_VALID BIT(27)1124#define RX_PPDU_END_RX_INFO_BB_CAPTURED_CHANNEL BIT(28)1125#define RX_PPDU_END_RX_INFO_UNSUPPORTED_MU_NC BIT(29)1126#define RX_PPDU_END_RX_INFO_OTP_TXBF_DISABLE BIT(30)11271128struct rx_ppdu_end_qca99x0 {1129struct rx_pkt_end rx_pkt_end;1130__le32 rx_location_info; /* %RX_LOCATION_INFO_ */1131struct rx_phy_ppdu_end rx_phy_ppdu_end;1132__le32 rx_timing_offset; /* %RX_PPDU_END_RX_TIMING_OFFSET_ */1133__le32 rx_info; /* %RX_PPDU_END_RX_INFO_ */1134__le16 bb_length;1135__le16 info1; /* %RX_PPDU_END_INFO1_ */1136} __packed;11371138struct rx_ppdu_end_qca9984 {1139struct rx_pkt_end rx_pkt_end;1140struct rx_location_info rx_location_info;1141struct rx_phy_ppdu_end rx_phy_ppdu_end;1142__le32 rx_timing_offset; /* %RX_PPDU_END_RX_TIMING_OFFSET_ */1143__le32 rx_info; /* %RX_PPDU_END_RX_INFO_ */1144__le16 bb_length;1145__le16 info1; /* %RX_PPDU_END_INFO1_ */1146} __packed;11471148struct rx_ppdu_end_wcn3990 {1149struct rx_pkt_end_wcn3990 rx_pkt_end;1150struct rx_location_info_wcn3990 rx_location_info;1151struct rx_phy_ppdu_end rx_phy_ppdu_end;1152__le32 rx_timing_offset;1153__le32 reserved_info_0;1154__le32 reserved_info_1;1155__le32 rx_antenna_info;1156__le32 rx_coex_info;1157__le32 rx_mpdu_cnt_info;1158__le64 phy_timestamp_tx;1159__le32 rx_bb_length;1160} __packed;11611162struct rx_ppdu_end {1163struct rx_ppdu_end_common common;1164union {1165struct rx_ppdu_end_wcn3990 wcn3990;1166} __packed;1167} __packed;11681169struct rx_ppdu_end_v1 {1170struct rx_ppdu_end_common common;1171union {1172struct rx_ppdu_end_qca988x qca988x;1173struct rx_ppdu_end_qca6174 qca6174;1174struct rx_ppdu_end_qca99x0 qca99x0;1175struct rx_ppdu_end_qca9984 qca9984;1176} __packed;1177} __packed;11781179/*1180* evm_p01181* EVM for pilot 0. Contain EVM for streams: 0, 1, 2 and 3.1182*1183* evm_p11184* EVM for pilot 1. Contain EVM for streams: 0, 1, 2 and 3.1185*1186* evm_p21187* EVM for pilot 2. Contain EVM for streams: 0, 1, 2 and 3.1188*1189* evm_p31190* EVM for pilot 3. Contain EVM for streams: 0, 1, 2 and 3.1191*1192* evm_p41193* EVM for pilot 4. Contain EVM for streams: 0, 1, 2 and 3.1194*1195* evm_p51196* EVM for pilot 5. Contain EVM for streams: 0, 1, 2 and 3.1197*1198* evm_p61199* EVM for pilot 6. Contain EVM for streams: 0, 1, 2 and 3.1200*1201* evm_p71202* EVM for pilot 7. Contain EVM for streams: 0, 1, 2 and 3.1203*1204* evm_p81205* EVM for pilot 8. Contain EVM for streams: 0, 1, 2 and 3.1206*1207* evm_p91208* EVM for pilot 9. Contain EVM for streams: 0, 1, 2 and 3.1209*1210* evm_p101211* EVM for pilot 10. Contain EVM for streams: 0, 1, 2 and 3.1212*1213* evm_p111214* EVM for pilot 11. Contain EVM for streams: 0, 1, 2 and 3.1215*1216* evm_p121217* EVM for pilot 12. Contain EVM for streams: 0, 1, 2 and 3.1218*1219* evm_p131220* EVM for pilot 13. Contain EVM for streams: 0, 1, 2 and 3.1221*1222* evm_p141223* EVM for pilot 14. Contain EVM for streams: 0, 1, 2 and 3.1224*1225* evm_p151226* EVM for pilot 15. Contain EVM for streams: 0, 1, 2 and 3.1227*1228* tsf_timestamp1229* Receive TSF timestamp sampled on the rising edge of1230* rx_clear. For PHY errors this may be the current TSF when1231* phy_error is asserted if the rx_clear does not assert before1232* the end of the PHY error.1233*1234* wb_timestamp1235* WLAN/BT timestamp is a 1 usec resolution timestamp which1236* does not get updated based on receive beacon like TSF. The1237* same rules for capturing tsf_timestamp are used to capture1238* the wb_timestamp.1239*1240* locationing_timestamp1241* Timestamp used for locationing. This timestamp is used to1242* indicate fractions of usec. For example if the MAC clock is1243* running at 80 MHz, the timestamp will increment every 12.51244* nsec. The value starts at 0 and increments to 79 and1245* returns to 0 and repeats. This information is valid for1246* every PPDU. This information can be used in conjunction1247* with wb_timestamp to capture large delta times.1248*1249* phy_err_code1250* See the 1.10.8.1.2 for the list of the PHY error codes.1251*1252* phy_err1253* Indicates a PHY error was detected for this PPDU.1254*1255* rx_location1256* Indicates that location information was requested.1257*1258* txbf_h_info1259* Indicates that the packet data carries H information which1260* is used for TxBF debug.1261*1262* reserved_181263* Reserved: HW should fill with 0, FW should ignore.1264*1265* rx_antenna1266* Receive antenna value1267*1268* tx_ht_vht_ack1269* Indicates that a HT or VHT Ack/BA frame was transmitted in1270* response to this receive packet.1271*1272* bb_captured_channel1273* Indicates that the BB has captured a channel dump. FW can1274* then read the channel dump memory. This may indicate that1275* the channel was captured either based on PCU setting the1276* capture_channel bit BB descriptor or FW setting the1277* capture_channel mode bit.1278*1279* reserved_191280* Reserved: HW should fill with 0, FW should ignore.1281*1282* bb_length1283* Indicates the number of bytes of baseband information for1284* PPDUs where the BB descriptor preamble type is 0x80 to 0xFF1285* which indicates that this is not a normal PPDU but rather1286* contains baseband debug information.1287*1288* reserved_201289* Reserved: HW should fill with 0, FW should ignore.1290*1291* ppdu_done1292* PPDU end status is only valid when ppdu_done bit is set.1293* Every time HW sets this bit in memory FW/SW must clear this1294* bit in memory. FW will initialize all the ppdu_done dword1295* to 0.1296*/12971298#define FW_RX_DESC_INFO0_DISCARD BIT(0)1299#define FW_RX_DESC_INFO0_FORWARD BIT(1)1300#define FW_RX_DESC_INFO0_INSPECT BIT(5)1301#define FW_RX_DESC_INFO0_EXT_MASK 0xC01302#define FW_RX_DESC_INFO0_EXT_LSB 613031304struct fw_rx_desc_base {1305u8 info0;1306} __packed;13071308#define FW_RX_DESC_FLAGS_FIRST_MSDU (1 << 0)1309#define FW_RX_DESC_FLAGS_LAST_MSDU (1 << 1)1310#define FW_RX_DESC_C3_FAILED (1 << 2)1311#define FW_RX_DESC_C4_FAILED (1 << 3)1312#define FW_RX_DESC_IPV6 (1 << 4)1313#define FW_RX_DESC_TCP (1 << 5)1314#define FW_RX_DESC_UDP (1 << 6)13151316struct fw_rx_desc_hl {1317union {1318struct {1319u8 discard:1,1320forward:1,1321any_err:1,1322dup_err:1,1323reserved:1,1324inspect:1,1325extension:2;1326} bits;1327u8 info0;1328} u;13291330u8 version;1331u8 len;1332u8 flags;1333} __packed;13341335#endif /* _RX_DESC_H_ */133613371338