diff options
Diffstat (limited to 'drivers/staging/vt6656/baseband.h')
| -rw-r--r-- | drivers/staging/vt6656/baseband.h | 91 |
1 files changed, 30 insertions, 61 deletions
diff --git a/drivers/staging/vt6656/baseband.h b/drivers/staging/vt6656/baseband.h index 844d5a8b13e..3044d6c4205 100644 --- a/drivers/staging/vt6656/baseband.h +++ b/drivers/staging/vt6656/baseband.h @@ -33,40 +33,36 @@ #ifndef __BASEBAND_H__ #define __BASEBAND_H__ -#include "ttype.h" #include "tether.h" #include "device.h" -/*--------------------- Export Definitions -------------------------*/ - #define PREAMBLE_LONG 0 #define PREAMBLE_SHORT 1 -// -// Registers in the BASEBAND -// +/* + * Registers in the BASEBAND + */ #define BB_MAX_CONTEXT_SIZE 256 -#define C_SIFS_A 16 // micro sec. +#define C_SIFS_A 16 /* usec */ #define C_SIFS_BG 10 -#define C_EIFS 80 // micro sec. - +#define C_EIFS 80 /* usec */ -#define C_SLOT_SHORT 9 // micro sec. +#define C_SLOT_SHORT 9 /* usec */ #define C_SLOT_LONG 20 -#define C_CWMIN_A 15 // slot time +#define C_CWMIN_A 15 /* slot time */ #define C_CWMIN_B 31 -#define C_CWMAX 1023 // slot time +#define C_CWMAX 1023 /* slot time */ -//0:11A 1:11B 2:11G +/* 0:11A 1:11B 2:11G */ #define BB_TYPE_11A 0 #define BB_TYPE_11B 1 #define BB_TYPE_11G 2 -//0:11a,1:11b,2:11gb(only CCK in BasicRate),3:11ga(OFDM in Basic Rate) +/* 0:11a, 1:11b, 2:11gb (only CCK in BasicRate), 3:11ga (OFDM in BasicRate) */ #define PK_TYPE_11A 0 #define PK_TYPE_11B 1 #define PK_TYPE_11GB 2 @@ -85,52 +81,25 @@ #define TOP_RATE_2M 0x00200000 #define TOP_RATE_1M 0x00100000 - -/*--------------------- Export Types ------------------------------*/ - -/*--------------------- Export Macros ------------------------------*/ - -/*--------------------- Export Classes ----------------------------*/ - -/*--------------------- Export Variables --------------------------*/ - -/*--------------------- Export Functions --------------------------*/ - -unsigned int -BBuGetFrameTime( - BYTE byPreambleType, - BYTE byFreqType, - unsigned int cbFrameLength, - WORD wRate - ); - -void BBvCalculateParameter(PSDevice pDevice, - unsigned int cbFrameLength, - WORD wRate, - BYTE byPacketType, - PWORD pwPhyLen, - PBYTE pbyPhySrv, - PBYTE pbyPhySgn); - -// timer for antenna diversity - -void TimerSQ3CallBack(void *hDeviceContext); -void TimerSQ3Tmax3CallBack(void *hDeviceContext); - -void BBvAntennaDiversity(PSDevice pDevice, BYTE byRxRate, BYTE bySQ3); -void BBvLoopbackOn(PSDevice pDevice); -void BBvLoopbackOff(PSDevice pDevice); -void BBvSoftwareReset(PSDevice pDevice); - -void BBvSetShortSlotTime(PSDevice pDevice); -void BBvSetVGAGainOffset(PSDevice pDevice, BYTE byData); -void BBvSetAntennaMode(PSDevice pDevice, BYTE byAntennaMode); -BOOL BBbVT3184Init(PSDevice pDevice); -void BBvSetDeepSleep(PSDevice pDevice); -void BBvExitDeepSleep(PSDevice pDevice); -void BBvUpdatePreEDThreshold( - PSDevice pDevice, - BOOL bScanning - ); +/* Length, Service, and Signal fields of Phy for Tx */ +struct vnt_phy_field { + u8 signal; + u8 service; + __le16 len; +} __packed; + +unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type, + unsigned int frame_length, u16 tx_rate); + +void BBvCalculateParameter(struct vnt_private *, u32 frame_length, + u16 tx_rate, u8 pkt_type, struct vnt_phy_field *); + +void BBvSetShortSlotTime(struct vnt_private *); +void BBvSetVGAGainOffset(struct vnt_private *, u8 byData); +void BBvSetAntennaMode(struct vnt_private *, u8 byAntennaMode); +int BBbVT3184Init(struct vnt_private *); +void BBvSetDeepSleep(struct vnt_private *); +void BBvExitDeepSleep(struct vnt_private *); +void BBvUpdatePreEDThreshold(struct vnt_private *, int scanning); #endif /* __BASEBAND_H__ */ |
