Staging: Add pristine upstream vt6655 driver sources
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / vt6655 / vntwifi.h
blob3e620a726212958e6070df8380b4fe2c957c239f
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 #if !defined(__TTYPE_H__)
34 #include "ttype.h"
35 #endif
36 #if !defined(__80211MGR_H__)
37 #include "80211mgr.h"
38 #endif
39 #if !defined(__CARD_H__)
40 #include "card.h"
41 #endif
43 /*--------------------- Export Definitions -------------------------*/
44 #define RATE_1M 0
45 #define RATE_2M 1
46 #define RATE_5M 2
47 #define RATE_11M 3
48 #define RATE_6M 4
49 #define RATE_9M 5
50 #define RATE_12M 6
51 #define RATE_18M 7
52 #define RATE_24M 8
53 #define RATE_36M 9
54 #define RATE_48M 10
55 #define RATE_54M 11
56 #define RATE_AUTO 12
57 #define MAX_RATE 12
59 // key CipherSuite
60 #define KEY_CTL_WEP 0x00
61 #define KEY_CTL_NONE 0x01
62 #define KEY_CTL_TKIP 0x02
63 #define KEY_CTL_CCMP 0x03
64 #define KEY_CTL_INVALID 0xFF
66 #define CHANNEL_MAX_24G 14
68 #define MAX_BSS_NUM 42
70 #define MAX_PMKID_CACHE 16
72 // Pre-configured Authenticaiton Mode (from XP)
73 typedef enum tagWMAC_AUTHENTICATION_MODE {
75 WMAC_AUTH_OPEN,
76 WMAC_AUTH_SHAREKEY,
77 WMAC_AUTH_AUTO,
78 WMAC_AUTH_WPA,
79 WMAC_AUTH_WPAPSK,
80 WMAC_AUTH_WPANONE,
81 WMAC_AUTH_WPA2,
82 WMAC_AUTH_WPA2PSK,
83 WMAC_AUTH_MAX // Not a real mode, defined as upper bound
85 } WMAC_AUTHENTICATION_MODE, *PWMAC_AUTHENTICATION_MODE;
87 typedef enum tagWMAC_ENCRYPTION_MODE {
89 WMAC_ENCRYPTION_WEPEnabled,
90 WMAC_ENCRYPTION_WEPDisabled,
91 WMAC_ENCRYPTION_WEPKeyAbsent,
92 WMAC_ENCRYPTION_WEPNotSupported,
93 WMAC_ENCRYPTION_TKIPEnabled,
94 WMAC_ENCRYPTION_TKIPKeyAbsent,
95 WMAC_ENCRYPTION_AESEnabled,
96 WMAC_ENCRYPTION_AESKeyAbsent
98 } WMAC_ENCRYPTION_MODE, *PWMAC_ENCRYPTION_MODE;
100 // Pre-configured Mode (from XP)
102 typedef enum tagWMAC_CONFIG_MODE {
104 WMAC_CONFIG_ESS_STA = 0,
105 WMAC_CONFIG_IBSS_STA,
106 WMAC_CONFIG_AUTO,
107 WMAC_CONFIG_AP
109 } WMAC_CONFIG_MODE, *PWMAC_CONFIG_MODE;
113 typedef enum tagWMAC_POWER_MODE {
115 WMAC_POWER_CAM,
116 WMAC_POWER_FAST,
117 WMAC_POWER_MAX
119 } WMAC_POWER_MODE, *PWMAC_POWER_MODE;
121 #define VNTWIFIbIsShortSlotTime(wCapInfo) \
122 WLAN_GET_CAP_INFO_SHORTSLOTTIME(wCapInfo) \
124 #define VNTWIFIbIsProtectMode(byERP) \
125 ((byERP & WLAN_EID_ERP_USE_PROTECTION) != 0) \
127 #define VNTWIFIbIsBarkerMode(byERP) \
128 ((byERP & WLAN_EID_ERP_BARKER_MODE) != 0) \
130 #define VNTWIFIbIsShortPreamble(wCapInfo) \
131 WLAN_GET_CAP_INFO_SHORTPREAMBLE(wCapInfo) \
133 #define VNTWIFIbIsEncryption(wCapInfo) \
134 WLAN_GET_CAP_INFO_PRIVACY(wCapInfo) \
136 #define VNTWIFIbIsESS(wCapInfo) \
137 WLAN_GET_CAP_INFO_ESS(wCapInfo) \
140 /*--------------------- Export Classes ----------------------------*/
142 /*--------------------- Export Variables --------------------------*/
145 /*--------------------- Export Types ------------------------------*/
148 /*--------------------- Export Functions --------------------------*/
150 #ifdef __cplusplus
151 extern "C" { /* Assume C declarations for C++ */
152 #endif /* __cplusplus */
155 VOID
156 VNTWIFIvSetIBSSParameter (
157 IN PVOID pMgmtHandle,
158 IN WORD wBeaconPeriod,
159 IN WORD wATIMWindow,
160 IN UINT uChannel
163 VOID
164 VNTWIFIvSetOPMode (
165 IN PVOID pMgmtHandle,
166 IN WMAC_CONFIG_MODE eOPMode
169 PWLAN_IE_SSID
170 VNTWIFIpGetCurrentSSID(
171 IN PVOID pMgmtHandle
174 UINT
175 VNTWIFIpGetCurrentChannel(
176 IN PVOID pMgmtHandle
179 WORD
180 VNTWIFIwGetAssocID (
181 IN PVOID pMgmtHandle
184 BYTE
185 VNTWIFIbyGetMaxSupportRate (
186 IN PWLAN_IE_SUPP_RATES pSupportRateIEs,
187 IN PWLAN_IE_SUPP_RATES pExtSupportRateIEs
190 BYTE
191 VNTWIFIbyGetACKTxRate (
192 IN BYTE byRxDataRate,
193 IN PWLAN_IE_SUPP_RATES pSupportRateIEs,
194 IN PWLAN_IE_SUPP_RATES pExtSupportRateIEs
197 VOID
198 VNTWIFIvSetAuthenticationMode (
199 IN PVOID pMgmtHandle,
200 IN WMAC_AUTHENTICATION_MODE eAuthMode
203 VOID
204 VNTWIFIvSetEncryptionMode (
205 IN PVOID pMgmtHandle,
206 IN WMAC_ENCRYPTION_MODE eEncryptionMode
210 BOOL
211 VNTWIFIbConfigPhyMode(
212 IN PVOID pMgmtHandle,
213 IN CARD_PHY_TYPE ePhyType
216 VOID
217 VNTWIFIbGetConfigPhyMode(
218 IN PVOID pMgmtHandle,
219 OUT PVOID pePhyType
222 VOID
223 VNTWIFIvQueryBSSList(
224 IN PVOID pMgmtHandle,
225 OUT PUINT puBSSCount,
226 OUT PVOID *pvFirstBSS
232 VOID
233 VNTWIFIvGetNextBSS (
234 IN PVOID pMgmtHandle,
235 IN PVOID pvCurrentBSS,
236 OUT PVOID *pvNextBSS
241 VOID
242 VNTWIFIvUpdateNodeTxCounter(
243 IN PVOID pMgmtHandle,
244 IN PBYTE pbyDestAddress,
245 IN BOOL bTxOk,
246 IN WORD wRate,
247 IN PBYTE pbyTxFailCount
251 VOID
252 VNTWIFIvGetTxRate(
253 IN PVOID pMgmtHandle,
254 IN PBYTE pbyDestAddress,
255 OUT PWORD pwTxDataRate,
256 OUT PBYTE pbyACKRate,
257 OUT PBYTE pbyCCKBasicRate,
258 OUT PBYTE pbyOFDMBasicRate
261 BOOL
262 VNTWIFIbInit(
263 IN PVOID pAdapterHandler,
264 OUT PVOID *pMgmtHandler
268 BYTE
269 VNTWIFIbyGetKeyCypher(
270 IN PVOID pMgmtHandle,
271 IN BOOL bGroupKey
277 BOOL
278 VNTWIFIbSetPMKIDCache (
279 IN PVOID pMgmtObject,
280 IN ULONG ulCount,
281 IN PVOID pPMKIDInfo
284 BOOL
285 VNTWIFIbCommandRunning (
286 IN PVOID pMgmtObject
289 WORD
290 VNTWIFIwGetMaxSupportRate(
291 IN PVOID pMgmtObject
294 // for 802.11h
295 VOID
296 VNTWIFIvSet11h (
297 IN PVOID pMgmtObject,
298 IN BOOL b11hEnable
301 BOOL
302 VNTWIFIbMeasureReport(
303 IN PVOID pMgmtObject,
304 IN BOOL bEndOfReport,
305 IN PVOID pvMeasureEID,
306 IN BYTE byReportMode,
307 IN BYTE byBasicMap,
308 IN BYTE byCCAFraction,
309 IN PBYTE pbyRPIs
312 BOOL
313 VNTWIFIbChannelSwitch(
314 IN PVOID pMgmtObject,
315 IN BYTE byNewChannel
318 BOOL
319 VNTWIFIbRadarPresent(
320 IN PVOID pMgmtObject,
321 IN BYTE byChannel
325 #ifdef __cplusplus
326 } /* End of extern "C" { */
327 #endif /* __cplusplus */
330 #endif //__VNTWIFI_H__