Linux 2.6.31-rc6
[linux-2.6] / drivers / staging / vt6655 / device_cfg.h
1 /*
2  * Copyright (c) 1996, 2003 VIA Networking, Inc. All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  *
18  *
19  * File: device_cfg.h
20  *
21  * Purpose: Driver configuration header
22  * Author: Lyndon Chen
23  *
24  * Date: Dec 17, 2002
25  *
26  */
27 #ifndef __DEVICE_CONFIG_H
28 #define __DEVICE_CONFIG_H
29
30 //#include <linux/config.h>
31 #include <linux/types.h>
32
33 #if !defined(__TTYPE_H__)
34 #include "ttype.h"
35 #endif
36
37
38
39 typedef __u8    UINT8,   *PUINT8;
40 typedef __u16   UINT16,  *PUINT16;
41 typedef __u32   UINT32,  *PUINT32;
42
43
44 #ifndef VOID
45 #define VOID            void
46 #endif
47
48 #ifndef CONST
49 #define CONST           const
50 #endif
51
52 #ifndef STATIC
53 #define STATIC          static
54 #endif
55
56 #ifndef DEF
57 #define DEF
58 #endif
59
60 #ifndef IN
61 #define IN
62 #endif
63
64 #ifndef OUT
65 #define OUT
66 #endif
67
68 typedef
69 struct _version {
70     UINT8   major;
71     UINT8   minor;
72     UINT8   build;
73 } version_t, *pversion_t;
74
75 #ifndef FALSE
76 #define FALSE   (0)
77 #endif
78
79 #ifndef TRUE
80 #define TRUE    (!(FALSE))
81 #endif
82
83 #define VID_TABLE_SIZE      64
84 #define MCAST_TABLE_SIZE    64
85 #define MCAM_SIZE           32
86 #define VCAM_SIZE           32
87 #define TX_QUEUE_NO         8
88
89 #define DEVICE_NAME         "vt6655"
90 #define DEVICE_FULL_DRV_NAM "VIA Networking Solomon-A/B/G Wireless LAN Adapter Driver"
91
92 #ifndef MAJOR_VERSION
93 #define MAJOR_VERSION       1
94 #endif
95
96 #ifndef MINOR_VERSION
97 #define MINOR_VERSION       17
98 #endif
99
100 #ifndef DEVICE_VERSION
101 #define DEVICE_VERSION       "1.19.12"
102 #endif
103 //config file
104 #include <linux/fs.h>
105 #include <linux/fcntl.h>
106 #ifndef CONFIG_PATH
107 #define CONFIG_PATH            "/etc/vntconfiguration.dat"
108 #endif
109
110 //Max: 2378=2312Payload + 30HD +4CRC + 2Padding + 4Len + 8TSF + 4RSR
111 #define PKT_BUF_SZ          2390
112
113
114 #define MALLOC(x,y)         kmalloc((x),(y))
115 #define FREE(x)             kfree((x))
116 #define MAX_UINTS           8
117 #define OPTION_DEFAULT      { [0 ... MAX_UINTS-1] = -1}
118
119
120
121 typedef enum  _chip_type{
122     VT3253=1
123 } CHIP_TYPE, *PCHIP_TYPE;
124
125
126
127 #ifdef VIAWET_DEBUG
128 #define ASSERT(x) { \
129     if (!(x)) { \
130         printk(KERN_ERR "assertion %s failed: file %s line %d\n", #x,\
131         __FUNCTION__, __LINE__);\
132         *(int*) 0=0;\
133     }\
134 }
135 #define DBG_PORT80(value)                   outb(value, 0x80)
136 #else
137 #define ASSERT(x)
138 #define DBG_PORT80(value)
139 #endif
140
141
142 #endif