2009-06-13 05:38:31 -06:00
|
|
|
/*
|
|
|
|
* Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
* File: card.h
|
|
|
|
*
|
|
|
|
* Purpose: Provide functions to setup NIC operation mode
|
|
|
|
*
|
|
|
|
* Author: Tevin Chen
|
|
|
|
*
|
|
|
|
* Date: May 21, 1996
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CARD_H__
|
|
|
|
#define __CARD_H__
|
2012-12-10 14:59:10 -07:00
|
|
|
#include "device.h"
|
2009-06-13 05:38:31 -06:00
|
|
|
|
2010-05-11 14:29:43 -06:00
|
|
|
/* init card type */
|
2009-06-13 05:38:31 -06:00
|
|
|
|
|
|
|
typedef enum _CARD_PHY_TYPE {
|
2010-05-11 14:29:43 -06:00
|
|
|
PHY_TYPE_AUTO = 0,
|
2009-06-13 05:38:31 -06:00
|
|
|
PHY_TYPE_11B,
|
|
|
|
PHY_TYPE_11G,
|
|
|
|
PHY_TYPE_11A
|
2009-08-12 15:54:06 -06:00
|
|
|
} CARD_PHY_TYPE, *PCARD_PHY_TYPE;
|
2009-06-13 05:38:31 -06:00
|
|
|
|
|
|
|
typedef enum _CARD_OP_MODE {
|
2010-05-11 14:29:43 -06:00
|
|
|
OP_MODE_INFRASTRUCTURE = 0,
|
2009-06-13 05:38:31 -06:00
|
|
|
OP_MODE_ADHOC,
|
|
|
|
OP_MODE_AP,
|
|
|
|
OP_MODE_UNKNOWN
|
|
|
|
} CARD_OP_MODE, *PCARD_OP_MODE;
|
|
|
|
|
|
|
|
#define CB_MAX_CHANNEL_24G 14
|
2010-05-11 14:29:43 -06:00
|
|
|
#define CB_MAX_CHANNEL_5G 42 /* add channel9(5045MHz), 41==>42 */
|
2009-06-13 05:38:31 -06:00
|
|
|
#define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G+CB_MAX_CHANNEL_5G)
|
|
|
|
|
2012-12-10 14:59:10 -07:00
|
|
|
struct vnt_private;
|
2009-06-13 05:38:31 -06:00
|
|
|
|
2012-12-10 14:59:10 -07:00
|
|
|
void CARDbSetMediaChannel(struct vnt_private *pDevice, u32 uConnectionChannel);
|
|
|
|
void CARDvSetRSPINF(struct vnt_private *pDevice, u8 byBBType);
|
|
|
|
void vUpdateIFS(struct vnt_private *pDevice);
|
|
|
|
void CARDvUpdateBasicTopRate(struct vnt_private *pDevice);
|
|
|
|
void CARDbAddBasicRate(struct vnt_private *pDevice, u16 wRateIdx);
|
|
|
|
int CARDbIsOFDMinBasicRate(struct vnt_private *pDevice);
|
|
|
|
void CARDvAdjustTSF(struct vnt_private *pDevice, u8 byRxRate,
|
2012-11-28 14:11:02 -07:00
|
|
|
u64 qwBSSTimestamp, u64 qwLocalTSF);
|
2013-02-12 18:36:28 -07:00
|
|
|
bool CARDbGetCurrentTSF(struct vnt_private *pDevice, u64 *pqwCurrTSF);
|
|
|
|
bool CARDbClearCurrentTSF(struct vnt_private *pDevice);
|
2013-02-25 18:32:52 -07:00
|
|
|
void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, u16 wBeaconInterval);
|
2012-12-10 14:59:10 -07:00
|
|
|
void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF,
|
2013-02-25 18:32:52 -07:00
|
|
|
u16 wBeaconInterval);
|
|
|
|
u64 CARDqGetNextTBTT(u64 qwTSF, u16 wBeaconInterval);
|
2013-02-25 18:32:51 -07:00
|
|
|
u64 CARDqGetTSFOffset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
|
2012-12-10 14:59:10 -07:00
|
|
|
int CARDbRadioPowerOff(struct vnt_private *pDevice);
|
|
|
|
int CARDbRadioPowerOn(struct vnt_private *pDevice);
|
|
|
|
u8 CARDbyGetPktType(struct vnt_private *pDevice);
|
|
|
|
void CARDvSetBSSMode(struct vnt_private *pDevice);
|
2009-06-13 05:38:31 -06:00
|
|
|
|
2010-05-01 16:12:26 -06:00
|
|
|
#endif /* __CARD_H__ */
|