f272c98e7a2cdbb457b786cc5377acc87c8500d5
[firefly-linux-kernel-4.4.55.git] / drivers / staging / vt6656 / device_cfg.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  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * File: device_cfg.h
20  *
21  * Purpose: Driver configuration header
22  * Author: Lyndon Chen
23  *
24  * Date: Dec 9, 2005
25  *
26  */
27 #ifndef __DEVICE_CONFIG_H
28 #define __DEVICE_CONFIG_H
29
30 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
31 #include <linux/config.h>
32 #endif
33
34 #include <linux/types.h>
35
36 #if !defined(__TTYPE_H__)
37 #include "ttype.h"
38 #endif
39
40
41
42 typedef __u8    UINT8,   *PUINT8;
43 typedef __u16   UINT16,  *PUINT16;
44 typedef __u32   UINT32,  *PUINT32;
45
46
47 #ifndef VOID
48 #define VOID            void
49 #endif
50
51 #ifndef CONST
52 #define CONST           const
53 #endif
54
55 #ifndef STATIC
56 #define STATIC          static
57 #endif
58
59 #ifndef DEF
60 #define DEF
61 #endif
62
63 #ifndef IN
64 #define IN
65 #endif
66
67 #ifndef OUT
68 #define OUT
69 #endif
70
71 typedef
72 struct _version {
73     UINT8   major;
74     UINT8   minor;
75     UINT8   build;
76 } version_t, *pversion_t;
77
78 #ifndef FALSE
79 #define FALSE   (0)
80 #endif
81
82 #ifndef TRUE
83 #define TRUE    (!(FALSE))
84 #endif
85
86 #define VID_TABLE_SIZE      64
87 #define MCAST_TABLE_SIZE    64
88 #define MCAM_SIZE           32
89 #define VCAM_SIZE           32
90 #define TX_QUEUE_NO         8
91
92 #define DEVICE_NAME         "vt6656"
93 #define DEVICE_FULL_DRV_NAM "VIA Networking Wireless LAN USB Driver"
94
95 #ifndef MAJOR_VERSION
96 #define MAJOR_VERSION       1
97 #endif
98
99 #ifndef MINOR_VERSION
100 #define MINOR_VERSION       13
101 #endif
102
103 #ifndef DEVICE_VERSION
104 #define DEVICE_VERSION       "1.19_12"
105 #endif
106
107 //config file
108 #include <linux/fs.h>
109 #include <linux/fcntl.h>
110 #ifndef CONFIG_PATH
111 #define CONFIG_PATH            "/etc/vntconfiguration.dat"
112 #endif
113
114 //Max: 2378=2312Payload + 30HD +4CRC + 2Padding + 4Len + 8TSF + 4RSR
115 #define PKT_BUF_SZ          2390
116
117
118 #define MALLOC(x,y)         kmalloc((x),(y))
119 #define FREE(x)             kfree((x))
120 #define MAX_UINTS           8
121 #define OPTION_DEFAULT      { [0 ... MAX_UINTS-1] = -1}
122
123
124
125 typedef enum  _chip_type{
126     VT3184=1
127 } CHIP_TYPE, *PCHIP_TYPE;
128
129
130
131 #ifdef VIAWET_DEBUG
132 #define ASSERT(x) { \
133     if (!(x)) { \
134         printk(KERN_ERR "assertion %s failed: file %s line %d\n", #x,\
135         __FUNCTION__, __LINE__);\
136         *(int*) 0=0;\
137     }\
138 }
139 #define DBG_PORT80(value)                   outb(value, 0x80)
140 #else
141 #define ASSERT(x)
142 #define DBG_PORT80(value)
143 #endif
144
145
146 #endif