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
33 #if !defined(__TTYPE_H__)
36 #if !defined(__80211MGR_H__)
39 #if !defined(__CARD_H__)
43 /*--------------------- Export Definitions -------------------------*/
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
{
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
,
109 } WMAC_CONFIG_MODE
, *PWMAC_CONFIG_MODE
;
113 typedef enum tagWMAC_POWER_MODE
{
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 --------------------------*/
151 extern "C" { /* Assume C declarations for C++ */
152 #endif /* __cplusplus */
156 VNTWIFIvSetIBSSParameter (
157 IN PVOID pMgmtHandle
,
158 IN WORD wBeaconPeriod
,
165 IN PVOID pMgmtHandle
,
166 IN WMAC_CONFIG_MODE eOPMode
170 VNTWIFIpGetCurrentSSID(
175 VNTWIFIpGetCurrentChannel(
185 VNTWIFIbyGetMaxSupportRate (
186 IN PWLAN_IE_SUPP_RATES pSupportRateIEs
,
187 IN PWLAN_IE_SUPP_RATES pExtSupportRateIEs
191 VNTWIFIbyGetACKTxRate (
192 IN BYTE byRxDataRate
,
193 IN PWLAN_IE_SUPP_RATES pSupportRateIEs
,
194 IN PWLAN_IE_SUPP_RATES pExtSupportRateIEs
198 VNTWIFIvSetAuthenticationMode (
199 IN PVOID pMgmtHandle
,
200 IN WMAC_AUTHENTICATION_MODE eAuthMode
204 VNTWIFIvSetEncryptionMode (
205 IN PVOID pMgmtHandle
,
206 IN WMAC_ENCRYPTION_MODE eEncryptionMode
211 VNTWIFIbConfigPhyMode(
212 IN PVOID pMgmtHandle
,
213 IN CARD_PHY_TYPE ePhyType
217 VNTWIFIbGetConfigPhyMode(
218 IN PVOID pMgmtHandle
,
223 VNTWIFIvQueryBSSList(
224 IN PVOID pMgmtHandle
,
225 OUT PUINT puBSSCount
,
226 OUT PVOID
*pvFirstBSS
234 IN PVOID pMgmtHandle
,
235 IN PVOID pvCurrentBSS
,
242 VNTWIFIvUpdateNodeTxCounter(
243 IN PVOID pMgmtHandle
,
244 IN PBYTE pbyDestAddress
,
247 IN PBYTE pbyTxFailCount
253 IN PVOID pMgmtHandle
,
254 IN PBYTE pbyDestAddress
,
255 OUT PWORD pwTxDataRate
,
256 OUT PBYTE pbyACKRate
,
257 OUT PBYTE pbyCCKBasicRate
,
258 OUT PBYTE pbyOFDMBasicRate
263 IN PVOID pAdapterHandler,
264 OUT PVOID *pMgmtHandler
269 VNTWIFIbyGetKeyCypher(
270 IN PVOID pMgmtHandle
,
278 VNTWIFIbSetPMKIDCache (
279 IN PVOID pMgmtObject
,
285 VNTWIFIbCommandRunning (
290 VNTWIFIwGetMaxSupportRate(
297 IN PVOID pMgmtObject
,
302 VNTWIFIbMeasureReport(
303 IN PVOID pMgmtObject
,
304 IN BOOL bEndOfReport
,
305 IN PVOID pvMeasureEID
,
306 IN BYTE byReportMode
,
308 IN BYTE byCCAFraction
,
313 VNTWIFIbChannelSwitch(
314 IN PVOID pMgmtObject
,
319 VNTWIFIbRadarPresent(
320 IN PVOID pMgmtObject,
326 } /* End of extern "C" { */
327 #endif /* __cplusplus */
330 #endif //__VNTWIFI_H__