Commit | Line | Data |
---|---|---|
92b96797 FB |
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 | * File: card.h | |
20 | * | |
21 | * Purpose: Provide functions to setup NIC operation mode | |
22 | * | |
23 | * Author: Tevin Chen | |
24 | * | |
25 | * Date: May 21, 1996 | |
26 | * | |
27 | */ | |
28 | ||
29 | ||
30 | #ifndef __CARD_H__ | |
31 | #define __CARD_H__ | |
32 | ||
33 | #if !defined(__TTYPE_H__) | |
34 | #include "ttype.h" | |
35 | #endif | |
36 | ||
37 | ||
38 | /*--------------------- Export Definitions -------------------------*/ | |
39 | ||
40 | ||
41 | /*--------------------- Export Classes ----------------------------*/ | |
42 | ||
43 | // Init card type | |
44 | ||
45 | typedef enum _CARD_PHY_TYPE { | |
46 | ||
47 | PHY_TYPE_AUTO=0, | |
48 | PHY_TYPE_11B, | |
49 | PHY_TYPE_11G, | |
50 | PHY_TYPE_11A | |
51 | } CARD_PHY_TYPE, DEF* PCARD_PHY_TYPE; | |
52 | ||
53 | typedef enum _CARD_OP_MODE { | |
54 | ||
55 | OP_MODE_INFRASTRUCTURE=0, | |
56 | OP_MODE_ADHOC, | |
57 | OP_MODE_AP, | |
58 | OP_MODE_UNKNOWN | |
59 | } CARD_OP_MODE, *PCARD_OP_MODE; | |
60 | ||
61 | #define CB_MAX_CHANNEL_24G 14 | |
62 | //#define CB_MAX_CHANNEL_5G 24 | |
63 | #define CB_MAX_CHANNEL_5G 42 //[20050104] add channel9(5045MHz), 41==>42 | |
64 | #define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G+CB_MAX_CHANNEL_5G) | |
65 | ||
66 | /*--------------------- Export Variables --------------------------*/ | |
67 | ||
68 | /*--------------------- Export Functions --------------------------*/ | |
69 | #ifdef __cplusplus | |
70 | extern "C" { /* Assume C declarations for C++ */ | |
71 | #endif /* __cplusplus */ | |
72 | ||
73 | ||
74 | BOOL CARDbSetMediaChannel(PVOID pDeviceHandler, UINT uConnectionChannel); | |
75 | void CARDvSetRSPINF(PVOID pDeviceHandler, BYTE byBBType); | |
76 | void vUpdateIFS(PVOID pDeviceHandler); | |
77 | void CARDvUpdateBasicTopRate(PVOID pDeviceHandler); | |
78 | BOOL CARDbAddBasicRate(PVOID pDeviceHandler, WORD wRateIdx); | |
79 | BOOL CARDbIsOFDMinBasicRate(PVOID pDeviceHandler); | |
80 | void CARDvAdjustTSF(PVOID pDeviceHandler, BYTE byRxRate, QWORD qwBSSTimestamp, QWORD qwLocalTSF); | |
81 | BOOL CARDbGetCurrentTSF (PVOID pDeviceHandler, PQWORD pqwCurrTSF); | |
82 | BOOL CARDbClearCurrentTSF(PVOID pDeviceHandler); | |
83 | void CARDvSetFirstNextTBTT(PVOID pDeviceHandler, WORD wBeaconInterval); | |
84 | void CARDvUpdateNextTBTT(PVOID pDeviceHandler, QWORD qwTSF, WORD wBeaconInterval); | |
85 | QWORD CARDqGetNextTBTT(QWORD qwTSF, WORD wBeaconInterval); | |
86 | QWORD CARDqGetTSFOffset(BYTE byRxRate, QWORD qwTSF1, QWORD qwTSF2); | |
87 | BOOL CARDbRadioPowerOff(PVOID pDeviceHandler); | |
88 | BOOL CARDbRadioPowerOn(PVOID pDeviceHandler); | |
89 | BYTE CARDbyGetPktType(PVOID pDeviceHandler); | |
90 | void CARDvSetBSSMode(PVOID pDeviceHandler); | |
91 | ||
92 | BOOL | |
93 | CARDbChannelSwitch ( | |
94 | IN PVOID pDeviceHandler, | |
95 | IN BYTE byMode, | |
96 | IN BYTE byNewChannel, | |
97 | IN BYTE byCount | |
98 | ); | |
99 | ||
100 | ||
101 | #ifdef __cplusplus | |
102 | } /* End of extern "C" { */ | |
103 | #endif /* __cplusplus */ | |
104 | ||
105 | ||
106 | #endif // __CARD_H__ | |
107 | ||
108 | ||
109 |