Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ */
0002 /*
0003  * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
0004  * All rights reserved.
0005  *
0006  * Purpose:The header file of descriptor
0007  *
0008  * Revision History:
0009  *
0010  * Author: Tevin Chen
0011  *
0012  * Date: May 21, 1996
0013  *
0014  */
0015 
0016 #ifndef __DESC_H__
0017 #define __DESC_H__
0018 
0019 #include <linux/bits.h>
0020 #include <linux/types.h>
0021 #include <linux/mm.h>
0022 
0023 /* max transmit or receive buffer size */
0024 #define CB_MAX_BUF_SIZE     2900U       /* NOTE: must be multiple of 4 */
0025 
0026 #define MAX_TOTAL_SIZE_WITH_ALL_HEADERS CB_MAX_BUF_SIZE
0027 
0028 #define MAX_INTERRUPT_SIZE              32
0029 
0030 #define CB_MAX_RX_DESC      128         /* max # of descriptors */
0031 #define CB_MIN_RX_DESC      16          /* min # of RX descriptors */
0032 #define CB_MAX_TX_DESC      128         /* max # of descriptors */
0033 #define CB_MIN_TX_DESC      16          /* min # of TX descriptors */
0034 
0035 /*
0036  * bits in the RSR register
0037  */
0038 #define RSR_ADDRBROAD       BIT(7)
0039 #define RSR_ADDRMULTI       BIT(6)
0040 #define RSR_ADDRUNI         0x00
0041 #define RSR_IVLDTYP         BIT(5)  /* invalid packet type */
0042 #define RSR_IVLDLEN         BIT(4)  /* invalid len (> 2312 byte) */
0043 #define RSR_BSSIDOK         BIT(3)
0044 #define RSR_CRCOK           BIT(2)
0045 #define RSR_BCNSSIDOK       BIT(1)
0046 #define RSR_ADDROK          BIT(0)
0047 
0048 /*
0049  * bits in the new RSR register
0050  */
0051 #define NEWRSR_DECRYPTOK    BIT(4)
0052 #define NEWRSR_CFPIND       BIT(3)
0053 #define NEWRSR_HWUTSF       BIT(2)
0054 #define NEWRSR_BCNHITAID    BIT(1)
0055 #define NEWRSR_BCNHITAID0   BIT(0)
0056 
0057 /*
0058  * bits in the TSR register
0059  */
0060 #define TSR_RETRYTMO        BIT(3)
0061 #define TSR_TMO             BIT(2)
0062 #define TSR_ACKDATA         BIT(1)
0063 #define TSR_VALID           BIT(0)
0064 
0065 #define FIFOCTL_AUTO_FB_1   0x1000
0066 #define FIFOCTL_AUTO_FB_0   0x0800
0067 #define FIFOCTL_GRPACK      0x0400
0068 #define FIFOCTL_11GA        0x0300
0069 #define FIFOCTL_11GB        0x0200
0070 #define FIFOCTL_11B         0x0100
0071 #define FIFOCTL_11A         0x0000
0072 #define FIFOCTL_RTS         0x0080
0073 #define FIFOCTL_ISDMA0      0x0040
0074 #define FIFOCTL_GENINT      0x0020
0075 #define FIFOCTL_TMOEN       0x0010
0076 #define FIFOCTL_LRETRY      0x0008
0077 #define FIFOCTL_CRCDIS      0x0004
0078 #define FIFOCTL_NEEDACK     0x0002
0079 #define FIFOCTL_LHEAD       0x0001
0080 
0081 /* WMAC definition Frag Control */
0082 #define FRAGCTL_AES         0x0300
0083 #define FRAGCTL_TKIP        0x0200
0084 #define FRAGCTL_LEGACY      0x0100
0085 #define FRAGCTL_NONENCRYPT  0x0000
0086 #define FRAGCTL_ENDFRAG     0x0003
0087 #define FRAGCTL_MIDFRAG     0x0002
0088 #define FRAGCTL_STAFRAG     0x0001
0089 #define FRAGCTL_NONFRAG     0x0000
0090 
0091 #endif /* __DESC_H__ */