diff options
Diffstat (limited to 'drivers/staging/vt6656/baseband.h')
| -rw-r--r-- | drivers/staging/vt6656/baseband.h | 103 |
1 files changed, 31 insertions, 72 deletions
diff --git a/drivers/staging/vt6656/baseband.h b/drivers/staging/vt6656/baseband.h index e991a7e68d4..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,62 +81,25 @@ #define TOP_RATE_2M 0x00200000 #define TOP_RATE_1M 0x00100000 +/* 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); -/*--------------------- Export Types ------------------------------*/ - -/*--------------------- Export Macros ------------------------------*/ - -/*--------------------- Export Classes ----------------------------*/ - -/*--------------------- Export Variables --------------------------*/ - -/*--------------------- Export Functions --------------------------*/ - -UINT -BBuGetFrameTime( - IN BYTE byPreambleType, - IN BYTE byFreqType, - IN UINT cbFrameLength, - IN WORD wRate - ); - -VOID -BBvCaculateParameter ( - IN PSDevice pDevice, - IN UINT cbFrameLength, - IN WORD wRate, - IN BYTE byPacketType, - OUT PWORD pwPhyLen, - OUT PBYTE pbyPhySrv, - OUT PBYTE pbyPhySgn - ); - -// timer for antenna diversity - -VOID -TimerSQ3CallBack ( - IN HANDLE hDeviceContext - ); - -VOID -TimerSQ3Tmax3CallBack ( - IN HANDLE 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( - IN PSDevice pDevice, - IN BOOL bScanning - ); - -#endif // __BASEBAND_H__ +#endif /* __BASEBAND_H__ */ |
