aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorForest Bond <forest@alittletooquiet.net>2009-04-25 10:31:32 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-19 14:00:51 -0400
commit1cb648b34879b79975f68728be70bae05979ae13 (patch)
treeb1f458be70d471c9be9ae11de891e213ff85ae7c
parent5449c685a4b39534f18869a93896370224463715 (diff)
Staging: vt6655 Add includes to drivers/staging/vt6655.
Add includes to drivers/staging/vt6655. These came from the includes directory in the upstream source archive. Signed-off-by: Forest Bond <forest@alittletooquiet.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/vt6655/device_cfg.h142
-rw-r--r--drivers/staging/vt6655/iocmd.h481
-rw-r--r--drivers/staging/vt6655/iowpa.h159
-rw-r--r--drivers/staging/vt6655/ttype.h386
4 files changed, 1168 insertions, 0 deletions
diff --git a/drivers/staging/vt6655/device_cfg.h b/drivers/staging/vt6655/device_cfg.h
new file mode 100644
index 000000000000..7301f824b89c
--- /dev/null
+++ b/drivers/staging/vt6655/device_cfg.h
@@ -0,0 +1,142 @@
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
39typedef __u8 UINT8, *PUINT8;
40typedef __u16 UINT16, *PUINT16;
41typedef __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
68typedef
69struct _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 "viawget"
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
121typedef 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
diff --git a/drivers/staging/vt6655/iocmd.h b/drivers/staging/vt6655/iocmd.h
new file mode 100644
index 000000000000..ada9ee999767
--- /dev/null
+++ b/drivers/staging/vt6655/iocmd.h
@@ -0,0 +1,481 @@
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 * File: iocmd.h
19 *
20 * Purpose: Handles the viawget ioctl private interface functions
21 *
22 * Author: Lyndon Chen
23 *
24 * Date: May 8, 2002
25 *
26 */
27
28#ifndef __IOCMD_H__
29#define __IOCMD_H__
30
31#if !defined(__TTYPE_H__)
32#include "ttype.h"
33#endif
34
35
36/*--------------------- Export Definitions -------------------------*/
37
38#if !defined(DEF)
39#define DEF
40#endif
41
42//typedef int BOOL;
43//typedef uint32_t u32;
44//typedef uint16_t u16;
45//typedef uint8_t u8;
46
47
48// ioctl Command code
49#define MAGIC_CODE 0x3142
50#define IOCTL_CMD_TEST (SIOCDEVPRIVATE + 0)
51#define IOCTL_CMD_SET (SIOCDEVPRIVATE + 1)
52#define IOCTL_CMD_HOSTAPD (SIOCDEVPRIVATE + 2)
53#define IOCTL_CMD_WPA (SIOCDEVPRIVATE + 3)
54
55
56typedef enum tagWMAC_CMD {
57
58 WLAN_CMD_BSS_SCAN,
59 WLAN_CMD_BSS_JOIN,
60 WLAN_CMD_DISASSOC,
61 WLAN_CMD_SET_WEP,
62 WLAN_CMD_GET_LINK,
63 WLAN_CMD_GET_LISTLEN,
64 WLAN_CMD_GET_LIST,
65 WLAN_CMD_GET_MIB,
66 WLAN_CMD_GET_STAT,
67 WLAN_CMD_STOP_MAC,
68 WLAN_CMD_START_MAC,
69 WLAN_CMD_AP_START,
70 WLAN_CMD_SET_HOSTAPD,
71 WLAN_CMD_SET_HOSTAPD_STA,
72 WLAN_CMD_SET_802_1X,
73 WLAN_CMD_SET_HOST_WEP,
74 WLAN_CMD_SET_WPA,
75 WLAN_CMD_GET_NODE_CNT,
76 WLAN_CMD_ZONETYPE_SET,
77 WLAN_CMD_GET_NODE_LIST
78
79} WMAC_CMD, DEF* PWMAC_CMD;
80
81 typedef enum tagWZONETYPE {
82 ZoneType_USA=0,
83 ZoneType_Japan=1,
84 ZoneType_Europe=2
85}WZONETYPE;
86
87#define ADHOC 0
88#define INFRA 1
89#define BOTH 2
90#define AP 3
91
92#define ADHOC_STARTED 1
93#define ADHOC_JOINTED 2
94
95
96#define PHY80211a 0
97#define PHY80211b 1
98#define PHY80211g 2
99
100#define SSID_ID 0
101#define SSID_MAXLEN 32
102#define BSSID_LEN 6
103#define WEP_NKEYS 4
104#define WEP_KEYMAXLEN 29
105#define WEP_40BIT_LEN 5
106#define WEP_104BIT_LEN 13
107#define WEP_232BIT_LEN 16
108
109
110// Ioctl interface structure
111// Command structure
112//
113#pragma pack(1)
114typedef struct tagSCmdRequest {
115 U8 name[16];
116 void *data;
117 U16 wResult;
118 U16 wCmdCode;
119} SCmdRequest, *PSCmdRequest;
120
121
122//
123// Scan
124//
125
126typedef struct tagSCmdScan {
127
128 U8 ssid[SSID_MAXLEN + 2];
129
130} SCmdScan, *PSCmdScan;
131
132
133//
134// BSS Join
135//
136
137typedef struct tagSCmdBSSJoin {
138
139 U16 wBSSType;
140 U16 wBBPType;
141 U8 ssid[SSID_MAXLEN + 2];
142 U32 uChannel;
143 BOOL bPSEnable;
144 BOOL bShareKeyAuth;
145
146} SCmdBSSJoin, *PSCmdBSSJoin;
147
148typedef struct tagSCmdZoneTypeSet {
149
150 BOOL bWrite;
151 WZONETYPE ZoneType;
152
153} SCmdZoneTypeSet, *PSCmdZoneTypeSet;
154
155#ifdef WPA_SM_Transtatus
156typedef struct tagSWPAResult {
157 char ifname[100];
158 U8 proto;
159 U8 key_mgmt;
160 U8 eap_type;
161 BOOL authenticated;
162} SWPAResult, *PSWPAResult;
163#endif
164
165
166typedef struct tagSCmdStartAP {
167
168 U16 wBSSType;
169 U16 wBBPType;
170 U8 ssid[SSID_MAXLEN + 2];
171 U32 uChannel;
172 U32 uBeaconInt;
173 BOOL bShareKeyAuth;
174 U8 byBasicRate;
175
176} SCmdStartAP, *PSCmdStartAP;
177
178
179typedef struct tagSCmdSetWEP {
180
181 BOOL bEnableWep;
182 U8 byKeyIndex;
183 U8 abyWepKey[WEP_NKEYS][WEP_KEYMAXLEN];
184 BOOL bWepKeyAvailable[WEP_NKEYS];
185 U32 auWepKeyLength[WEP_NKEYS];
186
187} SCmdSetWEP, *PSCmdSetWEP;
188
189
190
191typedef struct tagSBSSIDItem {
192
193 U32 uChannel;
194 U8 abyBSSID[BSSID_LEN];
195 U8 abySSID[SSID_MAXLEN + 1];
196 //2006-1116-01,<Modify> by NomadZhao
197 //U16 wBeaconInterval;
198 //U16 wCapInfo;
199 //U8 byNetType;
200 U8 byNetType;
201 U16 wBeaconInterval;
202 U16 wCapInfo; // for address of byNetType at align 4
203
204 BOOL bWEPOn;
205 U32 uRSSI;
206
207} SBSSIDItem;
208
209
210typedef struct tagSBSSIDList {
211
212 U32 uItem;
213 SBSSIDItem sBSSIDList[0];
214} SBSSIDList, *PSBSSIDList;
215
216
217typedef struct tagSCmdLinkStatus {
218
219 BOOL bLink;
220 U16 wBSSType;
221 U8 byState;
222 U8 abyBSSID[BSSID_LEN];
223 U8 abySSID[SSID_MAXLEN + 2];
224 U32 uChannel;
225 U32 uLinkRate;
226
227} SCmdLinkStatus, *PSCmdLinkStatus;
228
229//
230// 802.11 counter
231//
232typedef struct tagSDot11MIBCount {
233 U32 TransmittedFragmentCount;
234 U32 MulticastTransmittedFrameCount;
235 U32 FailedCount;
236 U32 RetryCount;
237 U32 MultipleRetryCount;
238 U32 RTSSuccessCount;
239 U32 RTSFailureCount;
240 U32 ACKFailureCount;
241 U32 FrameDuplicateCount;
242 U32 ReceivedFragmentCount;
243 U32 MulticastReceivedFrameCount;
244 U32 FCSErrorCount;
245} SDot11MIBCount, DEF* PSDot11MIBCount;
246
247
248
249//
250// statistic counter
251//
252typedef struct tagSStatMIBCount {
253 //
254 // ISR status count
255 //
256 U32 dwIsrTx0OK;
257 U32 dwIsrTx1OK;
258 U32 dwIsrBeaconTxOK;
259 U32 dwIsrRxOK;
260 U32 dwIsrTBTTInt;
261 U32 dwIsrSTIMERInt;
262 U32 dwIsrUnrecoverableError;
263 U32 dwIsrSoftInterrupt;
264 U32 dwIsrRxNoBuf;
265 /////////////////////////////////////
266
267 U32 dwIsrUnknown; // unknown interrupt count
268
269 // RSR status count
270 //
271 U32 dwRsrFrmAlgnErr;
272 U32 dwRsrErr;
273 U32 dwRsrCRCErr;
274 U32 dwRsrCRCOk;
275 U32 dwRsrBSSIDOk;
276 U32 dwRsrADDROk;
277 U32 dwRsrICVOk;
278 U32 dwNewRsrShortPreamble;
279 U32 dwRsrLong;
280 U32 dwRsrRunt;
281
282 U32 dwRsrRxControl;
283 U32 dwRsrRxData;
284 U32 dwRsrRxManage;
285
286 U32 dwRsrRxPacket;
287 U32 dwRsrRxOctet;
288 U32 dwRsrBroadcast;
289 U32 dwRsrMulticast;
290 U32 dwRsrDirected;
291 // 64-bit OID
292 U32 ullRsrOK;
293
294 // for some optional OIDs (64 bits) and DMI support
295 U32 ullRxBroadcastBytes;
296 U32 ullRxMulticastBytes;
297 U32 ullRxDirectedBytes;
298 U32 ullRxBroadcastFrames;
299 U32 ullRxMulticastFrames;
300 U32 ullRxDirectedFrames;
301
302 U32 dwRsrRxFragment;
303 U32 dwRsrRxFrmLen64;
304 U32 dwRsrRxFrmLen65_127;
305 U32 dwRsrRxFrmLen128_255;
306 U32 dwRsrRxFrmLen256_511;
307 U32 dwRsrRxFrmLen512_1023;
308 U32 dwRsrRxFrmLen1024_1518;
309
310 // TSR0,1 status count
311 //
312 U32 dwTsrTotalRetry[2]; // total collision retry count
313 U32 dwTsrOnceRetry[2]; // this packet only occur one collision
314 U32 dwTsrMoreThanOnceRetry[2]; // this packet occur more than one collision
315 U32 dwTsrRetry[2]; // this packet has ever occur collision,
316 // that is (dwTsrOnceCollision0 + dwTsrMoreThanOnceCollision0)
317 U32 dwTsrACKData[2];
318 U32 dwTsrErr[2];
319 U32 dwAllTsrOK[2];
320 U32 dwTsrRetryTimeout[2];
321 U32 dwTsrTransmitTimeout[2];
322
323 U32 dwTsrTxPacket[2];
324 U32 dwTsrTxOctet[2];
325 U32 dwTsrBroadcast[2];
326 U32 dwTsrMulticast[2];
327 U32 dwTsrDirected[2];
328
329 // RD/TD count
330 U32 dwCntRxFrmLength;
331 U32 dwCntTxBufLength;
332
333 U8 abyCntRxPattern[16];
334 U8 abyCntTxPattern[16];
335
336 // Software check....
337 U32 dwCntRxDataErr; // rx buffer data software compare CRC err count
338 U32 dwCntDecryptErr; // rx buffer data software compare CRC err count
339 U32 dwCntRxICVErr; // rx buffer data software compare CRC err count
340 U32 idxRxErrorDesc; // index for rx data error RD
341
342 // 64-bit OID
343 U32 ullTsrOK[2];
344
345 // for some optional OIDs (64 bits) and DMI support
346 U32 ullTxBroadcastFrames[2];
347 U32 ullTxMulticastFrames[2];
348 U32 ullTxDirectedFrames[2];
349 U32 ullTxBroadcastBytes[2];
350 U32 ullTxMulticastBytes[2];
351 U32 ullTxDirectedBytes[2];
352} SStatMIBCount, DEF* PSStatMIBCount;
353
354
355typedef struct tagSNodeItem {
356 // STA info
357 U16 wAID;
358 U8 abyMACAddr[6];
359 U16 wTxDataRate;
360 U16 wInActiveCount;
361 U16 wEnQueueCnt;
362 U16 wFlags;
363 BOOL bPWBitOn;
364 U8 byKeyIndex;
365 U16 wWepKeyLength;
366 U8 abyWepKey[WEP_KEYMAXLEN];
367 // Auto rate fallback vars
368 BOOL bIsInFallback;
369 U32 uTxFailures;
370 U32 uTxAttempts;
371 U16 wFailureRatio;
372
373} SNodeItem;
374
375
376typedef struct tagSNodeList {
377
378 U32 uItem;
379 SNodeItem sNodeList[0];
380
381} SNodeList, *PSNodeList;
382
383
384
385typedef struct tagSCmdValue {
386
387 U32 dwValue;
388
389} SCmdValue, *PSCmdValue;
390
391
392//
393// hostapd & viawget ioctl related
394//
395
396
397// VIAGWET_IOCTL_HOSTAPD ioctl() cmd:
398enum {
399 VIAWGET_HOSTAPD_FLUSH = 1,
400 VIAWGET_HOSTAPD_ADD_STA = 2,
401 VIAWGET_HOSTAPD_REMOVE_STA = 3,
402 VIAWGET_HOSTAPD_GET_INFO_STA = 4,
403 VIAWGET_HOSTAPD_SET_ENCRYPTION = 5,
404 VIAWGET_HOSTAPD_GET_ENCRYPTION = 6,
405 VIAWGET_HOSTAPD_SET_FLAGS_STA = 7,
406 VIAWGET_HOSTAPD_SET_ASSOC_AP_ADDR = 8,
407 VIAWGET_HOSTAPD_SET_GENERIC_ELEMENT = 9,
408 VIAWGET_HOSTAPD_MLME = 10,
409 VIAWGET_HOSTAPD_SCAN_REQ = 11,
410 VIAWGET_HOSTAPD_STA_CLEAR_STATS = 12,
411};
412
413
414#define VIAWGET_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \
415((int) (&((struct viawget_hostapd_param *) 0)->u.generic_elem.data))
416
417// Maximum length for algorithm names (-1 for nul termination) used in ioctl()
418
419
420
421struct viawget_hostapd_param {
422 U32 cmd;
423 U8 sta_addr[6];
424 union {
425 struct {
426 U16 aid;
427 U16 capability;
428 U8 tx_supp_rates;
429 } add_sta;
430 struct {
431 U32 inactive_sec;
432 } get_info_sta;
433 struct {
434 U8 alg;
435 U32 flags;
436 U32 err;
437 U8 idx;
438 U8 seq[8];
439 U16 key_len;
440 U8 key[0];
441 } crypt;
442 struct {
443 U32 flags_and;
444 U32 flags_or;
445 } set_flags_sta;
446 struct {
447 U16 rid;
448 U16 len;
449 U8 data[0];
450 } rid;
451 struct {
452 U8 len;
453 U8 data[0];
454 } generic_elem;
455 struct {
456 U16 cmd;
457 U16 reason_code;
458 } mlme;
459 struct {
460 U8 ssid_len;
461 U8 ssid[32];
462 } scan_req;
463 } u;
464};
465
466//2006-1116-01,<Add> by NomadZhao
467#pragma pack()
468
469/*--------------------- Export Classes ----------------------------*/
470
471/*--------------------- Export Variables --------------------------*/
472
473
474/*--------------------- Export Types ------------------------------*/
475
476
477/*--------------------- Export Functions --------------------------*/
478
479
480
481#endif //__IOCMD_H__
diff --git a/drivers/staging/vt6655/iowpa.h b/drivers/staging/vt6655/iowpa.h
new file mode 100644
index 000000000000..451e2efc5ce5
--- /dev/null
+++ b/drivers/staging/vt6655/iowpa.h
@@ -0,0 +1,159 @@
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 * File: iowpa.h
19 *
20 * Purpose: Handles wpa supplicant ioctl interface
21 *
22 * Author: Lyndon Chen
23 *
24 * Date: May 8, 2002
25 *
26 */
27
28#ifndef __IOWPA_H__
29#define __IOWPA_H__
30
31
32/*--------------------- Export Definitions -------------------------*/
33
34
35#define WPA_IE_LEN 64
36
37
38//WPA related
39/*
40typedef enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg;
41typedef enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
42 CIPHER_WEP104 } wpa_cipher;
43typedef enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE,
44 KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE } wpa_key_mgmt;
45*/
46
47enum {
48 VIAWGET_SET_WPA = 1,
49 VIAWGET_SET_KEY = 2,
50 VIAWGET_SET_SCAN = 3,
51 VIAWGET_GET_SCAN = 4,
52 VIAWGET_GET_SSID = 5,
53 VIAWGET_GET_BSSID = 6,
54 VIAWGET_SET_DROP_UNENCRYPT = 7,
55 VIAWGET_SET_DEAUTHENTICATE = 8,
56 VIAWGET_SET_ASSOCIATE = 9,
57 VIAWGET_SET_DISASSOCIATE= 10
58};
59
60
61enum {
62 VIAWGET_ASSOC_MSG = 1,
63 VIAWGET_DISASSOC_MSG = 2,
64 VIAWGET_PTK_MIC_MSG = 3,
65 VIAWGET_GTK_MIC_MSG = 4,
66 VIAWGET_CCKM_ROAM_MSG = 5,
67 VIAWGET_DEVICECLOSE_MSG = 6
68};
69
70
71
72#pragma pack(1)
73typedef struct viawget_wpa_header {
74 u8 type;
75 u16 req_ie_len;
76 u16 resp_ie_len;
77} viawget_wpa_header;
78
79
80
81struct viawget_wpa_param {
82 u32 cmd;
83 u8 addr[6];
84 union {
85 struct {
86 u8 len;
87 u8 data[0];
88 } generic_elem;
89
90 struct {
91 u8 bssid[6];
92 u8 ssid[32];
93 u8 ssid_len;
94 u8 *wpa_ie;
95 u16 wpa_ie_len;
96 int pairwise_suite;
97 int group_suite;
98 int key_mgmt_suite;
99 int auth_alg;
100 int mode;
101
102 } wpa_associate;
103
104 struct {
105 int alg_name;
106 u16 key_index;
107 u16 set_tx;
108 u8 *seq;
109 u16 seq_len;
110 u8 *key;
111 u16 key_len;
112 } wpa_key;
113
114 struct {
115 u8 ssid_len;
116 u8 ssid[32];
117 } scan_req;
118
119 struct {
120 u16 scan_count;
121 u8 *buf;
122 } scan_results;
123
124 } u;
125
126};
127
128#pragma pack(1)
129struct viawget_scan_result {
130 u8 bssid[6];
131 u8 ssid[32];
132 u16 ssid_len;
133 u8 wpa_ie[WPA_IE_LEN];
134 u16 wpa_ie_len;
135 u8 rsn_ie[WPA_IE_LEN];
136 u16 rsn_ie_len;
137 int freq; // MHz
138 int caps; // e.g. privacy
139 int qual; // signal quality
140 int noise;
141 int level;
142 int maxrate;
143};
144
145//2006-1116-01,<Add> by NomadZhao
146#pragma pack()
147/*--------------------- Export Classes ----------------------------*/
148
149/*--------------------- Export Variables --------------------------*/
150
151
152/*--------------------- Export Types ------------------------------*/
153
154
155/*--------------------- Export Functions --------------------------*/
156
157
158
159#endif //__IOWPA_H__
diff --git a/drivers/staging/vt6655/ttype.h b/drivers/staging/vt6655/ttype.h
new file mode 100644
index 000000000000..1f26702cabf6
--- /dev/null
+++ b/drivers/staging/vt6655/ttype.h
@@ -0,0 +1,386 @@
1/*
2 * File: ttype.h
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 * Purpose: define basic common types and macros
19 *
20 * Author: Tevin Chen
21 *
22 * Date: May 21, 1996
23 *
24 */
25
26
27#ifndef __TTYPE_H__
28#define __TTYPE_H__
29
30
31/******* Common definitions and typedefs ***********************************/
32
33#ifndef VOID
34#define VOID void
35#endif
36
37#ifndef CONST
38#define CONST const
39#endif
40
41#ifndef STATIC
42#define STATIC static
43#endif
44
45#ifndef IN
46#define IN
47#endif
48
49#ifndef OUT
50#define OUT
51#endif
52
53#ifndef TxInSleep
54#define TxInSleep
55#endif
56#if! defined(__CPU8051)
57typedef int BOOL;
58#else // __CPU8051
59#define BOOL int
60#endif // __CPU8051
61
62#if !defined(TRUE)
63#define TRUE 1
64#endif
65#if !defined(FALSE)
66#define FALSE 0
67#endif
68
69
70#if !defined(SUCCESS)
71#define SUCCESS 0
72#endif
73#if !defined(FAILED)
74#define FAILED -1
75#endif
76
77//2007-0809-01<Add>by MikeLiu
78#ifndef update_BssList
79#define update_BssList
80#endif
81
82
83
84#ifndef WPA_SM_Transtatus
85#define WPA_SM_Transtatus
86#endif
87
88#ifndef Calcu_LinkQual
89#define Calcu_LinkQual
90#endif
91
92#ifndef Calcu_LinkQual
93#define Calcu_LinkQual
94#endif
95
96/****** Simple typedefs ***************************************************/
97
98#if! defined(__CPU8051)
99
100/* These lines assume that your compiler's longs are 32 bits and
101 * shorts are 16 bits. It is already assumed that chars are 8 bits,
102 * but it doesn't matter if they're signed or unsigned.
103 */
104
105typedef signed char I8; /* 8-bit signed integer */
106typedef signed short I16; /* 16-bit signed integer */
107typedef signed long I32; /* 32-bit signed integer */
108
109typedef unsigned char U8; /* 8-bit unsigned integer */
110typedef unsigned short U16; /* 16-bit unsigned integer */
111typedef unsigned long U32; /* 32-bit unsigned integer */
112
113
114#if defined(__WIN32)
115typedef signed __int64 I64; /* 64-bit signed integer */
116typedef unsigned __int64 U64; /* 64-bit unsigned integer */
117#endif // __WIN32
118
119
120typedef char CHAR;
121typedef signed short SHORT;
122typedef signed int INT;
123typedef signed long LONG;
124
125typedef unsigned char UCHAR;
126typedef unsigned short USHORT;
127typedef unsigned int UINT;
128typedef unsigned long ULONG;
129typedef unsigned long long ULONGLONG; //64 bit
130typedef unsigned long long ULONGULONG;
131
132
133
134typedef unsigned char BYTE; // 8-bit
135typedef unsigned short WORD; // 16-bit
136typedef unsigned long DWORD; // 32-bit
137
138// QWORD is for those situation that we want
139// an 8-byte-aligned 8 byte long structure
140// which is NOT really a floating point number.
141typedef union tagUQuadWord {
142 struct {
143 DWORD dwLowDword;
144 DWORD dwHighDword;
145 } u;
146 double DoNotUseThisField;
147} UQuadWord;
148typedef UQuadWord QWORD; // 64-bit
149
150
151
152#ifndef _TCHAR_DEFINED
153typedef char TCHAR;
154typedef char* PTCHAR;
155typedef unsigned char TBYTE;
156typedef unsigned char* PTBYTE;
157#define _TCHAR_DEFINED
158#endif
159
160#else // __CPU8051
161
162#define U8 unsigned char
163#define U16 unsigned short
164#define U32 unsigned long
165
166#define USHORT unsigned short
167#define UINT unsigned int
168
169#define BYTE unsigned char
170#define WORD unsigned short
171#define DWORD unsigned long
172
173
174#endif // __CPU8051
175
176
177// maybe this should be defined in <limits.h>
178#define U8_MAX 0xFFU
179#define U16_MAX 0xFFFFU
180#define U32_MAX 0xFFFFFFFFUL
181
182#define BYTE_MAX 0xFFU
183#define WORD_MAX 0xFFFFU
184#define DWORD_MAX 0xFFFFFFFFUL
185
186
187
188
189/******* 32-bit vs. 16-bit definitions and typedefs ************************/
190
191#if !defined(NULL)
192#ifdef __cplusplus
193#define NULL 0
194#else
195#define NULL ((void *)0)
196#endif // __cplusplus
197#endif // !NULL
198
199
200
201
202#if defined(__WIN32) || defined(__CPU8051)
203
204#if !defined(FAR)
205#define FAR
206#endif
207#if !defined(NEAR)
208#define NEAR
209#endif
210#if !defined(DEF)
211#define DEF
212#endif
213#if !defined(CALLBACK)
214#define CALLBACK
215#endif
216
217#else // !__WIN32__
218
219#if !defined(FAR)
220#define FAR
221#endif
222#if !defined(NEAR)
223#define NEAR
224#endif
225#if !defined(DEF)
226// default pointer type is FAR, if you want near pointer just redefine it to NEAR
227#define DEF
228#endif
229#if !defined(CALLBACK)
230#define CALLBACK
231#endif
232
233#endif // !__WIN32__
234
235
236
237
238/****** Common pointer types ***********************************************/
239
240#if! defined(__CPU8051)
241
242typedef signed char DEF* PI8;
243typedef signed short DEF* PI16;
244typedef signed long DEF* PI32;
245
246typedef unsigned char DEF* PU8;
247typedef unsigned short DEF* PU16;
248typedef unsigned long DEF* PU32;
249
250#if defined(__WIN32)
251typedef signed __int64 DEF* PI64;
252typedef unsigned __int64 DEF* PU64;
253#endif // __WIN32
254
255#if !defined(_WIN64)
256typedef unsigned long ULONG_PTR; // 32-bit
257typedef unsigned long DWORD_PTR; // 32-bit
258#endif // _WIN64
259
260
261// boolean pointer
262typedef int DEF* PBOOL;
263typedef int NEAR* NPBOOL;
264typedef int FAR* LPBOOL;
265
266typedef int DEF* PINT;
267typedef int NEAR* NPINT;
268typedef int FAR* LPINT;
269typedef const int DEF* PCINT;
270typedef const int NEAR* NPCINT;
271typedef const int FAR* LPCINT;
272
273typedef unsigned int DEF* PUINT;
274typedef const unsigned int DEF* PCUINT;
275
276typedef long DEF* PLONG;
277typedef long NEAR* NPLONG;
278typedef long FAR* LPLONG;
279//typedef const long DEF* PCLONG;
280typedef const long NEAR* NPCLONG;
281typedef const long FAR* LPCLONG;
282
283typedef BYTE DEF* PBYTE;
284typedef BYTE NEAR* NPBYTE;
285typedef BYTE FAR* LPBYTE;
286typedef const BYTE DEF* PCBYTE;
287typedef const BYTE NEAR* NPCBYTE;
288typedef const BYTE FAR* LPCBYTE;
289
290typedef WORD DEF* PWORD;
291typedef WORD NEAR* NPWORD;
292typedef WORD FAR* LPWORD;
293typedef const WORD DEF* PCWORD;
294typedef const WORD NEAR* NPCWORD;
295typedef const WORD FAR* LPCWORD;
296
297typedef DWORD DEF* PDWORD;
298typedef DWORD NEAR* NPDWORD;
299typedef DWORD FAR* LPDWORD;
300typedef const DWORD DEF* PCDWORD;
301typedef const DWORD NEAR* NPCDWORD;
302typedef const DWORD FAR* LPCDWORD;
303
304typedef QWORD DEF* PQWORD;
305typedef QWORD NEAR* NPQWORD;
306typedef QWORD FAR* LPQWORD;
307typedef const QWORD DEF* PCQWORD;
308typedef const QWORD NEAR* NPCQWORD;
309typedef const QWORD FAR* LPCQWORD;
310
311typedef void DEF* PVOID;
312typedef void NEAR* NPVOID;
313typedef void FAR* LPVOID;
314
315// handle declaration
316#ifdef STRICT
317typedef void *HANDLE;
318#else
319typedef PVOID HANDLE;
320#endif
321
322//
323// ANSI (Single-byte Character) types
324//
325typedef char DEF* PCH;
326typedef char NEAR* NPCH;
327typedef char FAR* LPCH;
328typedef const char DEF* PCCH;
329typedef const char NEAR* NPCCH;
330typedef const char FAR* LPCCH;
331
332typedef char DEF* PSTR;
333typedef char NEAR* NPSTR;
334typedef char FAR* LPSTR;
335typedef const char DEF* PCSTR;
336typedef const char NEAR* NPCSTR;
337typedef const char FAR* LPCSTR;
338
339#endif // !__CPU8051
340
341
342
343
344/****** Misc definitions, types ********************************************/
345
346// parameter prefix
347#ifndef IN
348#define IN
349#endif
350
351#ifndef OUT
352#define OUT
353#endif
354
355
356// unreferenced parameter macro to avoid warning message in MS C
357#if defined(__TURBOC__)
358
359//you should use "#pragma argsused" to avoid warning message in Borland C
360#ifndef UNREFERENCED_PARAMETER
361#define UNREFERENCED_PARAMETER(x)
362#endif
363
364#else
365
366#ifndef UNREFERENCED_PARAMETER
367//#define UNREFERENCED_PARAMETER(x) x
368#define UNREFERENCED_PARAMETER(x)
369#endif
370
371#endif
372
373
374// in-line assembly prefix
375#if defined(__TURBOC__)
376#define ASM asm
377#else // !__TURBOC__
378#define ASM _asm
379#endif // !__TURBOC__
380
381
382
383
384#endif // __TTYPE_H__
385
386