Path: blob/main/sys/contrib/dev/athk/ath10k/rx_desc.h
48375 views
/* SPDX-License-Identifier: ISC */1/*2* Copyright (c) 2005-2011 Atheros Communications Inc.3* Copyright (c) 2011-2017 Qualcomm Atheros, Inc.4*/56#ifndef _RX_DESC_H_7#define _RX_DESC_H_89#include <linux/bitops.h>1011enum rx_attention_flags {12RX_ATTENTION_FLAGS_FIRST_MPDU = BIT(0),13RX_ATTENTION_FLAGS_LAST_MPDU = BIT(1),14RX_ATTENTION_FLAGS_MCAST_BCAST = BIT(2),15RX_ATTENTION_FLAGS_PEER_IDX_INVALID = BIT(3),16RX_ATTENTION_FLAGS_PEER_IDX_TIMEOUT = BIT(4),17RX_ATTENTION_FLAGS_POWER_MGMT = BIT(5),18RX_ATTENTION_FLAGS_NON_QOS = BIT(6),19RX_ATTENTION_FLAGS_NULL_DATA = BIT(7),20RX_ATTENTION_FLAGS_MGMT_TYPE = BIT(8),21RX_ATTENTION_FLAGS_CTRL_TYPE = BIT(9),22RX_ATTENTION_FLAGS_MORE_DATA = BIT(10),23RX_ATTENTION_FLAGS_EOSP = BIT(11),24RX_ATTENTION_FLAGS_U_APSD_TRIGGER = BIT(12),25RX_ATTENTION_FLAGS_FRAGMENT = BIT(13),26RX_ATTENTION_FLAGS_ORDER = BIT(14),27RX_ATTENTION_FLAGS_CLASSIFICATION = BIT(15),28RX_ATTENTION_FLAGS_OVERFLOW_ERR = BIT(16),29RX_ATTENTION_FLAGS_MSDU_LENGTH_ERR = BIT(17),30RX_ATTENTION_FLAGS_TCP_UDP_CHKSUM_FAIL = BIT(18),31RX_ATTENTION_FLAGS_IP_CHKSUM_FAIL = BIT(19),32RX_ATTENTION_FLAGS_SA_IDX_INVALID = BIT(20),33RX_ATTENTION_FLAGS_DA_IDX_INVALID = BIT(21),34RX_ATTENTION_FLAGS_SA_IDX_TIMEOUT = BIT(22),35RX_ATTENTION_FLAGS_DA_IDX_TIMEOUT = BIT(23),36RX_ATTENTION_FLAGS_ENCRYPT_REQUIRED = BIT(24),37RX_ATTENTION_FLAGS_DIRECTED = BIT(25),38RX_ATTENTION_FLAGS_BUFFER_FRAGMENT = BIT(26),39RX_ATTENTION_FLAGS_MPDU_LENGTH_ERR = BIT(27),40RX_ATTENTION_FLAGS_TKIP_MIC_ERR = BIT(28),41RX_ATTENTION_FLAGS_DECRYPT_ERR = BIT(29),42RX_ATTENTION_FLAGS_FCS_ERR = BIT(30),43RX_ATTENTION_FLAGS_MSDU_DONE = BIT(31),44};4546struct rx_attention {47__le32 flags; /* %RX_ATTENTION_FLAGS_ */48} __packed;4950/*51* first_mpdu52* Indicates the first MSDU of the PPDU. If both first_mpdu53* and last_mpdu are set in the MSDU then this is a not an54* A-MPDU frame but a stand alone MPDU. Interior MPDU in an55* A-MPDU shall have both first_mpdu and last_mpdu bits set to56* 0. The PPDU start status will only be valid when this bit57* is set.58*59* last_mpdu60* Indicates the last MSDU of the last MPDU of the PPDU. The61* PPDU end status will only be valid when this bit is set.62*63* mcast_bcast64* Multicast / broadcast indicator. Only set when the MAC65* address 1 bit 0 is set indicating mcast/bcast and the BSSID66* matches one of the 4 BSSID registers. Only set when67* first_msdu is set.68*69* peer_idx_invalid70* Indicates no matching entries within the max search71* count. Only set when first_msdu is set.72*73* peer_idx_timeout74* Indicates an unsuccessful search for the peer index due to75* timeout. Only set when first_msdu is set.76*77* power_mgmt78* Power management bit set in the 802.11 header. Only set79* when first_msdu is set.80*81* non_qos82* Set if packet is not a non-QoS data frame. Only set when83* first_msdu is set.84*85* null_data86* Set if frame type indicates either null data or QoS null87* data format. Only set when first_msdu is set.88*89* mgmt_type90* Set if packet is a management packet. Only set when91* first_msdu is set.92*93* ctrl_type94* Set if packet is a control packet. Only set when first_msdu95* is set.96*97* more_data98* Set if more bit in frame control is set. Only set when99* first_msdu is set.100*101* eosp102* Set if the EOSP (end of service period) bit in the QoS103* control field is set. Only set when first_msdu is set.104*105* u_apsd_trigger106* Set if packet is U-APSD trigger. Key table will have bits107* per TID to indicate U-APSD trigger.108*109* fragment110* Indicates that this is an 802.11 fragment frame. This is111* set when either the more_frag bit is set in the frame112* control or the fragment number is not zero. Only set when113* first_msdu is set.114*115* order116* Set if the order bit in the frame control is set. Only set117* when first_msdu is set.118*119* classification120* Indicates that this status has a corresponding MSDU that121* requires FW processing. The OLE will have classification122* ring mask registers which will indicate the ring(s) for123* packets and descriptors which need FW attention.124*125* overflow_err126* PCU Receive FIFO does not have enough space to store the127* full receive packet. Enough space is reserved in the128* receive FIFO for the status is written. This MPDU remaining129* packets in the PPDU will be filtered and no Ack response130* will be transmitted.131*132* msdu_length_err133* Indicates that the MSDU length from the 802.3 encapsulated134* length field extends beyond the MPDU boundary.135*136* tcp_udp_chksum_fail137* Indicates that the computed checksum (tcp_udp_chksum) did138* not match the checksum in the TCP/UDP header.139*140* ip_chksum_fail141* Indicates that the computed checksum did not match the142* checksum in the IP header.143*144* sa_idx_invalid145* Indicates no matching entry was found in the address search146* table for the source MAC address.147*148* da_idx_invalid149* Indicates no matching entry was found in the address search150* table for the destination MAC address.151*152* sa_idx_timeout153* Indicates an unsuccessful search for the source MAC address154* due to the expiring of the search timer.155*156* da_idx_timeout157* Indicates an unsuccessful search for the destination MAC158* address due to the expiring of the search timer.159*160* encrypt_required161* Indicates that this data type frame is not encrypted even if162* the policy for this MPDU requires encryption as indicated in163* the peer table key type.164*165* directed166* MPDU is a directed packet which means that the RA matched167* our STA addresses. In proxySTA it means that the TA matched168* an entry in our address search table with the corresponding169* 'no_ack' bit is the address search entry cleared.170*171* buffer_fragment172* Indicates that at least one of the rx buffers has been173* fragmented. If set the FW should look at the rx_frag_info174* descriptor described below.175*176* mpdu_length_err177* Indicates that the MPDU was pre-maturely terminated178* resulting in a truncated MPDU. Don't trust the MPDU length179* field.180*181* tkip_mic_err182* Indicates that the MPDU Michael integrity check failed183*184* decrypt_err185* Indicates that the MPDU decrypt integrity check failed186*187* fcs_err188* Indicates that the MPDU FCS check failed189*190* msdu_done191* If set indicates that the RX packet data, RX header data, RX192* PPDU start descriptor, RX MPDU start/end descriptor, RX MSDU193* start/end descriptors and RX Attention descriptor are all194* valid. This bit must be in the last octet of the195* descriptor.196*/197198struct rx_frag_info_common {199u8 ring0_more_count;200u8 ring1_more_count;201u8 ring2_more_count;202u8 ring3_more_count;203} __packed;204205struct rx_frag_info_wcn3990 {206u8 ring4_more_count;207u8 ring5_more_count;208u8 ring6_more_count;209u8 ring7_more_count;210} __packed;211212struct rx_frag_info {213struct rx_frag_info_common common;214union {215struct rx_frag_info_wcn3990 wcn3990;216} __packed;217} __packed;218219struct rx_frag_info_v1 {220struct rx_frag_info_common common;221} __packed;222223/*224* ring0_more_count225* Indicates the number of more buffers associated with RX DMA226* ring 0. Field is filled in by the RX_DMA.227*228* ring1_more_count229* Indicates the number of more buffers associated with RX DMA230* ring 1. Field is filled in by the RX_DMA.231*232* ring2_more_count233* Indicates the number of more buffers associated with RX DMA234* ring 2. Field is filled in by the RX_DMA.235*236* ring3_more_count237* Indicates the number of more buffers associated with RX DMA238* ring 3. Field is filled in by the RX_DMA.239*/240241enum htt_rx_mpdu_encrypt_type {242HTT_RX_MPDU_ENCRYPT_WEP40 = 0,243HTT_RX_MPDU_ENCRYPT_WEP104 = 1,244HTT_RX_MPDU_ENCRYPT_TKIP_WITHOUT_MIC = 2,245HTT_RX_MPDU_ENCRYPT_WEP128 = 3,246HTT_RX_MPDU_ENCRYPT_TKIP_WPA = 4,247HTT_RX_MPDU_ENCRYPT_WAPI = 5,248HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2 = 6,249HTT_RX_MPDU_ENCRYPT_NONE = 7,250HTT_RX_MPDU_ENCRYPT_AES_CCM256_WPA2 = 8,251HTT_RX_MPDU_ENCRYPT_AES_GCMP_WPA2 = 9,252HTT_RX_MPDU_ENCRYPT_AES_GCMP256_WPA2 = 10,253};254255#define RX_MPDU_START_INFO0_PEER_IDX_MASK 0x000007ff256#define RX_MPDU_START_INFO0_PEER_IDX_LSB 0257#define RX_MPDU_START_INFO0_SEQ_NUM_MASK 0x0fff0000258#define RX_MPDU_START_INFO0_SEQ_NUM_LSB 16259#define RX_MPDU_START_INFO0_ENCRYPT_TYPE_MASK 0xf0000000260#define RX_MPDU_START_INFO0_ENCRYPT_TYPE_LSB 28261#define RX_MPDU_START_INFO0_FROM_DS BIT(11)262#define RX_MPDU_START_INFO0_TO_DS BIT(12)263#define RX_MPDU_START_INFO0_ENCRYPTED BIT(13)264#define RX_MPDU_START_INFO0_RETRY BIT(14)265#define RX_MPDU_START_INFO0_TXBF_H_INFO BIT(15)266267#define RX_MPDU_START_INFO1_TID_MASK 0xf0000000268#define RX_MPDU_START_INFO1_TID_LSB 28269#define RX_MPDU_START_INFO1_DIRECTED BIT(16)270271struct rx_mpdu_start {272__le32 info0;273union {274struct {275__le32 pn31_0;276__le32 info1; /* %RX_MPDU_START_INFO1_ */277} __packed;278struct {279u8 pn[6];280} __packed;281} __packed;282} __packed;283284/*285* peer_idx286* The index of the address search table which associated with287* the peer table entry corresponding to this MPDU. Only valid288* when first_msdu is set.289*290* fr_ds291* Set if the from DS bit is set in the frame control. Only292* valid when first_msdu is set.293*294* to_ds295* Set if the to DS bit is set in the frame control. Only296* valid when first_msdu is set.297*298* encrypted299* Protected bit from the frame control. Only valid when300* first_msdu is set.301*302* retry303* Retry bit from the frame control. Only valid when304* first_msdu is set.305*306* txbf_h_info307* The MPDU data will contain H information. Primarily used308* for debug.309*310* seq_num311* The sequence number from the 802.11 header. Only valid when312* first_msdu is set.313*314* encrypt_type315* Indicates type of decrypt cipher used (as defined in the316* peer table)317* 0: WEP40318* 1: WEP104319* 2: TKIP without MIC320* 3: WEP128321* 4: TKIP (WPA)322* 5: WAPI323* 6: AES-CCM (WPA2)324* 7: No cipher325* Only valid when first_msdu_is set326*327* pn_31_0328* Bits [31:0] of the PN number extracted from the IV field329* WEP: IV = {key_id_octet, pn2, pn1, pn0}. Only pn[23:0] is330* valid.331* TKIP: IV = {pn5, pn4, pn3, pn2, key_id_octet, pn0,332* WEPSeed[1], pn1}. Only pn[47:0] is valid.333* AES-CCM: IV = {pn5, pn4, pn3, pn2, key_id_octet, 0x0, pn1,334* pn0}. Only pn[47:0] is valid.335* WAPI: IV = {key_id_octet, 0x0, pn15, pn14, pn13, pn12, pn11,336* pn10, pn9, pn8, pn7, pn6, pn5, pn4, pn3, pn2, pn1, pn0}.337* The ext_wapi_pn[127:48] in the rx_msdu_misc descriptor and338* pn[47:0] are valid.339* Only valid when first_msdu is set.340*341* pn_47_32342* Bits [47:32] of the PN number. See description for343* pn_31_0. The remaining PN fields are in the rx_msdu_end344* descriptor345*346* pn347* Use this field to access the pn without worrying about348* byte-order and bitmasking/bitshifting.349*350* directed351* See definition in RX attention descriptor352*353* reserved_2354* Reserved: HW should fill with zero. FW should ignore.355*356* tid357* The TID field in the QoS control field358*/359360#define RX_MPDU_END_INFO0_RESERVED_0_MASK 0x00001fff361#define RX_MPDU_END_INFO0_RESERVED_0_LSB 0362#define RX_MPDU_END_INFO0_POST_DELIM_CNT_MASK 0x0fff0000363#define RX_MPDU_END_INFO0_POST_DELIM_CNT_LSB 16364#define RX_MPDU_END_INFO0_OVERFLOW_ERR BIT(13)365#define RX_MPDU_END_INFO0_LAST_MPDU BIT(14)366#define RX_MPDU_END_INFO0_POST_DELIM_ERR BIT(15)367#define RX_MPDU_END_INFO0_MPDU_LENGTH_ERR BIT(28)368#define RX_MPDU_END_INFO0_TKIP_MIC_ERR BIT(29)369#define RX_MPDU_END_INFO0_DECRYPT_ERR BIT(30)370#define RX_MPDU_END_INFO0_FCS_ERR BIT(31)371372struct rx_mpdu_end {373__le32 info0;374} __packed;375376/*377* reserved_0378* Reserved379*380* overflow_err381* PCU Receive FIFO does not have enough space to store the382* full receive packet. Enough space is reserved in the383* receive FIFO for the status is written. This MPDU remaining384* packets in the PPDU will be filtered and no Ack response385* will be transmitted.386*387* last_mpdu388* Indicates that this is the last MPDU of a PPDU.389*390* post_delim_err391* Indicates that a delimiter FCS error occurred after this392* MPDU before the next MPDU. Only valid when last_msdu is393* set.394*395* post_delim_cnt396* Count of the delimiters after this MPDU. This requires the397* last MPDU to be held until all the EOF descriptors have been398* received. This may be inefficient in the future when399* ML-MIMO is used. Only valid when last_mpdu is set.400*401* mpdu_length_err402* See definition in RX attention descriptor403*404* tkip_mic_err405* See definition in RX attention descriptor406*407* decrypt_err408* See definition in RX attention descriptor409*410* fcs_err411* See definition in RX attention descriptor412*/413414#define RX_MSDU_START_INFO0_MSDU_LENGTH_MASK 0x00003fff415#define RX_MSDU_START_INFO0_MSDU_LENGTH_LSB 0416#define RX_MSDU_START_INFO0_IP_OFFSET_MASK 0x000fc000417#define RX_MSDU_START_INFO0_IP_OFFSET_LSB 14418#define RX_MSDU_START_INFO0_RING_MASK_MASK 0x00f00000419#define RX_MSDU_START_INFO0_RING_MASK_LSB 20420#define RX_MSDU_START_INFO0_TCP_UDP_OFFSET_MASK 0x7f000000421#define RX_MSDU_START_INFO0_TCP_UDP_OFFSET_LSB 24422423#define RX_MSDU_START_INFO1_MSDU_NUMBER_MASK 0x000000ff424#define RX_MSDU_START_INFO1_MSDU_NUMBER_LSB 0425#define RX_MSDU_START_INFO1_DECAP_FORMAT_MASK 0x00000300426#define RX_MSDU_START_INFO1_DECAP_FORMAT_LSB 8427#define RX_MSDU_START_INFO1_SA_IDX_MASK 0x07ff0000428#define RX_MSDU_START_INFO1_SA_IDX_LSB 16429#define RX_MSDU_START_INFO1_IPV4_PROTO BIT(10)430#define RX_MSDU_START_INFO1_IPV6_PROTO BIT(11)431#define RX_MSDU_START_INFO1_TCP_PROTO BIT(12)432#define RX_MSDU_START_INFO1_UDP_PROTO BIT(13)433#define RX_MSDU_START_INFO1_IP_FRAG BIT(14)434#define RX_MSDU_START_INFO1_TCP_ONLY_ACK BIT(15)435436#define RX_MSDU_START_INFO2_DA_IDX_MASK 0x000007ff437#define RX_MSDU_START_INFO2_DA_IDX_LSB 0438#define RX_MSDU_START_INFO2_IP_PROTO_FIELD_MASK 0x00ff0000439#define RX_MSDU_START_INFO2_IP_PROTO_FIELD_LSB 16440#define RX_MSDU_START_INFO2_DA_BCAST_MCAST BIT(11)441442/* The decapped header (rx_hdr_status) contains the following:443* a) 802.11 header444* [padding to 4 bytes]445* b) HW crypto parameter446* - 0 bytes for no security447* - 4 bytes for WEP448* - 8 bytes for TKIP, AES449* [padding to 4 bytes]450* c) A-MSDU subframe header (14 bytes) if applicable451* d) LLC/SNAP (RFC1042, 8 bytes)452*453* In case of A-MSDU only first frame in sequence contains (a) and (b).454*/455enum rx_msdu_decap_format {456RX_MSDU_DECAP_RAW = 0,457458/* Note: QoS frames are reported as non-QoS. The rx_hdr_status in459* htt_rx_desc contains the original decapped 802.11 header.460*/461RX_MSDU_DECAP_NATIVE_WIFI = 1,462463/* Payload contains an ethernet header (struct ethhdr). */464RX_MSDU_DECAP_ETHERNET2_DIX = 2,465466/* Payload contains two 48-bit addresses and 2-byte length (14 bytes467* total), followed by an RFC1042 header (8 bytes).468*/469RX_MSDU_DECAP_8023_SNAP_LLC = 3470};471472struct rx_msdu_start_common {473__le32 info0; /* %RX_MSDU_START_INFO0_ */474__le32 flow_id_crc;475__le32 info1; /* %RX_MSDU_START_INFO1_ */476} __packed;477478struct rx_msdu_start_qca99x0 {479__le32 info2; /* %RX_MSDU_START_INFO2_ */480} __packed;481482struct rx_msdu_start_wcn3990 {483__le32 info2; /* %RX_MSDU_START_INFO2_ */484__le32 info3; /* %RX_MSDU_START_INFO3_ */485} __packed;486487struct rx_msdu_start {488struct rx_msdu_start_common common;489union {490struct rx_msdu_start_wcn3990 wcn3990;491} __packed;492} __packed;493494struct rx_msdu_start_v1 {495struct rx_msdu_start_common common;496union {497struct rx_msdu_start_qca99x0 qca99x0;498} __packed;499} __packed;500501/*502* msdu_length503* MSDU length in bytes after decapsulation. This field is504* still valid for MPDU frames without A-MSDU. It still505* represents MSDU length after decapsulation506*507* ip_offset508* Indicates the IP offset in bytes from the start of the509* packet after decapsulation. Only valid if ipv4_proto or510* ipv6_proto is set.511*512* ring_mask513* Indicates the destination RX rings for this MSDU.514*515* tcp_udp_offset516* Indicates the offset in bytes to the start of TCP or UDP517* header from the start of the IP header after decapsulation.518* Only valid if tcp_prot or udp_prot is set. The value 0519* indicates that the offset is longer than 127 bytes.520*521* reserved_0c522* Reserved: HW should fill with zero. FW should ignore.523*524* flow_id_crc525* The flow_id_crc runs CRC32 on the following information:526* IPv4 option: dest_addr[31:0], src_addr [31:0], {24'b0,527* protocol[7:0]}.528* IPv6 option: dest_addr[127:0], src_addr [127:0], {24'b0,529* next_header[7:0]}530* UDP case: sort_port[15:0], dest_port[15:0]531* TCP case: sort_port[15:0], dest_port[15:0],532* {header_length[3:0], 6'b0, flags[5:0], window_size[15:0]},533* {16'b0, urgent_ptr[15:0]}, all options except 32-bit534* timestamp.535*536* msdu_number537* Indicates the MSDU number within a MPDU. This value is538* reset to zero at the start of each MPDU. If the number of539* MSDU exceeds 255 this number will wrap using modulo 256.540*541* decap_format542* Indicates the format after decapsulation:543* 0: RAW: No decapsulation544* 1: Native WiFi545* 2: Ethernet 2 (DIX)546* 3: 802.3 (SNAP/LLC)547*548* ipv4_proto549* Set if L2 layer indicates IPv4 protocol.550*551* ipv6_proto552* Set if L2 layer indicates IPv6 protocol.553*554* tcp_proto555* Set if the ipv4_proto or ipv6_proto are set and the IP556* protocol indicates TCP.557*558* udp_proto559* Set if the ipv4_proto or ipv6_proto are set and the IP560* protocol indicates UDP.561*562* ip_frag563* Indicates that either the IP More frag bit is set or IP frag564* number is non-zero. If set indicates that this is a565* fragmented IP packet.566*567* tcp_only_ack568* Set if only the TCP Ack bit is set in the TCP flags and if569* the TCP payload is 0.570*571* sa_idx572* The offset in the address table which matches the MAC source573* address.574*575* reserved_2b576* Reserved: HW should fill with zero. FW should ignore.577*/578579#define RX_MSDU_END_INFO0_REPORTED_MPDU_LENGTH_MASK 0x00003fff580#define RX_MSDU_END_INFO0_REPORTED_MPDU_LENGTH_LSB 0581#define RX_MSDU_END_INFO0_FIRST_MSDU BIT(14)582#define RX_MSDU_END_INFO0_LAST_MSDU BIT(15)583#define RX_MSDU_END_INFO0_MSDU_LIMIT_ERR BIT(18)584#define RX_MSDU_END_INFO0_PRE_DELIM_ERR BIT(30)585#define RX_MSDU_END_INFO0_RESERVED_3B BIT(31)586587struct rx_msdu_end_common {588__le16 ip_hdr_cksum;589__le16 tcp_hdr_cksum;590u8 key_id_octet;591u8 classification_filter;592u8 wapi_pn[10];593__le32 info0;594} __packed;595596#define RX_MSDU_END_INFO1_TCP_FLAG_MASK 0x000001ff597#define RX_MSDU_END_INFO1_TCP_FLAG_LSB 0598#define RX_MSDU_END_INFO1_L3_HDR_PAD_MASK 0x00001c00599#define RX_MSDU_END_INFO1_L3_HDR_PAD_LSB 10600#define RX_MSDU_END_INFO1_WINDOW_SIZE_MASK 0xffff0000601#define RX_MSDU_END_INFO1_WINDOW_SIZE_LSB 16602#define RX_MSDU_END_INFO1_IRO_ELIGIBLE BIT(9)603604#define RX_MSDU_END_INFO2_DA_OFFSET_MASK 0x0000003f605#define RX_MSDU_END_INFO2_DA_OFFSET_LSB 0606#define RX_MSDU_END_INFO2_SA_OFFSET_MASK 0x00000fc0607#define RX_MSDU_END_INFO2_SA_OFFSET_LSB 6608#define RX_MSDU_END_INFO2_TYPE_OFFSET_MASK 0x0003f000609#define RX_MSDU_END_INFO2_TYPE_OFFSET_LSB 12610611struct rx_msdu_end_qca99x0 {612__le32 ipv6_crc;613__le32 tcp_seq_no;614__le32 tcp_ack_no;615__le32 info1;616__le32 info2;617} __packed;618619struct rx_msdu_end_wcn3990 {620__le32 ipv6_crc;621__le32 tcp_seq_no;622__le32 tcp_ack_no;623__le32 info1;624__le32 info2;625__le32 rule_indication_0;626__le32 rule_indication_1;627__le32 rule_indication_2;628__le32 rule_indication_3;629} __packed;630631struct rx_msdu_end {632struct rx_msdu_end_common common;633union {634struct rx_msdu_end_wcn3990 wcn3990;635} __packed;636} __packed;637638struct rx_msdu_end_v1 {639struct rx_msdu_end_common common;640union {641struct rx_msdu_end_qca99x0 qca99x0;642} __packed;643} __packed;644645/*646*ip_hdr_chksum647* This can include the IP header checksum or the pseudo header648* checksum used by TCP/UDP checksum.649*650*tcp_udp_chksum651* The value of the computed TCP/UDP checksum. A mode bit652* selects whether this checksum is the full checksum or the653* partial checksum which does not include the pseudo header.654*655*key_id_octet656* The key ID octet from the IV. Only valid when first_msdu is657* set.658*659*classification_filter660* Indicates the number classification filter rule661*662*ext_wapi_pn_63_48663* Extension PN (packet number) which is only used by WAPI.664* This corresponds to WAPI PN bits [63:48] (pn6 and pn7). The665* WAPI PN bits [63:0] are in the pn field of the rx_mpdu_start666* descriptor.667*668*ext_wapi_pn_95_64669* Extension PN (packet number) which is only used by WAPI.670* This corresponds to WAPI PN bits [95:64] (pn8, pn9, pn10 and671* pn11).672*673*ext_wapi_pn_127_96674* Extension PN (packet number) which is only used by WAPI.675* This corresponds to WAPI PN bits [127:96] (pn12, pn13, pn14,676* pn15).677*678*reported_mpdu_length679* MPDU length before decapsulation. Only valid when680* first_msdu is set. This field is taken directly from the681* length field of the A-MPDU delimiter or the preamble length682* field for non-A-MPDU frames.683*684*first_msdu685* Indicates the first MSDU of A-MSDU. If both first_msdu and686* last_msdu are set in the MSDU then this is a non-aggregated687* MSDU frame: normal MPDU. Interior MSDU in an A-MSDU shall688* have both first_mpdu and last_mpdu bits set to 0.689*690*last_msdu691* Indicates the last MSDU of the A-MSDU. MPDU end status is692* only valid when last_msdu is set.693*694*msdu_limit_error695* Indicates that the MSDU threshold was exceeded and thus696* all the rest of the MSDUs will not be scattered and697* will not be decapsulated but will be received in RAW format698* as a single MSDU buffer.699*700*reserved_3a701* Reserved: HW should fill with zero. FW should ignore.702*703*pre_delim_err704* Indicates that the first delimiter had a FCS failure. Only705* valid when first_mpdu and first_msdu are set.706*707*reserved_3b708* Reserved: HW should fill with zero. FW should ignore.709*/710711#define HTT_RX_PPDU_START_PREAMBLE_LEGACY 0x04712#define HTT_RX_PPDU_START_PREAMBLE_HT 0x08713#define HTT_RX_PPDU_START_PREAMBLE_HT_WITH_TXBF 0x09714#define HTT_RX_PPDU_START_PREAMBLE_VHT 0x0C715#define HTT_RX_PPDU_START_PREAMBLE_VHT_WITH_TXBF 0x0D716717#define RX_PPDU_START_INFO0_IS_GREENFIELD BIT(0)718719#define RX_PPDU_START_INFO1_L_SIG_RATE_MASK 0x0000000f720#define RX_PPDU_START_INFO1_L_SIG_RATE_LSB 0721#define RX_PPDU_START_INFO1_L_SIG_LENGTH_MASK 0x0001ffe0722#define RX_PPDU_START_INFO1_L_SIG_LENGTH_LSB 5723#define RX_PPDU_START_INFO1_L_SIG_TAIL_MASK 0x00fc0000724#define RX_PPDU_START_INFO1_L_SIG_TAIL_LSB 18725#define RX_PPDU_START_INFO1_PREAMBLE_TYPE_MASK 0xff000000726#define RX_PPDU_START_INFO1_PREAMBLE_TYPE_LSB 24727#define RX_PPDU_START_INFO1_L_SIG_RATE_SELECT BIT(4)728#define RX_PPDU_START_INFO1_L_SIG_PARITY BIT(17)729730#define RX_PPDU_START_INFO2_HT_SIG_VHT_SIG_A_1_MASK 0x00ffffff731#define RX_PPDU_START_INFO2_HT_SIG_VHT_SIG_A_1_LSB 0732733#define RX_PPDU_START_INFO3_HT_SIG_VHT_SIG_A_2_MASK 0x00ffffff734#define RX_PPDU_START_INFO3_HT_SIG_VHT_SIG_A_2_LSB 0735#define RX_PPDU_START_INFO3_TXBF_H_INFO BIT(24)736737#define RX_PPDU_START_INFO4_VHT_SIG_B_MASK 0x1fffffff738#define RX_PPDU_START_INFO4_VHT_SIG_B_LSB 0739740#define RX_PPDU_START_INFO5_SERVICE_MASK 0x0000ffff741#define RX_PPDU_START_INFO5_SERVICE_LSB 0742743/* No idea what this flag means. It seems to be always set in rate. */744#define RX_PPDU_START_RATE_FLAG BIT(3)745746struct rx_ppdu_start {747struct {748u8 pri20_mhz;749u8 ext20_mhz;750u8 ext40_mhz;751u8 ext80_mhz;752} rssi_chains[4];753u8 rssi_comb;754__le16 rsvd0;755u8 info0; /* %RX_PPDU_START_INFO0_ */756__le32 info1; /* %RX_PPDU_START_INFO1_ */757__le32 info2; /* %RX_PPDU_START_INFO2_ */758__le32 info3; /* %RX_PPDU_START_INFO3_ */759__le32 info4; /* %RX_PPDU_START_INFO4_ */760__le32 info5; /* %RX_PPDU_START_INFO5_ */761} __packed;762763/*764* rssi_chain0_pri20765* RSSI of RX PPDU on chain 0 of primary 20 MHz bandwidth.766* Value of 0x80 indicates invalid.767*768* rssi_chain0_sec20769* RSSI of RX PPDU on chain 0 of secondary 20 MHz bandwidth.770* Value of 0x80 indicates invalid.771*772* rssi_chain0_sec40773* RSSI of RX PPDU on chain 0 of secondary 40 MHz bandwidth.774* Value of 0x80 indicates invalid.775*776* rssi_chain0_sec80777* RSSI of RX PPDU on chain 0 of secondary 80 MHz bandwidth.778* Value of 0x80 indicates invalid.779*780* rssi_chain1_pri20781* RSSI of RX PPDU on chain 1 of primary 20 MHz bandwidth.782* Value of 0x80 indicates invalid.783*784* rssi_chain1_sec20785* RSSI of RX PPDU on chain 1 of secondary 20 MHz bandwidth.786* Value of 0x80 indicates invalid.787*788* rssi_chain1_sec40789* RSSI of RX PPDU on chain 1 of secondary 40 MHz bandwidth.790* Value of 0x80 indicates invalid.791*792* rssi_chain1_sec80793* RSSI of RX PPDU on chain 1 of secondary 80 MHz bandwidth.794* Value of 0x80 indicates invalid.795*796* rssi_chain2_pri20797* RSSI of RX PPDU on chain 2 of primary 20 MHz bandwidth.798* Value of 0x80 indicates invalid.799*800* rssi_chain2_sec20801* RSSI of RX PPDU on chain 2 of secondary 20 MHz bandwidth.802* Value of 0x80 indicates invalid.803*804* rssi_chain2_sec40805* RSSI of RX PPDU on chain 2 of secondary 40 MHz bandwidth.806* Value of 0x80 indicates invalid.807*808* rssi_chain2_sec80809* RSSI of RX PPDU on chain 2 of secondary 80 MHz bandwidth.810* Value of 0x80 indicates invalid.811*812* rssi_chain3_pri20813* RSSI of RX PPDU on chain 3 of primary 20 MHz bandwidth.814* Value of 0x80 indicates invalid.815*816* rssi_chain3_sec20817* RSSI of RX PPDU on chain 3 of secondary 20 MHz bandwidth.818* Value of 0x80 indicates invalid.819*820* rssi_chain3_sec40821* RSSI of RX PPDU on chain 3 of secondary 40 MHz bandwidth.822* Value of 0x80 indicates invalid.823*824* rssi_chain3_sec80825* RSSI of RX PPDU on chain 3 of secondary 80 MHz bandwidth.826* Value of 0x80 indicates invalid.827*828* rssi_comb829* The combined RSSI of RX PPDU of all active chains and830* bandwidths. Value of 0x80 indicates invalid.831*832* reserved_4a833* Reserved: HW should fill with 0, FW should ignore.834*835* is_greenfield836* Do we really support this?837*838* reserved_4b839* Reserved: HW should fill with 0, FW should ignore.840*841* l_sig_rate842* If l_sig_rate_select is 0:843* 0x8: OFDM 48 Mbps844* 0x9: OFDM 24 Mbps845* 0xA: OFDM 12 Mbps846* 0xB: OFDM 6 Mbps847* 0xC: OFDM 54 Mbps848* 0xD: OFDM 36 Mbps849* 0xE: OFDM 18 Mbps850* 0xF: OFDM 9 Mbps851* If l_sig_rate_select is 1:852* 0x8: CCK 11 Mbps long preamble853* 0x9: CCK 5.5 Mbps long preamble854* 0xA: CCK 2 Mbps long preamble855* 0xB: CCK 1 Mbps long preamble856* 0xC: CCK 11 Mbps short preamble857* 0xD: CCK 5.5 Mbps short preamble858* 0xE: CCK 2 Mbps short preamble859*860* l_sig_rate_select861* Legacy signal rate select. If set then l_sig_rate indicates862* CCK rates. If clear then l_sig_rate indicates OFDM rates.863*864* l_sig_length865* Length of legacy frame in octets.866*867* l_sig_parity868* Odd parity over l_sig_rate and l_sig_length869*870* l_sig_tail871* Tail bits for Viterbi decoder872*873* preamble_type874* Indicates the type of preamble ahead:875* 0x4: Legacy (OFDM/CCK)876* 0x8: HT877* 0x9: HT with TxBF878* 0xC: VHT879* 0xD: VHT with TxBF880* 0x80 - 0xFF: Reserved for special baseband data types such881* as radar and spectral scan.882*883* ht_sig_vht_sig_a_1884* If preamble_type == 0x8 or 0x9885* HT-SIG (first 24 bits)886* If preamble_type == 0xC or 0xD887* VHT-SIG A (first 24 bits)888* Else889* Reserved890*891* reserved_6892* Reserved: HW should fill with 0, FW should ignore.893*894* ht_sig_vht_sig_a_2895* If preamble_type == 0x8 or 0x9896* HT-SIG (last 24 bits)897* If preamble_type == 0xC or 0xD898* VHT-SIG A (last 24 bits)899* Else900* Reserved901*902* txbf_h_info903* Indicates that the packet data carries H information which904* is used for TxBF debug.905*906* reserved_7907* Reserved: HW should fill with 0, FW should ignore.908*909* vht_sig_b910* WiFi 1.0 and WiFi 2.0 will likely have this field to be all911* 0s since the BB does not plan on decoding VHT SIG-B.912*913* reserved_8914* Reserved: HW should fill with 0, FW should ignore.915*916* service917* Service field from BB for OFDM, HT and VHT packets. CCK918* packets will have service field of 0.919*920* reserved_9921* Reserved: HW should fill with 0, FW should ignore.922*/923924#define RX_PPDU_END_FLAGS_PHY_ERR BIT(0)925#define RX_PPDU_END_FLAGS_RX_LOCATION BIT(1)926#define RX_PPDU_END_FLAGS_TXBF_H_INFO BIT(2)927928#define RX_PPDU_END_INFO0_RX_ANTENNA_MASK 0x00ffffff929#define RX_PPDU_END_INFO0_RX_ANTENNA_LSB 0930#define RX_PPDU_END_INFO0_FLAGS_TX_HT_VHT_ACK BIT(24)931#define RX_PPDU_END_INFO0_BB_CAPTURED_CHANNEL BIT(25)932933#define RX_PPDU_END_INFO1_PEER_IDX_MASK 0x1ffc934#define RX_PPDU_END_INFO1_PEER_IDX_LSB 2935#define RX_PPDU_END_INFO1_BB_DATA BIT(0)936#define RX_PPDU_END_INFO1_PEER_IDX_VALID BIT(1)937#define RX_PPDU_END_INFO1_PPDU_DONE BIT(15)938939struct rx_ppdu_end_common {940__le32 evm_p0;941__le32 evm_p1;942__le32 evm_p2;943__le32 evm_p3;944__le32 evm_p4;945__le32 evm_p5;946__le32 evm_p6;947__le32 evm_p7;948__le32 evm_p8;949__le32 evm_p9;950__le32 evm_p10;951__le32 evm_p11;952__le32 evm_p12;953__le32 evm_p13;954__le32 evm_p14;955__le32 evm_p15;956__le32 tsf_timestamp;957__le32 wb_timestamp;958} __packed;959960struct rx_ppdu_end_qca988x {961u8 locationing_timestamp;962u8 phy_err_code;963__le16 flags; /* %RX_PPDU_END_FLAGS_ */964__le32 info0; /* %RX_PPDU_END_INFO0_ */965__le16 bb_length;966__le16 info1; /* %RX_PPDU_END_INFO1_ */967} __packed;968969#define RX_PPDU_END_RTT_CORRELATION_VALUE_MASK 0x00ffffff970#define RX_PPDU_END_RTT_CORRELATION_VALUE_LSB 0971#define RX_PPDU_END_RTT_UNUSED_MASK 0x7f000000972#define RX_PPDU_END_RTT_UNUSED_LSB 24973#define RX_PPDU_END_RTT_NORMAL_MODE BIT(31)974975struct rx_ppdu_end_qca6174 {976u8 locationing_timestamp;977u8 phy_err_code;978__le16 flags; /* %RX_PPDU_END_FLAGS_ */979__le32 info0; /* %RX_PPDU_END_INFO0_ */980__le32 rtt; /* %RX_PPDU_END_RTT_ */981__le16 bb_length;982__le16 info1; /* %RX_PPDU_END_INFO1_ */983} __packed;984985#define RX_PKT_END_INFO0_RX_SUCCESS BIT(0)986#define RX_PKT_END_INFO0_ERR_TX_INTERRUPT_RX BIT(3)987#define RX_PKT_END_INFO0_ERR_OFDM_POWER_DROP BIT(4)988#define RX_PKT_END_INFO0_ERR_OFDM_RESTART BIT(5)989#define RX_PKT_END_INFO0_ERR_CCK_POWER_DROP BIT(6)990#define RX_PKT_END_INFO0_ERR_CCK_RESTART BIT(7)991992#define RX_LOCATION_INFO_RTT_CORR_VAL_MASK 0x0001ffff993#define RX_LOCATION_INFO_RTT_CORR_VAL_LSB 0994#define RX_LOCATION_INFO_FAC_STATUS_MASK 0x000c0000995#define RX_LOCATION_INFO_FAC_STATUS_LSB 18996#define RX_LOCATION_INFO_PKT_BW_MASK 0x00700000997#define RX_LOCATION_INFO_PKT_BW_LSB 20998#define RX_LOCATION_INFO_RTT_TX_FRAME_PHASE_MASK 0x01800000999#define RX_LOCATION_INFO_RTT_TX_FRAME_PHASE_LSB 231000#define RX_LOCATION_INFO_CIR_STATUS BIT(17)1001#define RX_LOCATION_INFO_RTT_MAC_PHY_PHASE BIT(25)1002#define RX_LOCATION_INFO_RTT_TX_DATA_START_X BIT(26)1003#define RX_LOCATION_INFO_HW_IFFT_MODE BIT(30)1004#define RX_LOCATION_INFO_RX_LOCATION_VALID BIT(31)10051006struct rx_pkt_end {1007__le32 info0; /* %RX_PKT_END_INFO0_ */1008__le32 phy_timestamp_1;1009__le32 phy_timestamp_2;1010} __packed;10111012struct rx_pkt_end_wcn3990 {1013__le32 info0; /* %RX_PKT_END_INFO0_ */1014__le64 phy_timestamp_1;1015__le64 phy_timestamp_2;1016} __packed;10171018#define RX_LOCATION_INFO0_RTT_FAC_LEGACY_MASK 0x00003fff1019#define RX_LOCATION_INFO0_RTT_FAC_LEGACY_LSB 01020#define RX_LOCATION_INFO0_RTT_FAC_VHT_MASK 0x1fff80001021#define RX_LOCATION_INFO0_RTT_FAC_VHT_LSB 151022#define RX_LOCATION_INFO0_RTT_STRONGEST_CHAIN_MASK 0xc00000001023#define RX_LOCATION_INFO0_RTT_STRONGEST_CHAIN_LSB 301024#define RX_LOCATION_INFO0_RTT_FAC_LEGACY_STATUS BIT(14)1025#define RX_LOCATION_INFO0_RTT_FAC_VHT_STATUS BIT(29)10261027#define RX_LOCATION_INFO1_RTT_PREAMBLE_TYPE_MASK 0x0000000c1028#define RX_LOCATION_INFO1_RTT_PREAMBLE_TYPE_LSB 21029#define RX_LOCATION_INFO1_PKT_BW_MASK 0x000000301030#define RX_LOCATION_INFO1_PKT_BW_LSB 41031#define RX_LOCATION_INFO1_SKIP_P_SKIP_BTCF_MASK 0x0000ff001032#define RX_LOCATION_INFO1_SKIP_P_SKIP_BTCF_LSB 81033#define RX_LOCATION_INFO1_RTT_MSC_RATE_MASK 0x000f00001034#define RX_LOCATION_INFO1_RTT_MSC_RATE_LSB 161035#define RX_LOCATION_INFO1_RTT_PBD_LEG_BW_MASK 0x003000001036#define RX_LOCATION_INFO1_RTT_PBD_LEG_BW_LSB 201037#define RX_LOCATION_INFO1_TIMING_BACKOFF_MASK 0x07c000001038#define RX_LOCATION_INFO1_TIMING_BACKOFF_LSB 221039#define RX_LOCATION_INFO1_RTT_TX_FRAME_PHASE_MASK 0x180000001040#define RX_LOCATION_INFO1_RTT_TX_FRAME_PHASE_LSB 271041#define RX_LOCATION_INFO1_RTT_CFR_STATUS BIT(0)1042#define RX_LOCATION_INFO1_RTT_CIR_STATUS BIT(1)1043#define RX_LOCATION_INFO1_RTT_GI_TYPE BIT(7)1044#define RX_LOCATION_INFO1_RTT_MAC_PHY_PHASE BIT(29)1045#define RX_LOCATION_INFO1_RTT_TX_DATA_START_X_PHASE BIT(30)1046#define RX_LOCATION_INFO1_RX_LOCATION_VALID BIT(31)10471048struct rx_location_info {1049__le32 rx_location_info0; /* %RX_LOCATION_INFO0_ */1050__le32 rx_location_info1; /* %RX_LOCATION_INFO1_ */1051} __packed;10521053struct rx_location_info_wcn3990 {1054__le32 rx_location_info0; /* %RX_LOCATION_INFO0_ */1055__le32 rx_location_info1; /* %RX_LOCATION_INFO1_ */1056__le32 rx_location_info2; /* %RX_LOCATION_INFO2_ */1057} __packed;10581059enum rx_phy_ppdu_end_info0 {1060RX_PHY_PPDU_END_INFO0_ERR_RADAR = BIT(2),1061RX_PHY_PPDU_END_INFO0_ERR_RX_ABORT = BIT(3),1062RX_PHY_PPDU_END_INFO0_ERR_RX_NAP = BIT(4),1063RX_PHY_PPDU_END_INFO0_ERR_OFDM_TIMING = BIT(5),1064RX_PHY_PPDU_END_INFO0_ERR_OFDM_PARITY = BIT(6),1065RX_PHY_PPDU_END_INFO0_ERR_OFDM_RATE = BIT(7),1066RX_PHY_PPDU_END_INFO0_ERR_OFDM_LENGTH = BIT(8),1067RX_PHY_PPDU_END_INFO0_ERR_OFDM_RESTART = BIT(9),1068RX_PHY_PPDU_END_INFO0_ERR_OFDM_SERVICE = BIT(10),1069RX_PHY_PPDU_END_INFO0_ERR_OFDM_POWER_DROP = BIT(11),1070RX_PHY_PPDU_END_INFO0_ERR_CCK_BLOCKER = BIT(12),1071RX_PHY_PPDU_END_INFO0_ERR_CCK_TIMING = BIT(13),1072RX_PHY_PPDU_END_INFO0_ERR_CCK_HEADER_CRC = BIT(14),1073RX_PHY_PPDU_END_INFO0_ERR_CCK_RATE = BIT(15),1074RX_PHY_PPDU_END_INFO0_ERR_CCK_LENGTH = BIT(16),1075RX_PHY_PPDU_END_INFO0_ERR_CCK_RESTART = BIT(17),1076RX_PHY_PPDU_END_INFO0_ERR_CCK_SERVICE = BIT(18),1077RX_PHY_PPDU_END_INFO0_ERR_CCK_POWER_DROP = BIT(19),1078RX_PHY_PPDU_END_INFO0_ERR_HT_CRC = BIT(20),1079RX_PHY_PPDU_END_INFO0_ERR_HT_LENGTH = BIT(21),1080RX_PHY_PPDU_END_INFO0_ERR_HT_RATE = BIT(22),1081RX_PHY_PPDU_END_INFO0_ERR_HT_ZLF = BIT(23),1082RX_PHY_PPDU_END_INFO0_ERR_FALSE_RADAR_EXT = BIT(24),1083RX_PHY_PPDU_END_INFO0_ERR_GREEN_FIELD = BIT(25),1084RX_PHY_PPDU_END_INFO0_ERR_SPECTRAL_SCAN = BIT(26),1085RX_PHY_PPDU_END_INFO0_ERR_RX_DYN_BW = BIT(27),1086RX_PHY_PPDU_END_INFO0_ERR_LEG_HT_MISMATCH = BIT(28),1087RX_PHY_PPDU_END_INFO0_ERR_VHT_CRC = BIT(29),1088RX_PHY_PPDU_END_INFO0_ERR_VHT_SIGA = BIT(30),1089RX_PHY_PPDU_END_INFO0_ERR_VHT_LSIG = BIT(31),1090};10911092enum rx_phy_ppdu_end_info1 {1093RX_PHY_PPDU_END_INFO1_ERR_VHT_NDP = BIT(0),1094RX_PHY_PPDU_END_INFO1_ERR_VHT_NSYM = BIT(1),1095RX_PHY_PPDU_END_INFO1_ERR_VHT_RX_EXT_SYM = BIT(2),1096RX_PHY_PPDU_END_INFO1_ERR_VHT_RX_SKIP_ID0 = BIT(3),1097RX_PHY_PPDU_END_INFO1_ERR_VHT_RX_SKIP_ID1_62 = BIT(4),1098RX_PHY_PPDU_END_INFO1_ERR_VHT_RX_SKIP_ID63 = BIT(5),1099RX_PHY_PPDU_END_INFO1_ERR_OFDM_LDPC_DECODER = BIT(6),1100RX_PHY_PPDU_END_INFO1_ERR_DEFER_NAP = BIT(7),1101RX_PHY_PPDU_END_INFO1_ERR_FDOMAIN_TIMEOUT = BIT(8),1102RX_PHY_PPDU_END_INFO1_ERR_LSIG_REL_CHECK = BIT(9),1103RX_PHY_PPDU_END_INFO1_ERR_BT_COLLISION = BIT(10),1104RX_PHY_PPDU_END_INFO1_ERR_MU_FEEDBACK = BIT(11),1105RX_PHY_PPDU_END_INFO1_ERR_TX_INTERRUPT_RX = BIT(12),1106RX_PHY_PPDU_END_INFO1_ERR_RX_CBF = BIT(13),1107};11081109struct rx_phy_ppdu_end {1110__le32 info0; /* %RX_PHY_PPDU_END_INFO0_ */1111__le32 info1; /* %RX_PHY_PPDU_END_INFO1_ */1112} __packed;11131114#define RX_PPDU_END_RX_TIMING_OFFSET_MASK 0x00000fff1115#define RX_PPDU_END_RX_TIMING_OFFSET_LSB 011161117#define RX_PPDU_END_RX_INFO_RX_ANTENNA_MASK 0x00ffffff1118#define RX_PPDU_END_RX_INFO_RX_ANTENNA_LSB 01119#define RX_PPDU_END_RX_INFO_TX_HT_VHT_ACK BIT(24)1120#define RX_PPDU_END_RX_INFO_RX_PKT_END_VALID BIT(25)1121#define RX_PPDU_END_RX_INFO_RX_PHY_PPDU_END_VALID BIT(26)1122#define RX_PPDU_END_RX_INFO_RX_TIMING_OFFSET_VALID BIT(27)1123#define RX_PPDU_END_RX_INFO_BB_CAPTURED_CHANNEL BIT(28)1124#define RX_PPDU_END_RX_INFO_UNSUPPORTED_MU_NC BIT(29)1125#define RX_PPDU_END_RX_INFO_OTP_TXBF_DISABLE BIT(30)11261127struct rx_ppdu_end_qca99x0 {1128struct rx_pkt_end rx_pkt_end;1129__le32 rx_location_info; /* %RX_LOCATION_INFO_ */1130struct rx_phy_ppdu_end rx_phy_ppdu_end;1131__le32 rx_timing_offset; /* %RX_PPDU_END_RX_TIMING_OFFSET_ */1132__le32 rx_info; /* %RX_PPDU_END_RX_INFO_ */1133__le16 bb_length;1134__le16 info1; /* %RX_PPDU_END_INFO1_ */1135} __packed;11361137struct rx_ppdu_end_qca9984 {1138struct rx_pkt_end rx_pkt_end;1139struct rx_location_info rx_location_info;1140struct rx_phy_ppdu_end rx_phy_ppdu_end;1141__le32 rx_timing_offset; /* %RX_PPDU_END_RX_TIMING_OFFSET_ */1142__le32 rx_info; /* %RX_PPDU_END_RX_INFO_ */1143__le16 bb_length;1144__le16 info1; /* %RX_PPDU_END_INFO1_ */1145} __packed;11461147struct rx_ppdu_end_wcn3990 {1148struct rx_pkt_end_wcn3990 rx_pkt_end;1149struct rx_location_info_wcn3990 rx_location_info;1150struct rx_phy_ppdu_end rx_phy_ppdu_end;1151__le32 rx_timing_offset;1152__le32 reserved_info_0;1153__le32 reserved_info_1;1154__le32 rx_antenna_info;1155__le32 rx_coex_info;1156__le32 rx_mpdu_cnt_info;1157__le64 phy_timestamp_tx;1158__le32 rx_bb_length;1159} __packed;11601161struct rx_ppdu_end {1162struct rx_ppdu_end_common common;1163union {1164struct rx_ppdu_end_wcn3990 wcn3990;1165} __packed;1166} __packed;11671168struct rx_ppdu_end_v1 {1169struct rx_ppdu_end_common common;1170union {1171struct rx_ppdu_end_qca988x qca988x;1172struct rx_ppdu_end_qca6174 qca6174;1173struct rx_ppdu_end_qca99x0 qca99x0;1174struct rx_ppdu_end_qca9984 qca9984;1175} __packed;1176} __packed;11771178/*1179* evm_p01180* EVM for pilot 0. Contain EVM for streams: 0, 1, 2 and 3.1181*1182* evm_p11183* EVM for pilot 1. Contain EVM for streams: 0, 1, 2 and 3.1184*1185* evm_p21186* EVM for pilot 2. Contain EVM for streams: 0, 1, 2 and 3.1187*1188* evm_p31189* EVM for pilot 3. Contain EVM for streams: 0, 1, 2 and 3.1190*1191* evm_p41192* EVM for pilot 4. Contain EVM for streams: 0, 1, 2 and 3.1193*1194* evm_p51195* EVM for pilot 5. Contain EVM for streams: 0, 1, 2 and 3.1196*1197* evm_p61198* EVM for pilot 6. Contain EVM for streams: 0, 1, 2 and 3.1199*1200* evm_p71201* EVM for pilot 7. Contain EVM for streams: 0, 1, 2 and 3.1202*1203* evm_p81204* EVM for pilot 8. Contain EVM for streams: 0, 1, 2 and 3.1205*1206* evm_p91207* EVM for pilot 9. Contain EVM for streams: 0, 1, 2 and 3.1208*1209* evm_p101210* EVM for pilot 10. Contain EVM for streams: 0, 1, 2 and 3.1211*1212* evm_p111213* EVM for pilot 11. Contain EVM for streams: 0, 1, 2 and 3.1214*1215* evm_p121216* EVM for pilot 12. Contain EVM for streams: 0, 1, 2 and 3.1217*1218* evm_p131219* EVM for pilot 13. Contain EVM for streams: 0, 1, 2 and 3.1220*1221* evm_p141222* EVM for pilot 14. Contain EVM for streams: 0, 1, 2 and 3.1223*1224* evm_p151225* EVM for pilot 15. Contain EVM for streams: 0, 1, 2 and 3.1226*1227* tsf_timestamp1228* Receive TSF timestamp sampled on the rising edge of1229* rx_clear. For PHY errors this may be the current TSF when1230* phy_error is asserted if the rx_clear does not assert before1231* the end of the PHY error.1232*1233* wb_timestamp1234* WLAN/BT timestamp is a 1 usec resolution timestamp which1235* does not get updated based on receive beacon like TSF. The1236* same rules for capturing tsf_timestamp are used to capture1237* the wb_timestamp.1238*1239* locationing_timestamp1240* Timestamp used for locationing. This timestamp is used to1241* indicate fractions of usec. For example if the MAC clock is1242* running at 80 MHz, the timestamp will increment every 12.51243* nsec. The value starts at 0 and increments to 79 and1244* returns to 0 and repeats. This information is valid for1245* every PPDU. This information can be used in conjunction1246* with wb_timestamp to capture large delta times.1247*1248* phy_err_code1249* See the 1.10.8.1.2 for the list of the PHY error codes.1250*1251* phy_err1252* Indicates a PHY error was detected for this PPDU.1253*1254* rx_location1255* Indicates that location information was requested.1256*1257* txbf_h_info1258* Indicates that the packet data carries H information which1259* is used for TxBF debug.1260*1261* reserved_181262* Reserved: HW should fill with 0, FW should ignore.1263*1264* rx_antenna1265* Receive antenna value1266*1267* tx_ht_vht_ack1268* Indicates that a HT or VHT Ack/BA frame was transmitted in1269* response to this receive packet.1270*1271* bb_captured_channel1272* Indicates that the BB has captured a channel dump. FW can1273* then read the channel dump memory. This may indicate that1274* the channel was captured either based on PCU setting the1275* capture_channel bit BB descriptor or FW setting the1276* capture_channel mode bit.1277*1278* reserved_191279* Reserved: HW should fill with 0, FW should ignore.1280*1281* bb_length1282* Indicates the number of bytes of baseband information for1283* PPDUs where the BB descriptor preamble type is 0x80 to 0xFF1284* which indicates that this is not a normal PPDU but rather1285* contains baseband debug information.1286*1287* reserved_201288* Reserved: HW should fill with 0, FW should ignore.1289*1290* ppdu_done1291* PPDU end status is only valid when ppdu_done bit is set.1292* Every time HW sets this bit in memory FW/SW must clear this1293* bit in memory. FW will initialize all the ppdu_done dword1294* to 0.1295*/12961297#define FW_RX_DESC_INFO0_DISCARD BIT(0)1298#define FW_RX_DESC_INFO0_FORWARD BIT(1)1299#define FW_RX_DESC_INFO0_INSPECT BIT(5)1300#define FW_RX_DESC_INFO0_EXT_MASK 0xC01301#define FW_RX_DESC_INFO0_EXT_LSB 613021303struct fw_rx_desc_base {1304u8 info0;1305} __packed;13061307#define FW_RX_DESC_FLAGS_FIRST_MSDU (1 << 0)1308#define FW_RX_DESC_FLAGS_LAST_MSDU (1 << 1)1309#define FW_RX_DESC_C3_FAILED (1 << 2)1310#define FW_RX_DESC_C4_FAILED (1 << 3)1311#define FW_RX_DESC_IPV6 (1 << 4)1312#define FW_RX_DESC_TCP (1 << 5)1313#define FW_RX_DESC_UDP (1 << 6)13141315struct fw_rx_desc_hl {1316union {1317struct {1318u8 discard:1,1319forward:1,1320any_err:1,1321dup_err:1,1322reserved:1,1323inspect:1,1324extension:2;1325} bits;1326u8 info0;1327} u;13281329u8 version;1330u8 len;1331u8 flags;1332} __packed;13331334#endif /* _RX_DESC_H_ */133513361337