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 -------------------------*/
37 /*--------------------- Export Classes ----------------------------*/
41 typedef enum _CARD_PHY_TYPE
{
47 } CARD_PHY_TYPE
, *PCARD_PHY_TYPE
;
49 typedef enum _CARD_OP_MODE
{
51 OP_MODE_INFRASTRUCTURE
=0,
55 } CARD_OP_MODE
, *PCARD_OP_MODE
;
57 #define CB_MAX_CHANNEL_24G 14
58 //#define CB_MAX_CHANNEL_5G 24
59 #define CB_MAX_CHANNEL_5G 42 //[20050104] add channel9(5045MHz), 41==>42
60 #define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G+CB_MAX_CHANNEL_5G)
62 /*--------------------- Export Variables --------------------------*/
64 /*--------------------- Export Functions --------------------------*/
66 BOOL
CARDbSetMediaChannel(PVOID pDeviceHandler
, UINT uConnectionChannel
);
67 void CARDvSetRSPINF(PVOID pDeviceHandler
, BYTE byBBType
);
68 void vUpdateIFS(PVOID pDeviceHandler
);
69 void CARDvUpdateBasicTopRate(PVOID pDeviceHandler
);
70 BOOL
CARDbAddBasicRate(PVOID pDeviceHandler
, WORD wRateIdx
);
71 BOOL
CARDbIsOFDMinBasicRate(PVOID pDeviceHandler
);
72 void CARDvAdjustTSF(PVOID pDeviceHandler
, BYTE byRxRate
, QWORD qwBSSTimestamp
, QWORD qwLocalTSF
);
73 BOOL
CARDbGetCurrentTSF (PVOID pDeviceHandler
, PQWORD pqwCurrTSF
);
74 BOOL
CARDbClearCurrentTSF(PVOID pDeviceHandler
);
75 void CARDvSetFirstNextTBTT(PVOID pDeviceHandler
, WORD wBeaconInterval
);
76 void CARDvUpdateNextTBTT(PVOID pDeviceHandler
, QWORD qwTSF
, WORD wBeaconInterval
);
77 QWORD
CARDqGetNextTBTT(QWORD qwTSF
, WORD wBeaconInterval
);
78 QWORD
CARDqGetTSFOffset(BYTE byRxRate
, QWORD qwTSF1
, QWORD qwTSF2
);
79 BOOL
CARDbRadioPowerOff(PVOID pDeviceHandler
);
80 BOOL
CARDbRadioPowerOn(PVOID pDeviceHandler
);
81 BYTE
CARDbyGetPktType(PVOID pDeviceHandler
);
82 void CARDvSetBSSMode(PVOID pDeviceHandler
);
86 IN PVOID pDeviceHandler
,