/* SPDX-License-Identifier: ISC */ /* * Copyright (c) 2012-2016 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
*/
/* Tx descriptor - DMA part * [dword 0] * bit 0.. 7 : l4_length:8 layer 4 length * bit 8 : cmd_eop:1 This descriptor is the last one in the packet * bit 9 : reserved * bit 10 : cmd_dma_it:1 immediate interrupt * bit 11..12 : SBD - Segment Buffer Details * 00 - Header Segment * 01 - First Data Segment * 10 - Medium Data Segment * 11 - Last Data Segment * bit 13 : TSE - TCP Segmentation Enable * bit 14 : IIC - Directs the HW to Insert IPv4 Checksum * bit 15 : ITC - Directs the HW to Insert TCP/UDP Checksum * bit 16..20 : QID - The target QID that the packet should be stored * in the MAC. * bit 21 : PO - Pseudo header Offload: * 0 - Use the pseudo header value from the TCP checksum field * 1- Calculate Pseudo header Checksum * bit 22 : NC - No UDP Checksum * bit 23..29 : reserved * bit 30..31 : L4T - Layer 4 Type: 00 - UDP , 10 - TCP , 10, 11 - Reserved * If L4Len equal 0, no L4 at all * [dword 1] * bit 0..31 : addr_low:32 The payload buffer low address * [dword 2] * bit 0..15 : addr_high:16 The payload buffer high address * bit 16..23 : ip_length:8 The IP header length for the TX IP checksum * offload feature * bit 24..30 : mac_length:7 * bit 31 : ip_version:1 1 - IPv4, 0 - IPv6 * [dword 3] * [byte 12] error * bit 0 2 : mac_status:3 * bit 3 7 : reserved:5 * [byte 13] status * bit 0 : DU:1 Descriptor Used * bit 1 7 : reserved:7 * [word 7] length
*/ struct vring_tx_dma {
u32 d0; struct wil_ring_dma_addr addr;
u8 ip_length;
u8 b11; /* 0..6: mac_length; 7:ip_version */
u8 error; /* 0..2: err; 3..7: reserved; */
u8 status; /* 0: used; 1..7; reserved */
__le16 length;
} __packed;
/* TSO type used in dma descriptor d0 bits 11-12 */ enum {
wil_tso_type_hdr = 0,
wil_tso_type_first = 1,
wil_tso_type_mid = 2,
wil_tso_type_lst = 3,
};
/* Rx descriptor - MAC part * [dword 0] * bit 0.. 3 : tid:4 The QoS (b3-0) TID Field * bit 4.. 6 : cid:3 The Source index that was found during parsing the TA. * This field is used to define the source of the packet * bit 7 : MAC_id_valid:1, 1 if MAC virtual number is valid. * bit 8.. 9 : mid:2 The MAC virtual number * bit 10..11 : frame_type:2 : The FC (b3-2) - MPDU Type * (management, data, control and extension) * bit 12..15 : frame_subtype:4 : The FC (b7-4) - Frame Subtype * bit 16..27 : seq_number:12 The received Sequence number field * bit 28..31 : extended:4 extended subtype * [dword 1] * bit 0.. 3 : reserved * bit 4.. 5 : key_id:2 * bit 6 : decrypt_bypass:1 * bit 7 : security:1 FC (b14) * bit 8.. 9 : ds_bits:2 FC (b9-8) * bit 10 : a_msdu_present:1 QoS (b7) * bit 11 : a_msdu_type:1 QoS (b8) * bit 12 : a_mpdu:1 part of AMPDU aggregation * bit 13 : broadcast:1 * bit 14 : mutlicast:1 * bit 15 : reserved:1 * bit 16..20 : rx_mac_qid:5 The Queue Identifier that the packet * is received from * bit 21..24 : mcs:4 * bit 25..28 : mic_icr:4 this signal tells the DMA to assert an interrupt * after it writes the packet * bit 29..31 : reserved:3 * [dword 2] * bit 0.. 2 : time_slot:3 The timeslot that the MPDU is received * bit 3.. 4 : fc_protocol_ver:1 The FC (b1-0) - Protocol Version * bit 5 : fc_order:1 The FC Control (b15) -Order * bit 6.. 7 : qos_ack_policy:2 The QoS (b6-5) ack policy Field * bit 8 : esop:1 The QoS (b4) ESOP field * bit 9 : qos_rdg_more_ppdu:1 The QoS (b9) RDG field * bit 10..14 : qos_reserved:5 The QoS (b14-10) Reserved field * bit 15 : qos_ac_constraint:1 QoS (b15) * bit 16..31 : pn_15_0:16 low 2 bytes of PN * [dword 3] * bit 0..31 : pn_47_16:32 high 4 bytes of PN
*/ struct vring_rx_mac {
u32 d0;
u32 d1;
u16 w4;
struct_group_attr(pn, __packed,
u16 pn_15_0;
u32 pn_47_16;
);
} __packed;
/* Rx descriptor - DMA part * [dword 0] * bit 0.. 7 : l4_length:8 layer 4 length. The field is only valid if * L4I bit is set * bit 8 : cmd_eop:1 set to 1 * bit 9 : cmd_rt:1 set to 1 * bit 10 : cmd_dma_it:1 immediate interrupt * bit 11..15 : reserved:5 * bit 16..29 : phy_info_length:14 It is valid when the PII is set. * When the FFM bit is set bits 29-27 are used for * Flex Filter Match. Matching Index to one of the L2 * EtherType Flex Filter * bit 30..31 : l4_type:2 valid if the L4I bit is set in the status field * 00 - UDP, 01 - TCP, 10, 11 - reserved * [dword 1] * bit 0..31 : addr_low:32 The payload buffer low address * [dword 2] * bit 0..15 : addr_high:16 The payload buffer high address * bit 16..23 : ip_length:8 The filed is valid only if the L3I bit is set * bit 24..30 : mac_length:7 * bit 31 : ip_version:1 1 - IPv4, 0 - IPv6 * [dword 3] * [byte 12] error * bit 0 : FCS:1 * bit 1 : MIC:1 * bit 2 : Key miss:1 * bit 3 : Replay:1 * bit 4 : L3:1 IPv4 checksum * bit 5 : L4:1 TCP/UDP checksum * bit 6 7 : reserved:2 * [byte 13] status * bit 0 : DU:1 Descriptor Used * bit 1 : EOP:1 The descriptor indicates the End of Packet * bit 2 : error:1 * bit 3 : MI:1 MAC Interrupt is asserted (according to parser decision) * bit 4 : L3I:1 L3 identified and checksum calculated * bit 5 : L4I:1 L4 identified and checksum calculated * bit 6 : PII:1 PHY Info Included in the packet * bit 7 : FFM:1 EtherType Flex Filter Match * [word 7] length
*/
union wil_ring_desc { union wil_tx_desc tx; union wil_rx_desc rx;
} __packed;
struct packet_rx_info {
u8 cid;
};
/* this struct will be stored in the skb cb buffer * max length of the struct is limited to 48 bytes
*/ struct skb_rx_info { struct vring_rx_desc rx_desc; struct packet_rx_info rx_info;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.