i2c-eg20t: change timeout value 50msec to 1000msec
[zen-stable.git] / drivers / staging / vt6655 / vntwifi.h
blobf4327abaa773f400e1a5a7131c8f20e3f9ace4dc
1 /*
2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3 * All rights reserved.
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.
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.
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.
20 * File: vntwifi.h
22 * Purpose: export VNT Host WiFi library function
24 * Author: Yiching Chen
26 * Date: Jan 7, 2004
30 #ifndef __VNTWIFI_H__
31 #define __VNTWIFI_H__
33 #include "ttype.h"
34 #include "80211mgr.h"
35 #include "card.h"
36 #include "wpa2.h"
38 /*--------------------- Export Definitions -------------------------*/
39 #define RATE_1M 0
40 #define RATE_2M 1
41 #define RATE_5M 2
42 #define RATE_11M 3
43 #define RATE_6M 4
44 #define RATE_9M 5
45 #define RATE_12M 6
46 #define RATE_18M 7
47 #define RATE_24M 8
48 #define RATE_36M 9
49 #define RATE_48M 10
50 #define RATE_54M 11
51 #define RATE_AUTO 12
52 #define MAX_RATE 12
54 // key CipherSuite
55 #define KEY_CTL_WEP 0x00
56 #define KEY_CTL_NONE 0x01
57 #define KEY_CTL_TKIP 0x02
58 #define KEY_CTL_CCMP 0x03
59 #define KEY_CTL_INVALID 0xFF
61 #define CHANNEL_MAX_24G 14
63 #define MAX_BSS_NUM 42
65 // Pre-configured Authenticaiton Mode (from XP)
66 typedef enum tagWMAC_AUTHENTICATION_MODE {
68 WMAC_AUTH_OPEN,
69 WMAC_AUTH_SHAREKEY,
70 WMAC_AUTH_AUTO,
71 WMAC_AUTH_WPA,
72 WMAC_AUTH_WPAPSK,
73 WMAC_AUTH_WPANONE,
74 WMAC_AUTH_WPA2,
75 WMAC_AUTH_WPA2PSK,
76 WMAC_AUTH_MAX // Not a real mode, defined as upper bound
78 } WMAC_AUTHENTICATION_MODE, *PWMAC_AUTHENTICATION_MODE;
80 typedef enum tagWMAC_ENCRYPTION_MODE {
82 WMAC_ENCRYPTION_WEPEnabled,
83 WMAC_ENCRYPTION_WEPDisabled,
84 WMAC_ENCRYPTION_WEPKeyAbsent,
85 WMAC_ENCRYPTION_WEPNotSupported,
86 WMAC_ENCRYPTION_TKIPEnabled,
87 WMAC_ENCRYPTION_TKIPKeyAbsent,
88 WMAC_ENCRYPTION_AESEnabled,
89 WMAC_ENCRYPTION_AESKeyAbsent
91 } WMAC_ENCRYPTION_MODE, *PWMAC_ENCRYPTION_MODE;
93 // Pre-configured Mode (from XP)
95 typedef enum tagWMAC_CONFIG_MODE {
97 WMAC_CONFIG_ESS_STA = 0,
98 WMAC_CONFIG_IBSS_STA,
99 WMAC_CONFIG_AUTO,
100 WMAC_CONFIG_AP
102 } WMAC_CONFIG_MODE, *PWMAC_CONFIG_MODE;
106 typedef enum tagWMAC_POWER_MODE {
108 WMAC_POWER_CAM,
109 WMAC_POWER_FAST,
110 WMAC_POWER_MAX
112 } WMAC_POWER_MODE, *PWMAC_POWER_MODE;
114 #define VNTWIFIbIsShortSlotTime(wCapInfo) \
115 WLAN_GET_CAP_INFO_SHORTSLOTTIME(wCapInfo) \
117 #define VNTWIFIbIsProtectMode(byERP) \
118 ((byERP & WLAN_EID_ERP_USE_PROTECTION) != 0) \
120 #define VNTWIFIbIsBarkerMode(byERP) \
121 ((byERP & WLAN_EID_ERP_BARKER_MODE) != 0) \
123 #define VNTWIFIbIsShortPreamble(wCapInfo) \
124 WLAN_GET_CAP_INFO_SHORTPREAMBLE(wCapInfo) \
126 #define VNTWIFIbIsEncryption(wCapInfo) \
127 WLAN_GET_CAP_INFO_PRIVACY(wCapInfo) \
129 #define VNTWIFIbIsESS(wCapInfo) \
130 WLAN_GET_CAP_INFO_ESS(wCapInfo) \
133 /*--------------------- Export Classes ----------------------------*/
135 /*--------------------- Export Variables --------------------------*/
138 /*--------------------- Export Types ------------------------------*/
141 /*--------------------- Export Functions --------------------------*/
143 void
144 VNTWIFIvSetIBSSParameter (
145 void *pMgmtHandle,
146 unsigned short wBeaconPeriod,
147 unsigned short wATIMWindow,
148 unsigned int uChannel
151 void
152 VNTWIFIvSetOPMode (
153 void *pMgmtHandle,
154 WMAC_CONFIG_MODE eOPMode
157 PWLAN_IE_SSID
158 VNTWIFIpGetCurrentSSID(
159 void *pMgmtHandle
162 unsigned int
163 VNTWIFIpGetCurrentChannel(
164 void *pMgmtHandle
167 unsigned short
168 VNTWIFIwGetAssocID (
169 void *pMgmtHandle
172 unsigned char
173 VNTWIFIbyGetMaxSupportRate (
174 PWLAN_IE_SUPP_RATES pSupportRateIEs,
175 PWLAN_IE_SUPP_RATES pExtSupportRateIEs
178 unsigned char
179 VNTWIFIbyGetACKTxRate (
180 unsigned char byRxDataRate,
181 PWLAN_IE_SUPP_RATES pSupportRateIEs,
182 PWLAN_IE_SUPP_RATES pExtSupportRateIEs
185 void
186 VNTWIFIvSetAuthenticationMode (
187 void *pMgmtHandle,
188 WMAC_AUTHENTICATION_MODE eAuthMode
191 void
192 VNTWIFIvSetEncryptionMode (
193 void *pMgmtHandle,
194 WMAC_ENCRYPTION_MODE eEncryptionMode
198 bool
199 VNTWIFIbConfigPhyMode(
200 void *pMgmtHandle,
201 CARD_PHY_TYPE ePhyType
204 void
205 VNTWIFIbGetConfigPhyMode(
206 void *pMgmtHandle,
207 void *pePhyType
210 void
211 VNTWIFIvQueryBSSList(void *pMgmtHandle, unsigned int *puBSSCount,
212 void **pvFirstBSS);
214 void
215 VNTWIFIvGetNextBSS (
216 void *pMgmtHandle,
217 void *pvCurrentBSS,
218 void **pvNextBSS
223 void
224 VNTWIFIvUpdateNodeTxCounter(
225 void *pMgmtHandle,
226 unsigned char *pbyDestAddress,
227 bool bTxOk,
228 unsigned short wRate,
229 unsigned char *pbyTxFailCount
233 void
234 VNTWIFIvGetTxRate(
235 void *pMgmtHandle,
236 unsigned char *pbyDestAddress,
237 unsigned short *pwTxDataRate,
238 unsigned char *pbyACKRate,
239 unsigned char *pbyCCKBasicRate,
240 unsigned char *pbyOFDMBasicRate
243 bool
244 VNTWIFIbInit(
245 void *pAdapterHandler,
246 void **pMgmtHandler
250 unsigned char
251 VNTWIFIbyGetKeyCypher(
252 void *pMgmtHandle,
253 bool bGroupKey
259 bool
260 VNTWIFIbSetPMKIDCache (
261 void *pMgmtObject,
262 unsigned long ulCount,
263 void *pPMKIDInfo
266 bool
267 VNTWIFIbCommandRunning (
268 void *pMgmtObject
271 unsigned short
272 VNTWIFIwGetMaxSupportRate(
273 void *pMgmtObject
276 // for 802.11h
277 void
278 VNTWIFIvSet11h (
279 void *pMgmtObject,
280 bool b11hEnable
283 bool
284 VNTWIFIbMeasureReport(
285 void *pMgmtObject,
286 bool bEndOfReport,
287 void *pvMeasureEID,
288 unsigned char byReportMode,
289 unsigned char byBasicMap,
290 unsigned char byCCAFraction,
291 unsigned char *pbyRPIs
294 bool
295 VNTWIFIbChannelSwitch(
296 void *pMgmtObject,
297 unsigned char byNewChannel
300 bool
301 VNTWIFIbRadarPresent(
302 void *pMgmtObject,
303 unsigned char byChannel
307 #endif //__VNTWIFI_H__