2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
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.
21 * Purpose: Provide functions to setup NIC operation mode
34 /*--------------------- Export Definitions -------------------------*/
36 /*--------------------- Export Classes ----------------------------*/
40 typedef enum _CARD_PHY_TYPE {
45 } CARD_PHY_TYPE, *PCARD_PHY_TYPE;
47 typedef enum _CARD_OP_MODE {
48 OP_MODE_INFRASTRUCTURE = 0,
52 } CARD_OP_MODE, *PCARD_OP_MODE;
54 #define CB_MAX_CHANNEL_24G 14
55 #define CB_MAX_CHANNEL_5G 42 /* add channel9(5045MHz), 41==>42 */
56 #define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G+CB_MAX_CHANNEL_5G)
58 /*--------------------- Export Variables --------------------------*/
60 /*--------------------- Export Functions --------------------------*/
62 void CARDbSetMediaChannel(void *pDeviceHandler,
63 unsigned int uConnectionChannel);
64 void CARDvSetRSPINF(void *pDeviceHandler, BYTE byBBType);
65 void vUpdateIFS(void *pDeviceHandler);
66 void CARDvUpdateBasicTopRate(void *pDeviceHandler);
67 void CARDbAddBasicRate(void *pDeviceHandler, WORD wRateIdx);
68 BOOL CARDbIsOFDMinBasicRate(void *pDeviceHandler);
69 void CARDvAdjustTSF(void *pDeviceHandler, BYTE byRxRate,
70 QWORD qwBSSTimestamp, QWORD qwLocalTSF);
71 BOOL CARDbGetCurrentTSF(void *pDeviceHandler, PQWORD pqwCurrTSF);
72 BOOL CARDbClearCurrentTSF(void *pDeviceHandler);
73 void CARDvSetFirstNextTBTT(void *pDeviceHandler, WORD wBeaconInterval);
74 void CARDvUpdateNextTBTT(void *pDeviceHandler, QWORD qwTSF,
75 WORD wBeaconInterval);
76 QWORD CARDqGetNextTBTT(QWORD qwTSF, WORD wBeaconInterval);
77 QWORD CARDqGetTSFOffset(BYTE byRxRate, QWORD qwTSF1, QWORD qwTSF2);
78 BOOL CARDbRadioPowerOff(void *pDeviceHandler);
79 BOOL CARDbRadioPowerOn(void *pDeviceHandler);
80 BYTE CARDbyGetPktType(void *pDeviceHandler);
81 void CARDvSetBSSMode(void *pDeviceHandler);
83 BOOL CARDbChannelSwitch(void *pDeviceHandler,
88 #endif /* __CARD_H__ */