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 (
146 unsigned short wBeaconPeriod
,
147 unsigned short wATIMWindow
,
148 unsigned int uChannel
154 WMAC_CONFIG_MODE eOPMode
158 VNTWIFIpGetCurrentSSID(
163 VNTWIFIpGetCurrentChannel(
173 VNTWIFIbyGetMaxSupportRate (
174 PWLAN_IE_SUPP_RATES pSupportRateIEs
,
175 PWLAN_IE_SUPP_RATES pExtSupportRateIEs
179 VNTWIFIbyGetACKTxRate (
180 unsigned char byRxDataRate
,
181 PWLAN_IE_SUPP_RATES pSupportRateIEs
,
182 PWLAN_IE_SUPP_RATES pExtSupportRateIEs
186 VNTWIFIvSetAuthenticationMode (
188 WMAC_AUTHENTICATION_MODE eAuthMode
192 VNTWIFIvSetEncryptionMode (
194 WMAC_ENCRYPTION_MODE eEncryptionMode
199 VNTWIFIbConfigPhyMode(
201 CARD_PHY_TYPE ePhyType
205 VNTWIFIbGetConfigPhyMode(
211 VNTWIFIvQueryBSSList(void *pMgmtHandle
, unsigned int *puBSSCount
,
224 VNTWIFIvUpdateNodeTxCounter(
226 unsigned char *pbyDestAddress
,
228 unsigned short wRate
,
229 unsigned char *pbyTxFailCount
236 unsigned char *pbyDestAddress
,
237 unsigned short *pwTxDataRate
,
238 unsigned char *pbyACKRate
,
239 unsigned char *pbyCCKBasicRate
,
240 unsigned char *pbyOFDMBasicRate
245 void *pAdapterHandler,
251 VNTWIFIbyGetKeyCypher(
260 VNTWIFIbSetPMKIDCache (
262 unsigned long ulCount
,
267 VNTWIFIbCommandRunning (
272 VNTWIFIwGetMaxSupportRate(
284 VNTWIFIbMeasureReport(
288 unsigned char byReportMode
,
289 unsigned char byBasicMap
,
290 unsigned char byCCAFraction
,
291 unsigned char *pbyRPIs
295 VNTWIFIbChannelSwitch(
297 unsigned char byNewChannel
301 VNTWIFIbRadarPresent(
303 unsigned char byChannel
307 #endif //__VNTWIFI_H__