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
{
75 WMAC_AUTH_MAX
// Not a real mode, defined as upper bound
76 } WMAC_AUTHENTICATION_MODE
, *PWMAC_AUTHENTICATION_MODE
;
78 typedef enum tagWMAC_ENCRYPTION_MODE
{
79 WMAC_ENCRYPTION_WEPEnabled
,
80 WMAC_ENCRYPTION_WEPDisabled
,
81 WMAC_ENCRYPTION_WEPKeyAbsent
,
82 WMAC_ENCRYPTION_WEPNotSupported
,
83 WMAC_ENCRYPTION_TKIPEnabled
,
84 WMAC_ENCRYPTION_TKIPKeyAbsent
,
85 WMAC_ENCRYPTION_AESEnabled
,
86 WMAC_ENCRYPTION_AESKeyAbsent
87 } WMAC_ENCRYPTION_MODE
, *PWMAC_ENCRYPTION_MODE
;
89 // Pre-configured Mode (from XP)
91 typedef enum tagWMAC_CONFIG_MODE
{
92 WMAC_CONFIG_ESS_STA
= 0,
96 } WMAC_CONFIG_MODE
, *PWMAC_CONFIG_MODE
;
98 typedef enum tagWMAC_POWER_MODE
{
102 } WMAC_POWER_MODE
, *PWMAC_POWER_MODE
;
104 #define VNTWIFIbIsShortSlotTime(wCapInfo) \
105 WLAN_GET_CAP_INFO_SHORTSLOTTIME(wCapInfo) \
107 #define VNTWIFIbIsProtectMode(byERP) \
108 ((byERP & WLAN_EID_ERP_USE_PROTECTION) != 0) \
110 #define VNTWIFIbIsBarkerMode(byERP) \
111 ((byERP & WLAN_EID_ERP_BARKER_MODE) != 0) \
113 #define VNTWIFIbIsShortPreamble(wCapInfo) \
114 WLAN_GET_CAP_INFO_SHORTPREAMBLE(wCapInfo) \
116 #define VNTWIFIbIsEncryption(wCapInfo) \
117 WLAN_GET_CAP_INFO_PRIVACY(wCapInfo) \
119 #define VNTWIFIbIsESS(wCapInfo) \
120 WLAN_GET_CAP_INFO_ESS(wCapInfo) \
122 /*--------------------- Export Classes ----------------------------*/
124 /*--------------------- Export Variables --------------------------*/
126 /*--------------------- Export Types ------------------------------*/
128 /*--------------------- Export Functions --------------------------*/
131 VNTWIFIvSetIBSSParameter(
133 unsigned short wBeaconPeriod
,
134 unsigned short wATIMWindow
,
135 unsigned int uChannel
141 WMAC_CONFIG_MODE eOPMode
145 VNTWIFIpGetCurrentSSID(
150 VNTWIFIpGetCurrentChannel(
160 VNTWIFIbyGetMaxSupportRate(
161 PWLAN_IE_SUPP_RATES pSupportRateIEs
,
162 PWLAN_IE_SUPP_RATES pExtSupportRateIEs
166 VNTWIFIbyGetACKTxRate(
167 unsigned char byRxDataRate
,
168 PWLAN_IE_SUPP_RATES pSupportRateIEs
,
169 PWLAN_IE_SUPP_RATES pExtSupportRateIEs
173 VNTWIFIvSetAuthenticationMode(
175 WMAC_AUTHENTICATION_MODE eAuthMode
179 VNTWIFIvSetEncryptionMode(
181 WMAC_ENCRYPTION_MODE eEncryptionMode
185 VNTWIFIbConfigPhyMode(
187 CARD_PHY_TYPE ePhyType
191 VNTWIFIbGetConfigPhyMode(
197 VNTWIFIvQueryBSSList(void *pMgmtHandle
, unsigned int *puBSSCount
,
208 VNTWIFIvUpdateNodeTxCounter(
210 unsigned char *pbyDestAddress
,
212 unsigned short wRate
,
213 unsigned char *pbyTxFailCount
219 unsigned char *pbyDestAddress
,
220 unsigned short *pwTxDataRate
,
221 unsigned char *pbyACKRate
,
222 unsigned char *pbyCCKBasicRate
,
223 unsigned char *pbyOFDMBasicRate
227 VNTWIFIbyGetKeyCypher(
233 VNTWIFIbSetPMKIDCache(
235 unsigned long ulCount
,
240 VNTWIFIbCommandRunning(
245 VNTWIFIwGetMaxSupportRate(
257 VNTWIFIbMeasureReport(
261 unsigned char byReportMode
,
262 unsigned char byBasicMap
,
263 unsigned char byCCAFraction
,
264 unsigned char *pbyRPIs
268 VNTWIFIbChannelSwitch(
270 unsigned char byNewChannel
273 #endif //__VNTWIFI_H__