x86/amd-iommu: Add function to complete a tlb flush
[linux/fpc-iii.git] / drivers / staging / vt6655 / vntwifi.h
blob2854dfcb19aa4a29e25434d8722ad6a615a4bb14
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 IN PVOID pMgmtHandle,
146 IN WORD wBeaconPeriod,
147 IN WORD wATIMWindow,
148 IN UINT uChannel
151 VOID
152 VNTWIFIvSetOPMode (
153 IN PVOID pMgmtHandle,
154 IN WMAC_CONFIG_MODE eOPMode
157 PWLAN_IE_SSID
158 VNTWIFIpGetCurrentSSID(
159 IN PVOID pMgmtHandle
162 UINT
163 VNTWIFIpGetCurrentChannel(
164 IN PVOID pMgmtHandle
167 WORD
168 VNTWIFIwGetAssocID (
169 IN PVOID pMgmtHandle
172 BYTE
173 VNTWIFIbyGetMaxSupportRate (
174 IN PWLAN_IE_SUPP_RATES pSupportRateIEs,
175 IN PWLAN_IE_SUPP_RATES pExtSupportRateIEs
178 BYTE
179 VNTWIFIbyGetACKTxRate (
180 IN BYTE byRxDataRate,
181 IN PWLAN_IE_SUPP_RATES pSupportRateIEs,
182 IN PWLAN_IE_SUPP_RATES pExtSupportRateIEs
185 VOID
186 VNTWIFIvSetAuthenticationMode (
187 IN PVOID pMgmtHandle,
188 IN WMAC_AUTHENTICATION_MODE eAuthMode
191 VOID
192 VNTWIFIvSetEncryptionMode (
193 IN PVOID pMgmtHandle,
194 IN WMAC_ENCRYPTION_MODE eEncryptionMode
198 BOOL
199 VNTWIFIbConfigPhyMode(
200 IN PVOID pMgmtHandle,
201 IN CARD_PHY_TYPE ePhyType
204 VOID
205 VNTWIFIbGetConfigPhyMode(
206 IN PVOID pMgmtHandle,
207 OUT PVOID pePhyType
210 VOID
211 VNTWIFIvQueryBSSList(
212 IN PVOID pMgmtHandle,
213 OUT PUINT puBSSCount,
214 OUT PVOID *pvFirstBSS
220 VOID
221 VNTWIFIvGetNextBSS (
222 IN PVOID pMgmtHandle,
223 IN PVOID pvCurrentBSS,
224 OUT PVOID *pvNextBSS
229 VOID
230 VNTWIFIvUpdateNodeTxCounter(
231 IN PVOID pMgmtHandle,
232 IN PBYTE pbyDestAddress,
233 IN BOOL bTxOk,
234 IN WORD wRate,
235 IN PBYTE pbyTxFailCount
239 VOID
240 VNTWIFIvGetTxRate(
241 IN PVOID pMgmtHandle,
242 IN PBYTE pbyDestAddress,
243 OUT PWORD pwTxDataRate,
244 OUT PBYTE pbyACKRate,
245 OUT PBYTE pbyCCKBasicRate,
246 OUT PBYTE pbyOFDMBasicRate
249 BOOL
250 VNTWIFIbInit(
251 IN PVOID pAdapterHandler,
252 OUT PVOID *pMgmtHandler
256 BYTE
257 VNTWIFIbyGetKeyCypher(
258 IN PVOID pMgmtHandle,
259 IN BOOL bGroupKey
265 BOOL
266 VNTWIFIbSetPMKIDCache (
267 IN PVOID pMgmtObject,
268 IN ULONG ulCount,
269 IN PVOID pPMKIDInfo
272 BOOL
273 VNTWIFIbCommandRunning (
274 IN PVOID pMgmtObject
277 WORD
278 VNTWIFIwGetMaxSupportRate(
279 IN PVOID pMgmtObject
282 // for 802.11h
283 VOID
284 VNTWIFIvSet11h (
285 IN PVOID pMgmtObject,
286 IN BOOL b11hEnable
289 BOOL
290 VNTWIFIbMeasureReport(
291 IN PVOID pMgmtObject,
292 IN BOOL bEndOfReport,
293 IN PVOID pvMeasureEID,
294 IN BYTE byReportMode,
295 IN BYTE byBasicMap,
296 IN BYTE byCCAFraction,
297 IN PBYTE pbyRPIs
300 BOOL
301 VNTWIFIbChannelSwitch(
302 IN PVOID pMgmtObject,
303 IN BYTE byNewChannel
306 BOOL
307 VNTWIFIbRadarPresent(
308 IN PVOID pMgmtObject,
309 IN BYTE byChannel
313 #endif //__VNTWIFI_H__