]> Git Repo - linux.git/blob - drivers/staging/vt6655/card.h
selinux: Remove security_ops extern
[linux.git] / drivers / staging / vt6655 / card.h
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 #ifndef __CARD_H__
30 #define __CARD_H__
31
32 #include "ttype.h"
33 #include <linux/types.h>
34
35 /*---------------------  Export Definitions -------------------------*/
36 //
37 // Loopback mode
38 //
39 // LOBYTE is MAC LB mode, HIBYTE is MII LB mode
40 #define CARD_LB_NONE            MAKEWORD(MAC_LB_NONE, 0)
41 #define CARD_LB_MAC             MAKEWORD(MAC_LB_INTERNAL, 0)   // PHY must ISO, avoid MAC loopback packet go out
42 #define CARD_LB_PHY             MAKEWORD(MAC_LB_EXT, 0)
43
44 #define DEFAULT_MSDU_LIFETIME           512  // ms
45 #define DEFAULT_MSDU_LIFETIME_RES_64us  8000 // 64us
46
47 #define DEFAULT_MGN_LIFETIME            8    // ms
48 #define DEFAULT_MGN_LIFETIME_RES_64us   125  // 64us
49
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)
53
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;
60
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;
67
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;
73
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;
80
81 /*---------------------  Export Classes  ----------------------------*/
82
83 /*---------------------  Export Variables  --------------------------*/
84
85 /*---------------------  Export Functions  --------------------------*/
86
87 void CARDvSetRSPINF(void *pDeviceHandler, CARD_PHY_TYPE ePHYType);
88 void vUpdateIFS(void *pDeviceHandler);
89 void CARDvUpdateBasicTopRate(void *pDeviceHandler);
90 bool CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx);
91 bool CARDbIsOFDMinBasicRate(void *pDeviceHandler);
92 void CARDvSetLoopbackMode(unsigned long dwIoBase, unsigned short wLoopbackMode);
93 bool CARDbSoftwareReset(void *pDeviceHandler);
94 void CARDvSetFirstNextTBTT(unsigned long dwIoBase, unsigned short wBeaconInterval);
95 void CARDvUpdateNextTBTT(unsigned long dwIoBase, QWORD qwTSF, unsigned short wBeaconInterval);
96 bool CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF);
97 QWORD CARDqGetNextTBTT(QWORD qwTSF, unsigned short wBeaconInterval);
98 QWORD CARDqGetTSFOffset(unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2);
99 bool CARDbSetTxPower(void *pDeviceHandler, unsigned long ulTxPower);
100 unsigned char CARDbyGetPktType(void *pDeviceHandler);
101 void CARDvSafeResetTx(void *pDeviceHandler);
102 void CARDvSafeResetRx(void *pDeviceHandler);
103
104 //xxx
105 bool CARDbRadioPowerOff(void *pDeviceHandler);
106 bool CARDbRadioPowerOn(void *pDeviceHandler);
107 bool CARDbIsShortPreamble(void *pDeviceHandler);
108 bool CARDbIsShorSlotTime(void *pDeviceHandler);
109 bool CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned short wCapInfo, unsigned char byERPField, void *pvSupportRateIEs, void *pvExtSupportRateIEs);
110 bool CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTimestamp, QWORD qwLocalTSF);
111 bool CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType);
112 bool CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType);
113 bool CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval);
114 bool CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode);
115
116 bool
117 CARDbPowerDown(
118         void *pDeviceHandler
119 );
120
121 bool CARDbSetTxDataRate(
122         void *pDeviceHandler,
123         unsigned short wDataRate
124 );
125
126 bool CARDbRemoveKey(void *pDeviceHandler, unsigned char *pbyBSSID);
127
128 bool
129 CARDbAdd_PMKID_Candidate(
130         void *pDeviceHandler,
131         unsigned char *pbyBSSID,
132         bool bRSNCapExist,
133         unsigned short wRSNCap
134 );
135
136 void *
137 CARDpGetCurrentAddress(
138         void *pDeviceHandler
139 );
140
141 bool
142 CARDbStartMeasure(
143         void *pDeviceHandler,
144         void *pvMeasureEIDs,
145         unsigned int uNumOfMeasureEIDs
146 );
147
148 bool
149 CARDbChannelSwitch(
150         void *pDeviceHandler,
151         unsigned char byMode,
152         unsigned char byNewChannel,
153         unsigned char byCount
154 );
155
156 bool
157 CARDbSetQuiet(
158         void *pDeviceHandler,
159         bool bResetQuiet,
160         unsigned char byQuietCount,
161         unsigned char byQuietPeriod,
162         unsigned short wQuietDuration,
163         unsigned short wQuietOffset
164 );
165
166 bool
167 CARDbStartQuiet(
168         void *pDeviceHandler
169 );
170
171 void
172 CARDvSetPowerConstraint(
173         void *pDeviceHandler,
174         unsigned char byChannel,
175         char byPower
176 );
177
178 void
179 CARDvGetPowerCapability(
180         void *pDeviceHandler,
181         unsigned char *pbyMinPower,
182         unsigned char *pbyMaxPower
183 );
184
185 char
186 CARDbyGetTransmitPower(
187         void *pDeviceHandler
188 );
189
190 #endif // __CARD_H__
This page took 0.037292 seconds and 4 git commands to generate.