Merge branch 'fixes' into for-linus
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / staging / vt6656 / card.h
CommitLineData
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
92b96797
FB
29#ifndef __CARD_H__
30#define __CARD_H__
31
92b96797 32#include "ttype.h"
92b96797
FB
33
34/*--------------------- Export Definitions -------------------------*/
35
92b96797
FB
36/*--------------------- Export Classes ----------------------------*/
37
6593dfac 38/* init card type */
92b96797
FB
39
40typedef enum _CARD_PHY_TYPE {
6593dfac 41 PHY_TYPE_AUTO = 0,
92b96797
FB
42 PHY_TYPE_11B,
43 PHY_TYPE_11G,
44 PHY_TYPE_11A
193a823c 45} CARD_PHY_TYPE, *PCARD_PHY_TYPE;
92b96797
FB
46
47typedef enum _CARD_OP_MODE {
6593dfac 48 OP_MODE_INFRASTRUCTURE = 0,
92b96797
FB
49 OP_MODE_ADHOC,
50 OP_MODE_AP,
51 OP_MODE_UNKNOWN
52} CARD_OP_MODE, *PCARD_OP_MODE;
53
54#define CB_MAX_CHANNEL_24G 14
6593dfac 55#define CB_MAX_CHANNEL_5G 42 /* add channel9(5045MHz), 41==>42 */
92b96797
FB
56#define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G+CB_MAX_CHANNEL_5G)
57
58/*--------------------- Export Variables --------------------------*/
59
60/*--------------------- Export Functions --------------------------*/
92b96797 61
0ae3a912 62void CARDbSetMediaChannel(void *pDeviceHandler,
cc856e61 63 unsigned int uConnectionChannel);
8611a29a
AM
64void CARDvSetRSPINF(void *pDeviceHandler, BYTE byBBType);
65void vUpdateIFS(void *pDeviceHandler);
66void CARDvUpdateBasicTopRate(void *pDeviceHandler);
fee6433b 67void CARDbAddBasicRate(void *pDeviceHandler, WORD wRateIdx);
8611a29a
AM
68BOOL CARDbIsOFDMinBasicRate(void *pDeviceHandler);
69void CARDvAdjustTSF(void *pDeviceHandler, BYTE byRxRate,
70 QWORD qwBSSTimestamp, QWORD qwLocalTSF);
71BOOL CARDbGetCurrentTSF(void *pDeviceHandler, PQWORD pqwCurrTSF);
72BOOL CARDbClearCurrentTSF(void *pDeviceHandler);
73void CARDvSetFirstNextTBTT(void *pDeviceHandler, WORD wBeaconInterval);
74void CARDvUpdateNextTBTT(void *pDeviceHandler, QWORD qwTSF,
75 WORD wBeaconInterval);
92b96797
FB
76QWORD CARDqGetNextTBTT(QWORD qwTSF, WORD wBeaconInterval);
77QWORD CARDqGetTSFOffset(BYTE byRxRate, QWORD qwTSF1, QWORD qwTSF2);
8611a29a
AM
78BOOL CARDbRadioPowerOff(void *pDeviceHandler);
79BOOL CARDbRadioPowerOn(void *pDeviceHandler);
80BYTE CARDbyGetPktType(void *pDeviceHandler);
81void CARDvSetBSSMode(void *pDeviceHandler);
92b96797 82
6593dfac
AM
83BOOL CARDbChannelSwitch(void *pDeviceHandler,
84 BYTE byMode,
85 BYTE byNewChannel,
86 BYTE byCount);
92b96797 87
e7b07d1d 88#endif /* __CARD_H__ */