1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
8 * Purpose: Implement functions to access baseband
16 #ifndef __BASEBAND_H__
17 #define __BASEBAND_H__
22 * Registers in the BASEBAND
24 #define BB_MAX_CONTEXT_SIZE 256
27 * Baseband RF pair definition in eeprom (Bits 6..0)
30 #define PREAMBLE_LONG 0
31 #define PREAMBLE_SHORT 1
36 #define TOP_RATE_54M 0x80000000
37 #define TOP_RATE_48M 0x40000000
38 #define TOP_RATE_36M 0x20000000
39 #define TOP_RATE_24M 0x10000000
40 #define TOP_RATE_18M 0x08000000
41 #define TOP_RATE_12M 0x04000000
42 #define TOP_RATE_11M 0x02000000
43 #define TOP_RATE_9M 0x01000000
44 #define TOP_RATE_6M 0x00800000
45 #define TOP_RATE_55M 0x00400000
46 #define TOP_RATE_2M 0x00200000
47 #define TOP_RATE_1M 0x00100000
49 unsigned int BBuGetFrameTime(unsigned char byPreambleType
,
50 unsigned char byPktType
,
51 unsigned int cbFrameLength
,
52 unsigned short wRate
);
54 void vnt_get_phy_field(struct vnt_private
*priv
, u32 frame_length
,
55 u16 tx_rate
, u8 pkt_type
, struct vnt_phy_field
*phy
);
57 bool BBbReadEmbedded(struct vnt_private
*priv
, unsigned char byBBAddr
,
58 unsigned char *pbyData
);
59 bool BBbWriteEmbedded(struct vnt_private
*priv
, unsigned char byBBAddr
,
60 unsigned char byData
);
62 void BBvSetShortSlotTime(struct vnt_private
*priv
);
63 void BBvSetVGAGainOffset(struct vnt_private
*priv
, unsigned char byData
);
66 bool BBbVT3253Init(struct vnt_private
*priv
);
67 void BBvSoftwareReset(struct vnt_private
*priv
);
68 void BBvPowerSaveModeON(struct vnt_private
*priv
);
69 void BBvPowerSaveModeOFF(struct vnt_private
*priv
);
70 void BBvSetTxAntennaMode(struct vnt_private
*priv
, unsigned char byAntennaMode
);
71 void BBvSetRxAntennaMode(struct vnt_private
*priv
, unsigned char byAntennaMode
);
72 void BBvSetDeepSleep(struct vnt_private
*priv
, unsigned char byLocalID
);
73 void BBvExitDeepSleep(struct vnt_private
*priv
, unsigned char byLocalID
);
75 #endif /* __BASEBAND_H__ */