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.
22 * Purpose: Implement functions to access baseband
29 * 06-10-2003 Bryan YC Fan: Re-write codes to support VT3253 spec.
30 * 08-26-2003 Kyle Hsu : Add defines of packet type and TX rate.
33 #ifndef __BASEBAND_H__
34 #define __BASEBAND_H__
38 #define PREAMBLE_LONG 0
39 #define PREAMBLE_SHORT 1
42 * Registers in the BASEBAND
44 #define BB_MAX_CONTEXT_SIZE 256
46 #define C_SIFS_A 16 /* usec */
49 #define C_EIFS 80 /* usec */
51 #define C_SLOT_SHORT 9 /* usec */
52 #define C_SLOT_LONG 20
54 #define C_CWMIN_A 15 /* slot time */
57 #define C_CWMAX 1023 /* slot time */
59 /* 0:11A 1:11B 2:11G */
64 /* 0:11a, 1:11b, 2:11gb (only CCK in BasicRate), 3:11ga (OFDM in BasicRate) */
67 #define PK_TYPE_11GB 2
68 #define PK_TYPE_11GA 3
70 #define TOP_RATE_54M 0x80000000
71 #define TOP_RATE_48M 0x40000000
72 #define TOP_RATE_36M 0x20000000
73 #define TOP_RATE_24M 0x10000000
74 #define TOP_RATE_18M 0x08000000
75 #define TOP_RATE_12M 0x04000000
76 #define TOP_RATE_11M 0x02000000
77 #define TOP_RATE_9M 0x01000000
78 #define TOP_RATE_6M 0x00800000
79 #define TOP_RATE_55M 0x00400000
80 #define TOP_RATE_2M 0x00200000
81 #define TOP_RATE_1M 0x00100000
83 /* Length, Service, and Signal fields of Phy for Tx */
84 struct vnt_phy_field
{
90 unsigned int vnt_get_frame_time(u8 preamble_type
, u8 pkt_type
,
91 unsigned int frame_length
, u16 tx_rate
);
93 void vnt_get_phy_field(struct vnt_private
*, u32 frame_length
,
94 u16 tx_rate
, u8 pkt_type
, struct vnt_phy_field
*);
96 void vnt_set_short_slot_time(struct vnt_private
*);
97 void vnt_set_vga_gain_offset(struct vnt_private
*, u8
);
98 void vnt_set_antenna_mode(struct vnt_private
*, u8
);
99 int vnt_vt3184_init(struct vnt_private
*);
100 void vnt_set_deep_sleep(struct vnt_private
*);
101 void vnt_exit_deep_sleep(struct vnt_private
*);
102 void vnt_update_pre_ed_threshold(struct vnt_private
*, int scanning
);
104 #endif /* __BASEBAND_H__ */