Linux-libre 4.10.3-gnu
[librecmc/linux-libre.git] / drivers / staging / vt6656 / desc.h
1 /*
2  * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3  * All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  *
16  * File: desc.h
17  *
18  * Purpose:The header file of descriptor
19  *
20  * Revision History:
21  *
22  * Author: Tevin Chen
23  *
24  * Date: May 21, 1996
25  *
26  */
27
28 #ifndef __DESC_H__
29 #define __DESC_H__
30
31 #include <linux/types.h>
32 #include <linux/mm.h>
33
34 /* max transmit or receive buffer size */
35 #define CB_MAX_BUF_SIZE     2900U       /* NOTE: must be multiple of 4 */
36
37 #define MAX_TOTAL_SIZE_WITH_ALL_HEADERS CB_MAX_BUF_SIZE
38
39 #define MAX_INTERRUPT_SIZE              32
40
41 #define CB_MAX_RX_DESC      128         /* max # of descriptors */
42 #define CB_MIN_RX_DESC      16          /* min # of RX descriptors */
43 #define CB_MAX_TX_DESC      128         /* max # of descriptors */
44 #define CB_MIN_TX_DESC      16          /* min # of TX descriptors */
45
46 /*
47  * bits in the RSR register
48  */
49 #define RSR_ADDRBROAD       0x80
50 #define RSR_ADDRMULTI       0x40
51 #define RSR_ADDRUNI         0x00
52 #define RSR_IVLDTYP         0x20        /* invalid packet type */
53 #define RSR_IVLDLEN         0x10        /* invalid len (> 2312 byte) */
54 #define RSR_BSSIDOK         0x08
55 #define RSR_CRCOK           0x04
56 #define RSR_BCNSSIDOK       0x02
57 #define RSR_ADDROK          0x01
58
59 /*
60  * bits in the new RSR register
61  */
62 #define NEWRSR_DECRYPTOK    0x10
63 #define NEWRSR_CFPIND       0x08
64 #define NEWRSR_HWUTSF       0x04
65 #define NEWRSR_BCNHITAID    0x02
66 #define NEWRSR_BCNHITAID0   0x01
67
68 /*
69  * bits in the TSR register
70  */
71 #define TSR_RETRYTMO        0x08
72 #define TSR_TMO             0x04
73 #define TSR_ACKDATA         0x02
74 #define TSR_VALID           0x01
75
76 #define FIFOCTL_AUTO_FB_1   0x1000
77 #define FIFOCTL_AUTO_FB_0   0x0800
78 #define FIFOCTL_GRPACK      0x0400
79 #define FIFOCTL_11GA        0x0300
80 #define FIFOCTL_11GB        0x0200
81 #define FIFOCTL_11B         0x0100
82 #define FIFOCTL_11A         0x0000
83 #define FIFOCTL_RTS         0x0080
84 #define FIFOCTL_ISDMA0      0x0040
85 #define FIFOCTL_GENINT      0x0020
86 #define FIFOCTL_TMOEN       0x0010
87 #define FIFOCTL_LRETRY      0x0008
88 #define FIFOCTL_CRCDIS      0x0004
89 #define FIFOCTL_NEEDACK     0x0002
90 #define FIFOCTL_LHEAD       0x0001
91
92 /* WMAC definition Frag Control */
93 #define FRAGCTL_AES         0x0300
94 #define FRAGCTL_TKIP        0x0200
95 #define FRAGCTL_LEGACY      0x0100
96 #define FRAGCTL_NONENCRYPT  0x0000
97 #define FRAGCTL_ENDFRAG     0x0003
98 #define FRAGCTL_MIDFRAG     0x0002
99 #define FRAGCTL_STAFRAG     0x0001
100 #define FRAGCTL_NONFRAG     0x0000
101
102 #endif /* __DESC_H__ */