Lines Matching +full:hw +full:- +full:gro
1 /* SPDX-License-Identifier: ISC */
3 * Copyright (c) 2012-2016 Qualcomm Atheros, Inc.
4 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
26 return le32_to_cpu(addr->addr_low) | in wil_desc_addr()
27 ((u64)le16_to_cpu(addr->addr_high) << 32); in wil_desc_addr()
33 addr->addr_low = cpu_to_le32(lower_32_bits(pa)); in wil_desc_addr_set()
34 addr->addr_high = cpu_to_le16((u16)upper_32_bits(pa)); in wil_desc_addr_set()
37 /* Tx descriptor - MAC part
66 * bit 18..19 : l2_translation_type:2 00 - bypass, 01 - 802.3, 10 - 802.11
229 #define DMA_CFG_DESC_TX_0_L4_TYPE_MSK 0xC0000000 /* L4 type: 0-UDP, 2-TCP */
237 #define DMA_CFG_DESC_TX_OFFLOAD_CFG_L3T_IPV4_MSK 0x80 /* 1-IPv4, 0-IPv6 */
241 /* Tx descriptor - DMA part
247 * bit 11..12 : SBD - Segment Buffer Details
248 * 00 - Header Segment
249 * 01 - First Data Segment
250 * 10 - Medium Data Segment
251 * 11 - Last Data Segment
252 * bit 13 : TSE - TCP Segmentation Enable
253 * bit 14 : IIC - Directs the HW to Insert IPv4 Checksum
254 * bit 15 : ITC - Directs the HW to Insert TCP/UDP Checksum
255 * bit 16..20 : QID - The target QID that the packet should be stored
257 * bit 21 : PO - Pseudo header Offload:
258 * 0 - Use the pseudo header value from the TCP checksum field
259 * 1- Calculate Pseudo header Checksum
260 * bit 22 : NC - No UDP Checksum
262 * bit 30..31 : L4T - Layer 4 Type: 00 - UDP , 10 - TCP , 10, 11 - Reserved
271 * bit 31 : ip_version:1 1 - IPv4, 0 - IPv6
291 /* TSO type used in dma descriptor d0 bits 11-12 */
299 /* Rx descriptor - MAC part
301 * bit 0.. 3 : tid:4 The QoS (b3-0) TID Field
306 * bit 10..11 : frame_type:2 : The FC (b3-2) - MPDU Type
308 * bit 12..15 : frame_subtype:4 : The FC (b7-4) - Frame Subtype
316 * bit 8.. 9 : ds_bits:2 FC (b9-8)
331 * bit 3.. 4 : fc_protocol_ver:1 The FC (b1-0) - Protocol Version
332 * bit 5 : fc_order:1 The FC Control (b15) -Order
333 * bit 6.. 7 : qos_ack_policy:2 The QoS (b6-5) ack policy Field
336 * bit 10..14 : qos_reserved:5 The QoS (b14-10) Reserved field
352 /* Rx descriptor - DMA part
361 * When the FFM bit is set bits 29-27 are used for
365 * 00 - UDP, 01 - TCP, 10, 11 - reserved
372 * bit 31 : ip_version:1 1 - IPv4, 0 - IPv6
417 /* IEEE 802.11, 8.5.2 EAPOL-Key frames */
506 return WIL_GET_BITS(d->mac.d0, 0, 3); in wil_rxdesc_tid()
511 return WIL_GET_BITS(d->mac.d0, 4, 6); in wil_rxdesc_cid()
516 return (d->mac.d0 & RX_MAC_D0_MAC_ID_VALID) ? in wil_rxdesc_mid()
517 WIL_GET_BITS(d->mac.d0, 8, 9) : 0; in wil_rxdesc_mid()
522 return WIL_GET_BITS(d->mac.d0, 10, 11); in wil_rxdesc_ftype()
527 return WIL_GET_BITS(d->mac.d0, 12, 15); in wil_rxdesc_subtype()
530 /* 1-st byte (with frame type/subtype) of FC field */
533 return (u8)(WIL_GET_BITS(d->mac.d0, 10, 15) << 2); in wil_rxdesc_fc1()
538 return WIL_GET_BITS(d->mac.d0, 16, 27); in wil_rxdesc_seq()
543 return WIL_GET_BITS(d->mac.d0, 28, 31); in wil_rxdesc_ext_subtype()
548 return WIL_GET_BITS(d->mac.d0, 31, 31); in wil_rxdesc_retry()
553 return WIL_GET_BITS(d->mac.d1, 4, 5); in wil_rxdesc_key_id()
558 return WIL_GET_BITS(d->mac.d1, 7, 7); in wil_rxdesc_security()
563 return WIL_GET_BITS(d->mac.d1, 8, 9); in wil_rxdesc_ds_bits()
568 return WIL_GET_BITS(d->mac.d1, 21, 24); in wil_rxdesc_mcs()
573 return WIL_GET_BITS(d->mac.d1, 13, 14); in wil_rxdesc_mcast()
578 return (void *)skb->cb; in wil_skb_rxdesc()
583 return ring->swhead == ring->swtail; in wil_ring_is_empty()
588 return (ring->swtail + 1) % ring->size; in wil_ring_next_tail()
593 ring->swhead = (ring->swhead + n) % ring->size; in wil_ring_advance_head()
598 return wil_ring_next_tail(ring) == ring->swhead; in wil_ring_is_full()
603 struct ethhdr *eth = (void *)skb->data; in wil_skb_get_da()
605 return eth->h_dest; in wil_skb_get_da()
610 struct ethhdr *eth = (void *)skb->data; in wil_skb_get_sa()
612 return eth->h_source; in wil_skb_get_sa()
619 return is_unicast_ether_addr(da) && skb->sk && in wil_need_txstat()
620 (skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS); in wil_need_txstat()
634 u32 swhead = ring->swhead; in wil_ring_used_tx()
635 u32 swtail = ring->swtail; in wil_ring_used_tx()
637 return (ring->size + swhead - swtail) % ring->size; in wil_ring_used_tx()
643 return ring->size - wil_ring_used_tx(ring) - 1; in wil_ring_avail_tx()
649 return wil->use_enhanced_dma_hw ? 1 : 0; in wil_get_min_tx_ring_id()
652 /* similar to ieee80211_ version, but FC contain only 1-st byte */
659 /* wil_val_in_range - check if value in [min,max) */
667 struct skb_rx_info *skb_rx_info = (void *)skb->cb; in wil_skb_get_cid()
669 return skb_rx_info->rx_info.cid; in wil_skb_get_cid()
674 struct skb_rx_info *skb_rx_info = (void *)skb->cb; in wil_skb_set_cid()
676 skb_rx_info->rx_info.cid = cid; in wil_skb_set_cid()
681 struct wil_net_stats *stats, bool gro);