Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vntwifi.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3  * All rights reserved.
4  *
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.
9  *
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.
14  *
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.
18  *
19  *
20  * File: vntwifi.h
21  *
22  * Purpose: export VNT Host WiFi library function
23  *
24  * Author: Yiching Chen
25  *
26  * Date: Jan 7, 2004
27  *
28  */
29 
30 #ifndef __VNTWIFI_H__
31 #define __VNTWIFI_H__
32 
33 #include "ttype.h"
34 #include "80211mgr.h"
35 #include "card.h"
36 #include "wpa2.h"
37 
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
53 
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
60 
61 #define CHANNEL_MAX_24G 14
62 
63 #define MAX_BSS_NUM 42
64 
65 // Pre-configured Authenticaiton Mode (from XP)
67 
76  WMAC_AUTH_MAX // Not a real mode, defined as upper bound
77 
79 
81 
90 
92 
93 // Pre-configured Mode (from XP)
94 
95 typedef enum tagWMAC_CONFIG_MODE {
96 
101 
103 
104 
105 
106 typedef enum tagWMAC_POWER_MODE {
107 
111 
113 
114 #define VNTWIFIbIsShortSlotTime(wCapInfo) \
115  WLAN_GET_CAP_INFO_SHORTSLOTTIME(wCapInfo) \
116 
117 #define VNTWIFIbIsProtectMode(byERP) \
118  ((byERP & WLAN_EID_ERP_USE_PROTECTION) != 0) \
119 
120 #define VNTWIFIbIsBarkerMode(byERP) \
121  ((byERP & WLAN_EID_ERP_BARKER_MODE) != 0) \
122 
123 #define VNTWIFIbIsShortPreamble(wCapInfo) \
124  WLAN_GET_CAP_INFO_SHORTPREAMBLE(wCapInfo) \
125 
126 #define VNTWIFIbIsEncryption(wCapInfo) \
127  WLAN_GET_CAP_INFO_PRIVACY(wCapInfo) \
128 
129 #define VNTWIFIbIsESS(wCapInfo) \
130  WLAN_GET_CAP_INFO_ESS(wCapInfo) \
131 
132 
133 /*--------------------- Export Classes ----------------------------*/
134 
135 /*--------------------- Export Variables --------------------------*/
136 
137 
138 /*--------------------- Export Types ------------------------------*/
139 
140 
141 /*--------------------- Export Functions --------------------------*/
142 
143 void
145  void *pMgmtHandle,
146  unsigned short wBeaconPeriod,
147  unsigned short wATIMWindow,
148  unsigned int uChannel
149  );
150 
151 void
153  void *pMgmtHandle,
154  WMAC_CONFIG_MODE eOPMode
155  );
156 
159  void *pMgmtHandle
160  );
161 
162 unsigned int
164  void *pMgmtHandle
165  );
166 
167 unsigned short
169  void *pMgmtHandle
170  );
171 
172 unsigned char
174  PWLAN_IE_SUPP_RATES pSupportRateIEs,
175  PWLAN_IE_SUPP_RATES pExtSupportRateIEs
176  );
177 
178 unsigned char
180  unsigned char byRxDataRate,
181  PWLAN_IE_SUPP_RATES pSupportRateIEs,
182  PWLAN_IE_SUPP_RATES pExtSupportRateIEs
183  );
184 
185 void
187  void *pMgmtHandle,
188  WMAC_AUTHENTICATION_MODE eAuthMode
189  );
190 
191 void
193  void *pMgmtHandle,
194  WMAC_ENCRYPTION_MODE eEncryptionMode
195  );
196 
197 
198 bool
200  void *pMgmtHandle,
201  CARD_PHY_TYPE ePhyType
202  );
203 
204 void
206  void *pMgmtHandle,
207  void *pePhyType
208  );
209 
210 void
211 VNTWIFIvQueryBSSList(void *pMgmtHandle, unsigned int *puBSSCount,
212  void **pvFirstBSS);
213 
214 void
216  void *pMgmtHandle,
217  void *pvCurrentBSS,
218  void **pvNextBSS
219  );
220 
221 
222 
223 void
225  void *pMgmtHandle,
226  unsigned char *pbyDestAddress,
227  bool bTxOk,
228  unsigned short wRate,
229  unsigned char *pbyTxFailCount
230  );
231 
232 
233 void
235  void *pMgmtHandle,
236  unsigned char *pbyDestAddress,
237  unsigned short *pwTxDataRate,
238  unsigned char *pbyACKRate,
239  unsigned char *pbyCCKBasicRate,
240  unsigned char *pbyOFDMBasicRate
241  );
242 /*
243 bool
244 VNTWIFIbInit(
245  void *pAdapterHandler,
246  void **pMgmtHandler
247  );
248 */
249 
250 unsigned char
252  void *pMgmtHandle,
253  bool bGroupKey
254  );
255 
256 
257 
258 
259 bool
261  void *pMgmtObject,
262  unsigned long ulCount,
263  void *pPMKIDInfo
264  );
265 
266 bool
268  void *pMgmtObject
269  );
270 
271 unsigned short
273  void *pMgmtObject
274  );
275 
276 // for 802.11h
277 void
279  void *pMgmtObject,
280  bool b11hEnable
281  );
282 
283 bool
285  void *pMgmtObject,
286  bool bEndOfReport,
287  void *pvMeasureEID,
288  unsigned char byReportMode,
289  unsigned char byBasicMap,
290  unsigned char byCCAFraction,
291  unsigned char *pbyRPIs
292  );
293 
294 bool
296  void *pMgmtObject,
297  unsigned char byNewChannel
298  );
299 /*
300 bool
301 VNTWIFIbRadarPresent(
302  void *pMgmtObject,
303  unsigned char byChannel
304  );
305 */
306 
307 #endif //__VNTWIFI_H__