x86/xen: resume timer irqs early
[linux/fpc-iii.git] / drivers / staging / vt6655 / vntwifi.h
blob4b01ebd7299a658099fc45c2136e7c7252c042e6
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 {
67 WMAC_AUTH_OPEN,
68 WMAC_AUTH_SHAREKEY,
69 WMAC_AUTH_AUTO,
70 WMAC_AUTH_WPA,
71 WMAC_AUTH_WPAPSK,
72 WMAC_AUTH_WPANONE,
73 WMAC_AUTH_WPA2,
74 WMAC_AUTH_WPA2PSK,
75 WMAC_AUTH_MAX // Not a real mode, defined as upper bound
76 } WMAC_AUTHENTICATION_MODE, *PWMAC_AUTHENTICATION_MODE;
78 typedef enum tagWMAC_ENCRYPTION_MODE {
79 WMAC_ENCRYPTION_WEPEnabled,
80 WMAC_ENCRYPTION_WEPDisabled,
81 WMAC_ENCRYPTION_WEPKeyAbsent,
82 WMAC_ENCRYPTION_WEPNotSupported,
83 WMAC_ENCRYPTION_TKIPEnabled,
84 WMAC_ENCRYPTION_TKIPKeyAbsent,
85 WMAC_ENCRYPTION_AESEnabled,
86 WMAC_ENCRYPTION_AESKeyAbsent
87 } WMAC_ENCRYPTION_MODE, *PWMAC_ENCRYPTION_MODE;
89 // Pre-configured Mode (from XP)
91 typedef enum tagWMAC_CONFIG_MODE {
92 WMAC_CONFIG_ESS_STA = 0,
93 WMAC_CONFIG_IBSS_STA,
94 WMAC_CONFIG_AUTO,
95 WMAC_CONFIG_AP
96 } WMAC_CONFIG_MODE, *PWMAC_CONFIG_MODE;
98 typedef enum tagWMAC_POWER_MODE {
99 WMAC_POWER_CAM,
100 WMAC_POWER_FAST,
101 WMAC_POWER_MAX
102 } WMAC_POWER_MODE, *PWMAC_POWER_MODE;
104 #define VNTWIFIbIsShortSlotTime(wCapInfo) \
105 WLAN_GET_CAP_INFO_SHORTSLOTTIME(wCapInfo) \
107 #define VNTWIFIbIsProtectMode(byERP) \
108 ((byERP & WLAN_EID_ERP_USE_PROTECTION) != 0) \
110 #define VNTWIFIbIsBarkerMode(byERP) \
111 ((byERP & WLAN_EID_ERP_BARKER_MODE) != 0) \
113 #define VNTWIFIbIsShortPreamble(wCapInfo) \
114 WLAN_GET_CAP_INFO_SHORTPREAMBLE(wCapInfo) \
116 #define VNTWIFIbIsEncryption(wCapInfo) \
117 WLAN_GET_CAP_INFO_PRIVACY(wCapInfo) \
119 #define VNTWIFIbIsESS(wCapInfo) \
120 WLAN_GET_CAP_INFO_ESS(wCapInfo) \
122 /*--------------------- Export Classes ----------------------------*/
124 /*--------------------- Export Variables --------------------------*/
126 /*--------------------- Export Types ------------------------------*/
128 /*--------------------- Export Functions --------------------------*/
130 void
131 VNTWIFIvSetIBSSParameter(
132 void *pMgmtHandle,
133 unsigned short wBeaconPeriod,
134 unsigned short wATIMWindow,
135 unsigned int uChannel
138 void
139 VNTWIFIvSetOPMode(
140 void *pMgmtHandle,
141 WMAC_CONFIG_MODE eOPMode
144 PWLAN_IE_SSID
145 VNTWIFIpGetCurrentSSID(
146 void *pMgmtHandle
149 unsigned int
150 VNTWIFIpGetCurrentChannel(
151 void *pMgmtHandle
154 unsigned short
155 VNTWIFIwGetAssocID(
156 void *pMgmtHandle
159 unsigned char
160 VNTWIFIbyGetMaxSupportRate(
161 PWLAN_IE_SUPP_RATES pSupportRateIEs,
162 PWLAN_IE_SUPP_RATES pExtSupportRateIEs
165 unsigned char
166 VNTWIFIbyGetACKTxRate(
167 unsigned char byRxDataRate,
168 PWLAN_IE_SUPP_RATES pSupportRateIEs,
169 PWLAN_IE_SUPP_RATES pExtSupportRateIEs
172 void
173 VNTWIFIvSetAuthenticationMode(
174 void *pMgmtHandle,
175 WMAC_AUTHENTICATION_MODE eAuthMode
178 void
179 VNTWIFIvSetEncryptionMode(
180 void *pMgmtHandle,
181 WMAC_ENCRYPTION_MODE eEncryptionMode
184 bool
185 VNTWIFIbConfigPhyMode(
186 void *pMgmtHandle,
187 CARD_PHY_TYPE ePhyType
190 void
191 VNTWIFIbGetConfigPhyMode(
192 void *pMgmtHandle,
193 void *pePhyType
196 void
197 VNTWIFIvQueryBSSList(void *pMgmtHandle, unsigned int *puBSSCount,
198 void **pvFirstBSS);
200 void
201 VNTWIFIvGetNextBSS(
202 void *pMgmtHandle,
203 void *pvCurrentBSS,
204 void **pvNextBSS
207 void
208 VNTWIFIvUpdateNodeTxCounter(
209 void *pMgmtHandle,
210 unsigned char *pbyDestAddress,
211 bool bTxOk,
212 unsigned short wRate,
213 unsigned char *pbyTxFailCount
216 void
217 VNTWIFIvGetTxRate(
218 void *pMgmtHandle,
219 unsigned char *pbyDestAddress,
220 unsigned short *pwTxDataRate,
221 unsigned char *pbyACKRate,
222 unsigned char *pbyCCKBasicRate,
223 unsigned char *pbyOFDMBasicRate
226 bool
227 VNTWIFIbInit(
228 void *pAdapterHandler,
229 void **pMgmtHandler
233 unsigned char
234 VNTWIFIbyGetKeyCypher(
235 void *pMgmtHandle,
236 bool bGroupKey
239 bool
240 VNTWIFIbSetPMKIDCache(
241 void *pMgmtObject,
242 unsigned long ulCount,
243 void *pPMKIDInfo
246 bool
247 VNTWIFIbCommandRunning(
248 void *pMgmtObject
251 unsigned short
252 VNTWIFIwGetMaxSupportRate(
253 void *pMgmtObject
256 // for 802.11h
257 void
258 VNTWIFIvSet11h(
259 void *pMgmtObject,
260 bool b11hEnable
263 bool
264 VNTWIFIbMeasureReport(
265 void *pMgmtObject,
266 bool bEndOfReport,
267 void *pvMeasureEID,
268 unsigned char byReportMode,
269 unsigned char byBasicMap,
270 unsigned char byCCAFraction,
271 unsigned char *pbyRPIs
274 bool
275 VNTWIFIbChannelSwitch(
276 void *pMgmtObject,
277 unsigned char byNewChannel
280 bool
281 VNTWIFIbRadarPresent(
282 void *pMgmtObject,
283 unsigned char byChannel
287 #endif //__VNTWIFI_H__