linux/drivers/staging/vt6655/desc.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
 * All rights reserved.
 *
 * Purpose:The header file of descriptor
 *
 * Revision History:
 *
 * Author: Tevin Chen
 *
 * Date: May 21, 1996
 *
 */

#ifndef __DESC_H__
#define __DESC_H__

#include <linux/types.h>
#include <linux/mm.h>
#include "linux/ieee80211.h"

#define B_OWNED_BY_CHIP
#define B_OWNED_BY_HOST

/* Bits in the RSR register */
#define RSR_ADDRBROAD
#define RSR_ADDRMULTI
#define RSR_ADDRUNI
#define RSR_IVLDTYP
#define RSR_IVLDLEN
#define RSR_BSSIDOK
#define RSR_CRCOK
#define RSR_BCNSSIDOK
#define RSR_ADDROK

/* Bits in the new RSR register */
#define NEWRSR_DECRYPTOK
#define NEWRSR_CFPIND
#define NEWRSR_HWUTSF
#define NEWRSR_BCNHITAID
#define NEWRSR_BCNHITAID0

/* Bits in the TSR0 register */
#define TSR0_PWRSTS1_2
#define TSR0_PWRSTS7
#define TSR0_NCR

/* Bits in the TSR1 register */
#define TSR1_TERR
#define TSR1_PWRSTS4_6
#define TSR1_RETRYTMO
#define TSR1_TMO
#define TSR1_PWRSTS3
#define ACK_DATA

/* Bits in the TCR register */
#define EDMSDU
#define TCR_EDP
#define TCR_STP

/* max transmit or receive buffer size */
#define CB_MAX_BUF_SIZE
					/* NOTE: must be multiple of 4 */
#define CB_MAX_TX_BUF_SIZE
#define CB_MAX_RX_BUF_SIZE_NORMAL

#define CB_BEACON_BUF_SIZE

#define CB_MAX_RX_DESC
#define CB_MIN_RX_DESC
#define CB_MAX_TX_DESC
#define CB_MIN_TX_DESC

#define CB_MAX_RECEIVED_PACKETS
				/*
				 * limit our receive routine to indicating
				 * this many at a time for 2 reasons:
				 * 1. driver flow control to protocol layer
				 * 2. limit the time used in ISR routine
				 */

#define CB_EXTRA_RD_NUM
#define CB_RD_NUM
#define CB_TD_NUM

/*
 * max number of physical segments in a single NDIS packet. Above this
 * threshold, the packet is copied into a single physically contiguous buffer
 */
#define CB_MAX_SEGMENT

#define CB_MIN_MAP_REG_NUM
#define CB_MAX_MAP_REG_NUM

#define CB_PROTOCOL_RESERVED_SECTION

/*
 * if retrys excess 15 times , tx will abort, and if tx fifo underflow,
 * tx will fail, we should try to resend it
 */
#define CB_MAX_TX_ABORT_RETRY

/* WMAC definition FIFO Control */
#define FIFOCTL_AUTO_FB_1
#define FIFOCTL_AUTO_FB_0
#define FIFOCTL_GRPACK
#define FIFOCTL_11GA
#define FIFOCTL_11GB
#define FIFOCTL_11B
#define FIFOCTL_11A
#define FIFOCTL_RTS
#define FIFOCTL_ISDMA0
#define FIFOCTL_GENINT
#define FIFOCTL_TMOEN
#define FIFOCTL_LRETRY
#define FIFOCTL_CRCDIS
#define FIFOCTL_NEEDACK
#define FIFOCTL_LHEAD

/* WMAC definition Frag Control */
#define FRAGCTL_AES
#define FRAGCTL_TKIP
#define FRAGCTL_LEGACY
#define FRAGCTL_NONENCRYPT
#define FRAGCTL_ENDFRAG
#define FRAGCTL_MIDFRAG
#define FRAGCTL_STAFRAG
#define FRAGCTL_NONFRAG

#define TYPE_TXDMA0
#define TYPE_AC0DMA
#define TYPE_ATIMDMA
#define TYPE_SYNCDMA
#define TYPE_MAXTD

#define TYPE_BEACONDMA

#define TYPE_RXDMA0
#define TYPE_RXDMA1
#define TYPE_MAXRD

/* TD_INFO flags control bit */
#define TD_FLAGS_NETIF_SKB
/* check if called from private skb (hostap) */
#define TD_FLAGS_PRIV_SKB
#define TD_FLAGS_PS_RETRY

/*
 * ref_sk_buff is used for mapping the skb structure between pre-built
 * driver-obj & running kernel. Since different kernel version (2.4x) may
 * change skb structure, i.e. pre-built driver-obj may link to older skb that
 * leads error.
 */

struct vnt_rd_info {};

struct vnt_rdes0 {} __packed;

struct vnt_rdes1 {} __packed;

/* Rx descriptor*/
struct vnt_rx_desc {} __packed;

struct vnt_tdes0 {} __packed;

struct vnt_tdes1 {} __packed;

struct vnt_td_info {};

/* transmit descriptor */
struct vnt_tx_desc {} __packed;

/* Length, Service, and Signal fields of Phy for Tx */
struct vnt_phy_field {} __packed;

vnt_phy_field_swap;

#endif /* __DESC_H__ */