2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
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.
22 * Purpose: export VNT Host WiFi library function
24 * Author: Yiching Chen
38 /*--------------------- Export Definitions -------------------------*/
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
{
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,
102 } WMAC_CONFIG_MODE
, *PWMAC_CONFIG_MODE
;
106 typedef enum tagWMAC_POWER_MODE
{
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 --------------------------*/
144 VNTWIFIvSetIBSSParameter (
145 IN PVOID pMgmtHandle
,
146 IN WORD wBeaconPeriod
,
153 IN PVOID pMgmtHandle
,
154 IN WMAC_CONFIG_MODE eOPMode
158 VNTWIFIpGetCurrentSSID(
163 VNTWIFIpGetCurrentChannel(
173 VNTWIFIbyGetMaxSupportRate (
174 IN PWLAN_IE_SUPP_RATES pSupportRateIEs
,
175 IN PWLAN_IE_SUPP_RATES pExtSupportRateIEs
179 VNTWIFIbyGetACKTxRate (
180 IN BYTE byRxDataRate
,
181 IN PWLAN_IE_SUPP_RATES pSupportRateIEs
,
182 IN PWLAN_IE_SUPP_RATES pExtSupportRateIEs
186 VNTWIFIvSetAuthenticationMode (
187 IN PVOID pMgmtHandle
,
188 IN WMAC_AUTHENTICATION_MODE eAuthMode
192 VNTWIFIvSetEncryptionMode (
193 IN PVOID pMgmtHandle
,
194 IN WMAC_ENCRYPTION_MODE eEncryptionMode
199 VNTWIFIbConfigPhyMode(
200 IN PVOID pMgmtHandle
,
201 IN CARD_PHY_TYPE ePhyType
205 VNTWIFIbGetConfigPhyMode(
206 IN PVOID pMgmtHandle
,
211 VNTWIFIvQueryBSSList(
212 IN PVOID pMgmtHandle
,
213 OUT PUINT puBSSCount
,
214 OUT PVOID
*pvFirstBSS
222 IN PVOID pMgmtHandle
,
223 IN PVOID pvCurrentBSS
,
230 VNTWIFIvUpdateNodeTxCounter(
231 IN PVOID pMgmtHandle
,
232 IN PBYTE pbyDestAddress
,
235 IN PBYTE pbyTxFailCount
241 IN PVOID pMgmtHandle
,
242 IN PBYTE pbyDestAddress
,
243 OUT PWORD pwTxDataRate
,
244 OUT PBYTE pbyACKRate
,
245 OUT PBYTE pbyCCKBasicRate
,
246 OUT PBYTE pbyOFDMBasicRate
251 IN PVOID pAdapterHandler,
252 OUT PVOID *pMgmtHandler
257 VNTWIFIbyGetKeyCypher(
258 IN PVOID pMgmtHandle
,
266 VNTWIFIbSetPMKIDCache (
267 IN PVOID pMgmtObject
,
273 VNTWIFIbCommandRunning (
278 VNTWIFIwGetMaxSupportRate(
285 IN PVOID pMgmtObject
,
290 VNTWIFIbMeasureReport(
291 IN PVOID pMgmtObject
,
292 IN BOOL bEndOfReport
,
293 IN PVOID pvMeasureEID
,
294 IN BYTE byReportMode
,
296 IN BYTE byCCAFraction
,
301 VNTWIFIbChannelSwitch(
302 IN PVOID pMgmtObject
,
307 VNTWIFIbRadarPresent(
308 IN PVOID pMgmtObject,
313 #endif //__VNTWIFI_H__