[ARM] pxa: update defconfig for Verdex Pro
[linux-2.6/verdex.git] / drivers / staging / vt6655 / card.h
blob264b844cf05553213325bdc148342b1dc8545670
1 /*
2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3 * All rights reserved.
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.
19 * File: card.h
21 * Purpose: Provide functions to setup NIC operation mode
23 * Author: Tevin Chen
25 * Date: May 21, 1996
29 #ifndef __CARD_H__
30 #define __CARD_H__
32 #include "ttype.h"
34 /*--------------------- Export Definitions -------------------------*/
36 // Loopback mode
38 // LOBYTE is MAC LB mode, HIBYTE is MII LB mode
39 #define CARD_LB_NONE MAKEWORD(MAC_LB_NONE, 0)
40 #define CARD_LB_MAC MAKEWORD(MAC_LB_INTERNAL, 0) // PHY must ISO, avoid MAC loopback packet go out
41 #define CARD_LB_PHY MAKEWORD(MAC_LB_EXT, 0)
44 #define DEFAULT_MSDU_LIFETIME 512 // ms
45 #define DEFAULT_MSDU_LIFETIME_RES_64us 8000 // 64us
47 #define DEFAULT_MGN_LIFETIME 8 // ms
48 #define DEFAULT_MGN_LIFETIME_RES_64us 125 // 64us
50 #define CB_MAX_CHANNEL_24G 14
51 #define CB_MAX_CHANNEL_5G 42 //[20050104] add channel9(5045MHz), 41==>42
52 #define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G+CB_MAX_CHANNEL_5G)
54 typedef enum _CARD_PHY_TYPE {
55 PHY_TYPE_AUTO,
56 PHY_TYPE_11B,
57 PHY_TYPE_11G,
58 PHY_TYPE_11A
59 } CARD_PHY_TYPE, *PCARD_PHY_TYPE;
61 typedef enum _CARD_PKT_TYPE {
62 PKT_TYPE_802_11_BCN,
63 PKT_TYPE_802_11_MNG,
64 PKT_TYPE_802_11_DATA,
65 PKT_TYPE_802_11_ALL
66 } CARD_PKT_TYPE, *PCARD_PKT_TYPE;
68 typedef enum _CARD_STATUS_TYPE {
69 CARD_STATUS_MEDIA_CONNECT,
70 CARD_STATUS_MEDIA_DISCONNECT,
71 CARD_STATUS_PMKID
72 } CARD_STATUS_TYPE, *PCARD_STATUS_TYPE;
74 typedef enum _CARD_OP_MODE {
75 OP_MODE_INFRASTRUCTURE,
76 OP_MODE_ADHOC,
77 OP_MODE_AP,
78 OP_MODE_UNKNOWN
79 } CARD_OP_MODE, *PCARD_OP_MODE;
83 /*--------------------- Export Classes ----------------------------*/
85 /*--------------------- Export Variables --------------------------*/
87 /*--------------------- Export Functions --------------------------*/
89 BOOL ChannelValid(UINT CountryCode, UINT ChannelIndex);
90 void CARDvSetRSPINF(PVOID pDeviceHandler, CARD_PHY_TYPE ePHYType);
91 void vUpdateIFS(PVOID pDeviceHandler);
92 void CARDvUpdateBasicTopRate(PVOID pDeviceHandler);
93 BOOL CARDbAddBasicRate(PVOID pDeviceHandler, WORD wRateIdx);
94 BOOL CARDbIsOFDMinBasicRate(PVOID pDeviceHandler);
95 void CARDvSetLoopbackMode(DWORD_PTR dwIoBase, WORD wLoopbackMode);
96 BOOL CARDbSoftwareReset(PVOID pDeviceHandler);
97 void CARDvSetFirstNextTBTT(DWORD_PTR dwIoBase, WORD wBeaconInterval);
98 void CARDvUpdateNextTBTT(DWORD_PTR dwIoBase, QWORD qwTSF, WORD wBeaconInterval);
99 BOOL CARDbGetCurrentTSF(DWORD_PTR dwIoBase, PQWORD pqwCurrTSF);
100 QWORD CARDqGetNextTBTT(QWORD qwTSF, WORD wBeaconInterval);
101 QWORD CARDqGetTSFOffset(BYTE byRxRate, QWORD qwTSF1, QWORD qwTSF2);
102 BOOL CARDbSetTxPower(PVOID pDeviceHandler, ULONG ulTxPower);
103 BYTE CARDbyGetPktType(PVOID pDeviceHandler);
104 VOID CARDvSafeResetTx(PVOID pDeviceHandler);
105 VOID CARDvSafeResetRx(PVOID pDeviceHandler);
107 //xxx
108 BOOL CARDbRadioPowerOff(PVOID pDeviceHandler);
109 BOOL CARDbRadioPowerOn(PVOID pDeviceHandler);
110 BOOL CARDbSetChannel(PVOID pDeviceHandler, UINT uConnectionChannel);
111 //BOOL CARDbSendPacket(PVOID pDeviceHandler, PVOID pPacket, CARD_PKT_TYPE ePktType, UINT uLength);
112 BOOL CARDbIsShortPreamble(PVOID pDeviceHandler);
113 BOOL CARDbIsShorSlotTime(PVOID pDeviceHandler);
114 BOOL CARDbSetPhyParameter(PVOID pDeviceHandler, CARD_PHY_TYPE ePHYType, WORD wCapInfo, BYTE byERPField, PVOID pvSupportRateIEs, PVOID pvExtSupportRateIEs);
115 BOOL CARDbUpdateTSF(PVOID pDeviceHandler, BYTE byRxRate, QWORD qwBSSTimestamp, QWORD qwLocalTSF);
116 BOOL CARDbStopTxPacket(PVOID pDeviceHandler, CARD_PKT_TYPE ePktType);
117 BOOL CARDbStartTxPacket(PVOID pDeviceHandler, CARD_PKT_TYPE ePktType);
118 BOOL CARDbSetBeaconPeriod(PVOID pDeviceHandler, WORD wBeaconInterval);
119 BOOL CARDbSetBSSID(PVOID pDeviceHandler, PBYTE pbyBSSID, CARD_OP_MODE eOPMode);
121 BOOL
122 CARDbPowerDown(
123 PVOID pDeviceHandler
126 BOOL CARDbSetTxDataRate(
127 PVOID pDeviceHandler,
128 WORD wDataRate
132 BOOL CARDbRemoveKey (PVOID pDeviceHandler, PBYTE pbyBSSID);
134 BOOL
135 CARDbAdd_PMKID_Candidate (
136 IN PVOID pDeviceHandler,
137 IN PBYTE pbyBSSID,
138 IN BOOL bRSNCapExist,
139 IN WORD wRSNCap
142 PVOID
143 CARDpGetCurrentAddress (
144 IN PVOID pDeviceHandler
148 VOID CARDvInitChannelTable(PVOID pDeviceHandler);
149 BYTE CARDbyGetChannelMapping(PVOID pDeviceHandler, BYTE byChannelNumber, CARD_PHY_TYPE ePhyType);
151 BOOL
152 CARDbStartMeasure (
153 IN PVOID pDeviceHandler,
154 IN PVOID pvMeasureEIDs,
155 IN UINT uNumOfMeasureEIDs
158 BOOL
159 CARDbChannelSwitch (
160 IN PVOID pDeviceHandler,
161 IN BYTE byMode,
162 IN BYTE byNewChannel,
163 IN BYTE byCount
166 BOOL
167 CARDbSetQuiet (
168 IN PVOID pDeviceHandler,
169 IN BOOL bResetQuiet,
170 IN BYTE byQuietCount,
171 IN BYTE byQuietPeriod,
172 IN WORD wQuietDuration,
173 IN WORD wQuietOffset
176 BOOL
177 CARDbStartQuiet (
178 IN PVOID pDeviceHandler
181 VOID
182 CARDvSetCountryInfo (
183 IN PVOID pDeviceHandler,
184 IN CARD_PHY_TYPE ePHYType,
185 IN PVOID pIE
188 VOID
189 CARDvSetPowerConstraint (
190 IN PVOID pDeviceHandler,
191 IN BYTE byChannel,
192 IN I8 byPower
195 VOID
196 CARDvGetPowerCapability (
197 IN PVOID pDeviceHandler,
198 OUT PBYTE pbyMinPower,
199 OUT PBYTE pbyMaxPower
202 BYTE
203 CARDbySetSupportChannels (
204 IN PVOID pDeviceHandler,
205 IN OUT PBYTE pbyIEs
209 CARDbyGetTransmitPower (
210 IN PVOID pDeviceHandler
213 BOOL
214 CARDbChannelGetList (
215 IN UINT uCountryCodeIdx,
216 OUT PBYTE pbyChannelTable
219 VOID
220 CARDvSetCountryIE(
221 IN PVOID pDeviceHandler,
222 IN PVOID pIE
225 BOOL
226 CARDbGetChannelMapInfo(
227 IN PVOID pDeviceHandler,
228 IN UINT uChannelIndex,
229 OUT PBYTE pbyChannelNumber,
230 OUT PBYTE pbyMap
233 VOID
234 CARDvSetChannelMapInfo(
235 IN PVOID pDeviceHandler,
236 IN UINT uChannelIndex,
237 IN BYTE byMap
240 VOID
241 CARDvClearChannelMapInfo(
242 IN PVOID pDeviceHandler
245 BYTE
246 CARDbyAutoChannelSelect(
247 IN PVOID pDeviceHandler,
248 CARD_PHY_TYPE ePHYType
251 BYTE CARDbyGetChannelNumber(PVOID pDeviceHandler, BYTE byChannelIndex);
253 #endif // __CARD_H__