#ifndef WIL6210_TXRX_H
#define WIL6210_TXRX_H
#include "wil6210.h"
#include "txrx_edma.h"
#define BUF_SW_OWNED …
#define BUF_HW_OWNED …
#define TXRX_BUF_LEN_DEFAULT …
#define WIL6210_RTAP_SIZE …
static inline dma_addr_t wil_desc_addr(struct wil_ring_dma_addr *addr)
{ … }
static inline void wil_desc_addr_set(struct wil_ring_dma_addr *addr,
dma_addr_t pa)
{ … }
struct vring_tx_mac { … } __packed;
#define MAC_CFG_DESC_TX_0_LIFETIME_EXPIRY_VALUE_POS …
#define MAC_CFG_DESC_TX_0_LIFETIME_EXPIRY_VALUE_LEN …
#define MAC_CFG_DESC_TX_0_LIFETIME_EXPIRY_VALUE_MSK …
#define MAC_CFG_DESC_TX_0_INTERRUP_EN_POS …
#define MAC_CFG_DESC_TX_0_INTERRUP_EN_LEN …
#define MAC_CFG_DESC_TX_0_INTERRUP_EN_MSK …
#define MAC_CFG_DESC_TX_0_STATUS_EN_POS …
#define MAC_CFG_DESC_TX_0_STATUS_EN_LEN …
#define MAC_CFG_DESC_TX_0_STATUS_EN_MSK …
#define MAC_CFG_DESC_TX_0_TXSS_OVERRIDE_POS …
#define MAC_CFG_DESC_TX_0_TXSS_OVERRIDE_LEN …
#define MAC_CFG_DESC_TX_0_TXSS_OVERRIDE_MSK …
#define MAC_CFG_DESC_TX_0_TIMESTAMP_INSERTION_POS …
#define MAC_CFG_DESC_TX_0_TIMESTAMP_INSERTION_LEN …
#define MAC_CFG_DESC_TX_0_TIMESTAMP_INSERTION_MSK …
#define MAC_CFG_DESC_TX_0_DURATION_PRESERVE_POS …
#define MAC_CFG_DESC_TX_0_DURATION_PRESERVE_LEN …
#define MAC_CFG_DESC_TX_0_DURATION_PRESERVE_MSK …
#define MAC_CFG_DESC_TX_0_MCS_INDEX_POS …
#define MAC_CFG_DESC_TX_0_MCS_INDEX_LEN …
#define MAC_CFG_DESC_TX_0_MCS_INDEX_MSK …
#define MAC_CFG_DESC_TX_0_MCS_EN_POS …
#define MAC_CFG_DESC_TX_0_MCS_EN_LEN …
#define MAC_CFG_DESC_TX_0_MCS_EN_MSK …
#define MAC_CFG_DESC_TX_0_SN_PRESERVED_POS …
#define MAC_CFG_DESC_TX_0_SN_PRESERVED_LEN …
#define MAC_CFG_DESC_TX_0_SN_PRESERVED_MSK …
#define MAC_CFG_DESC_TX_1_PKT_MODE_POS …
#define MAC_CFG_DESC_TX_1_PKT_MODE_LEN …
#define MAC_CFG_DESC_TX_1_PKT_MODE_MSK …
#define MAC_CFG_DESC_TX_1_PKT_MODE_EN_POS …
#define MAC_CFG_DESC_TX_1_PKT_MODE_EN_LEN …
#define MAC_CFG_DESC_TX_1_PKT_MODE_EN_MSK …
#define MAC_CFG_DESC_TX_1_MAC_ID_EN_POS …
#define MAC_CFG_DESC_TX_1_MAC_ID_EN_LEN …
#define MAC_CFG_DESC_TX_1_MAC_ID_EN_MSK …
#define MAC_CFG_DESC_TX_1_MAC_ID_POS …
#define MAC_CFG_DESC_TX_1_MAC_ID_LEN …
#define MAC_CFG_DESC_TX_1_MAC_ID_MSK …
#define MAC_CFG_DESC_TX_1_ACK_POLICY_EN_POS …
#define MAC_CFG_DESC_TX_1_ACK_POLICY_EN_LEN …
#define MAC_CFG_DESC_TX_1_ACK_POLICY_EN_MSK …
#define MAC_CFG_DESC_TX_1_DST_INDEX_POS …
#define MAC_CFG_DESC_TX_1_DST_INDEX_LEN …
#define MAC_CFG_DESC_TX_1_DST_INDEX_MSK …
#define MAC_CFG_DESC_TX_1_DST_INDEX_EN_POS …
#define MAC_CFG_DESC_TX_1_DST_INDEX_EN_LEN …
#define MAC_CFG_DESC_TX_1_DST_INDEX_EN_MSK …
#define MAC_CFG_DESC_TX_1_ACK_POLICY_POS …
#define MAC_CFG_DESC_TX_1_ACK_POLICY_LEN …
#define MAC_CFG_DESC_TX_1_ACK_POLICY_MSK …
#define MAC_CFG_DESC_TX_1_LIFETIME_EN_POS …
#define MAC_CFG_DESC_TX_1_LIFETIME_EN_LEN …
#define MAC_CFG_DESC_TX_1_LIFETIME_EN_MSK …
#define MAC_CFG_DESC_TX_1_MAX_RETRY_POS …
#define MAC_CFG_DESC_TX_1_MAX_RETRY_LEN …
#define MAC_CFG_DESC_TX_1_MAX_RETRY_MSK …
#define MAC_CFG_DESC_TX_1_MAX_RETRY_EN_POS …
#define MAC_CFG_DESC_TX_1_MAX_RETRY_EN_LEN …
#define MAC_CFG_DESC_TX_1_MAX_RETRY_EN_MSK …
#define MAC_CFG_DESC_TX_2_NUM_OF_DESCRIPTORS_POS …
#define MAC_CFG_DESC_TX_2_NUM_OF_DESCRIPTORS_LEN …
#define MAC_CFG_DESC_TX_2_NUM_OF_DESCRIPTORS_MSK …
#define MAC_CFG_DESC_TX_2_RESERVED_POS …
#define MAC_CFG_DESC_TX_2_RESERVED_LEN …
#define MAC_CFG_DESC_TX_2_RESERVED_MSK …
#define MAC_CFG_DESC_TX_2_L2_TRANSLATION_TYPE_POS …
#define MAC_CFG_DESC_TX_2_L2_TRANSLATION_TYPE_LEN …
#define MAC_CFG_DESC_TX_2_L2_TRANSLATION_TYPE_MSK …
#define MAC_CFG_DESC_TX_2_SNAP_HDR_INSERTION_EN_POS …
#define MAC_CFG_DESC_TX_2_SNAP_HDR_INSERTION_EN_LEN …
#define MAC_CFG_DESC_TX_2_SNAP_HDR_INSERTION_EN_MSK …
#define MAC_CFG_DESC_TX_2_VLAN_REMOVAL_EN_POS …
#define MAC_CFG_DESC_TX_2_VLAN_REMOVAL_EN_LEN …
#define MAC_CFG_DESC_TX_2_VLAN_REMOVAL_EN_MSK …
#define MAC_CFG_DESC_TX_3_UCODE_CMD_POS …
#define MAC_CFG_DESC_TX_3_UCODE_CMD_LEN …
#define MAC_CFG_DESC_TX_3_UCODE_CMD_MSK …
#define DMA_CFG_DESC_TX_0_L4_LENGTH_POS …
#define DMA_CFG_DESC_TX_0_L4_LENGTH_LEN …
#define DMA_CFG_DESC_TX_0_L4_LENGTH_MSK …
#define DMA_CFG_DESC_TX_0_CMD_EOP_POS …
#define DMA_CFG_DESC_TX_0_CMD_EOP_LEN …
#define DMA_CFG_DESC_TX_0_CMD_EOP_MSK …
#define DMA_CFG_DESC_TX_0_CMD_MARK_WB_POS …
#define DMA_CFG_DESC_TX_0_CMD_MARK_WB_LEN …
#define DMA_CFG_DESC_TX_0_CMD_MARK_WB_MSK …
#define DMA_CFG_DESC_TX_0_CMD_DMA_IT_POS …
#define DMA_CFG_DESC_TX_0_CMD_DMA_IT_LEN …
#define DMA_CFG_DESC_TX_0_CMD_DMA_IT_MSK …
#define DMA_CFG_DESC_TX_0_SEGMENT_BUF_DETAILS_POS …
#define DMA_CFG_DESC_TX_0_SEGMENT_BUF_DETAILS_LEN …
#define DMA_CFG_DESC_TX_0_SEGMENT_BUF_DETAILS_MSK …
#define DMA_CFG_DESC_TX_0_TCP_SEG_EN_POS …
#define DMA_CFG_DESC_TX_0_TCP_SEG_EN_LEN …
#define DMA_CFG_DESC_TX_0_TCP_SEG_EN_MSK …
#define DMA_CFG_DESC_TX_0_IPV4_CHECKSUM_EN_POS …
#define DMA_CFG_DESC_TX_0_IPV4_CHECKSUM_EN_LEN …
#define DMA_CFG_DESC_TX_0_IPV4_CHECKSUM_EN_MSK …
#define DMA_CFG_DESC_TX_0_TCP_UDP_CHECKSUM_EN_POS …
#define DMA_CFG_DESC_TX_0_TCP_UDP_CHECKSUM_EN_LEN …
#define DMA_CFG_DESC_TX_0_TCP_UDP_CHECKSUM_EN_MSK …
#define DMA_CFG_DESC_TX_0_QID_POS …
#define DMA_CFG_DESC_TX_0_QID_LEN …
#define DMA_CFG_DESC_TX_0_QID_MSK …
#define DMA_CFG_DESC_TX_0_PSEUDO_HEADER_CALC_EN_POS …
#define DMA_CFG_DESC_TX_0_PSEUDO_HEADER_CALC_EN_LEN …
#define DMA_CFG_DESC_TX_0_PSEUDO_HEADER_CALC_EN_MSK …
#define DMA_CFG_DESC_TX_0_L4_TYPE_POS …
#define DMA_CFG_DESC_TX_0_L4_TYPE_LEN …
#define DMA_CFG_DESC_TX_0_L4_TYPE_MSK …
#define DMA_CFG_DESC_TX_OFFLOAD_CFG_MAC_LEN_POS …
#define DMA_CFG_DESC_TX_OFFLOAD_CFG_MAC_LEN_LEN …
#define DMA_CFG_DESC_TX_OFFLOAD_CFG_MAC_LEN_MSK …
#define DMA_CFG_DESC_TX_OFFLOAD_CFG_L3T_IPV4_POS …
#define DMA_CFG_DESC_TX_OFFLOAD_CFG_L3T_IPV4_LEN …
#define DMA_CFG_DESC_TX_OFFLOAD_CFG_L3T_IPV4_MSK …
#define TX_DMA_STATUS_DU …
struct vring_tx_dma { … } __packed;
enum { … };
struct vring_rx_mac { … } __packed;
#define RX_DMA_D0_CMD_DMA_EOP …
#define RX_DMA_D0_CMD_DMA_RT …
#define RX_DMA_D0_CMD_DMA_IT …
#define RX_MAC_D0_MAC_ID_VALID …
#define RX_DMA_ERROR_FCS …
#define RX_DMA_ERROR_MIC …
#define RX_DMA_ERROR_KEY …
#define RX_DMA_ERROR_REPLAY …
#define RX_DMA_ERROR_L3_ERR …
#define RX_DMA_ERROR_L4_ERR …
#define RX_DMA_STATUS_DU …
#define RX_DMA_STATUS_EOP …
#define RX_DMA_STATUS_ERROR …
#define RX_DMA_STATUS_MI …
#define RX_DMA_STATUS_L3I …
#define RX_DMA_STATUS_L4I …
#define RX_DMA_STATUS_PHY_INFO …
#define RX_DMA_STATUS_FFM …
#define WIL_KEY_INFO_KEY_TYPE …
#define WIL_KEY_INFO_MIC …
#define WIL_KEY_INFO_ENCR_KEY_DATA …
#define WIL_EAP_NONCE_LEN …
#define WIL_EAP_KEY_RSC_LEN …
#define WIL_EAP_REPLAY_COUNTER_LEN …
#define WIL_EAP_KEY_IV_LEN …
#define WIL_EAP_KEY_ID_LEN …
enum { … };
#define WIL_EAPOL_KEY_TYPE_RSN …
#define WIL_EAPOL_KEY_TYPE_WPA …
struct wil_1x_hdr { … } __packed;
struct wil_eapol_key { … } __packed;
struct vring_rx_dma { … } __packed;
struct vring_tx_desc { … } __packed;
wil_tx_desc __packed;
struct vring_rx_desc { … } __packed;
wil_rx_desc __packed;
wil_ring_desc __packed;
struct packet_rx_info { … };
struct skb_rx_info { … };
static inline int wil_rxdesc_tid(struct vring_rx_desc *d)
{ … }
static inline int wil_rxdesc_cid(struct vring_rx_desc *d)
{ … }
static inline int wil_rxdesc_mid(struct vring_rx_desc *d)
{ … }
static inline int wil_rxdesc_ftype(struct vring_rx_desc *d)
{ … }
static inline int wil_rxdesc_subtype(struct vring_rx_desc *d)
{ … }
static inline u8 wil_rxdesc_fc1(struct vring_rx_desc *d)
{ … }
static inline int wil_rxdesc_seq(struct vring_rx_desc *d)
{ … }
static inline int wil_rxdesc_ext_subtype(struct vring_rx_desc *d)
{ … }
static inline int wil_rxdesc_retry(struct vring_rx_desc *d)
{ … }
static inline int wil_rxdesc_key_id(struct vring_rx_desc *d)
{ … }
static inline int wil_rxdesc_security(struct vring_rx_desc *d)
{ … }
static inline int wil_rxdesc_ds_bits(struct vring_rx_desc *d)
{ … }
static inline int wil_rxdesc_mcs(struct vring_rx_desc *d)
{ … }
static inline int wil_rxdesc_mcast(struct vring_rx_desc *d)
{ … }
static inline struct vring_rx_desc *wil_skb_rxdesc(struct sk_buff *skb)
{ … }
static inline int wil_ring_is_empty(struct wil_ring *ring)
{ … }
static inline u32 wil_ring_next_tail(struct wil_ring *ring)
{ … }
static inline void wil_ring_advance_head(struct wil_ring *ring, int n)
{ … }
static inline int wil_ring_is_full(struct wil_ring *ring)
{ … }
static inline u8 *wil_skb_get_da(struct sk_buff *skb)
{ … }
static inline u8 *wil_skb_get_sa(struct sk_buff *skb)
{ … }
static inline bool wil_need_txstat(struct sk_buff *skb)
{ … }
static inline void wil_consume_skb(struct sk_buff *skb, bool acked)
{ … }
static inline int wil_ring_used_tx(struct wil_ring *ring)
{ … }
static inline int wil_ring_avail_tx(struct wil_ring *ring)
{ … }
static inline int wil_get_min_tx_ring_id(struct wil6210_priv *wil)
{ … }
static inline int wil_is_back_req(u8 fc)
{ … }
static inline bool wil_val_in_range(int val, int min, int max)
{ … }
static inline u8 wil_skb_get_cid(struct sk_buff *skb)
{ … }
static inline void wil_skb_set_cid(struct sk_buff *skb, u8 cid)
{ … }
void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev);
void wil_netif_rx(struct sk_buff *skb, struct net_device *ndev, int cid,
struct wil_net_stats *stats, bool gro);
void wil_rx_reorder(struct wil6210_priv *wil, struct sk_buff *skb);
void wil_rx_bar(struct wil6210_priv *wil, struct wil6210_vif *vif,
u8 cid, u8 tid, u16 seq);
struct wil_tid_ampdu_rx *wil_tid_ampdu_rx_alloc(struct wil6210_priv *wil,
int size, u16 ssn);
void wil_tid_ampdu_rx_free(struct wil6210_priv *wil,
struct wil_tid_ampdu_rx *r);
void wil_tx_data_init(struct wil_ring_tx_data *txdata);
void wil_init_txrx_ops_legacy_dma(struct wil6210_priv *wil);
void wil_tx_latency_calc(struct wil6210_priv *wil, struct sk_buff *skb,
struct wil_sta_info *sta);
#endif