Staging: Add pristine upstream vt6655 driver sources
[pandora-kernel.git] / drivers / staging / vt6655 / rf.h
1 /*
2  * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3  * All rights reserved.
4  *
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.
9  *
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.
14  *
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.
18  *
19  *
20  * File: rf.h
21  *
22  * Purpose:
23  *
24  * Author: Jerry Chen
25  *
26  * Date: Feb. 19, 2004
27  *
28  */
29
30
31 #ifndef __RF_H__
32 #define __RF_H__
33
34 #if !defined(__TTYPE_H__)
35 #include "ttype.h"
36 #endif
37 #if !defined(__DEVICE_H__)
38 #include "device.h"
39 #endif
40 /*---------------------  Export Definitions -------------------------*/
41 //
42 // Baseband RF pair definition in eeprom (Bits 6..0)
43 //
44 #define RF_RFMD2959             0x01
45 #define RF_MAXIMAG              0x02
46 #define RF_AIROHA               0x03
47
48 //#define RF_GCT5103              0x04
49 #define RF_UW2451               0x05
50 #define RF_MAXIMG               0x06
51 #define RF_MAXIM2829            0x07 // RobertYu: 20041118
52 #define RF_UW2452               0x08 // RobertYu: 20041210
53 #define RF_AIROHA7230           0x0a // RobertYu: 20050104
54 #define RF_UW2453               0x0b
55
56 #define RF_VT3226               0x09
57 #define RF_AL2230S              0x0e
58
59 #define RF_NOTHING              0x7E
60 #define RF_EMU                  0x80
61 #define RF_MASK                 0x7F
62
63 #define ZONE_FCC                0
64 #define ZONE_MKK1               1
65 #define ZONE_ETSI               2
66 #define ZONE_IC                 3
67 #define ZONE_SPAIN              4
68 #define ZONE_FRANCE             5
69 #define ZONE_MKK                6
70 #define ZONE_ISRAEL             7
71
72 //[20050104] CB_MAXIM2829_CHANNEL_5G_HIGH, CB_UW2452_CHANNEL_5G_HIGH: 40==>41
73 #define CB_MAXIM2829_CHANNEL_5G_HIGH    41 //Index41: channel = 100, Tf = 5500MHz, set the (A3:A0=0101) D6=1
74 #define CB_UW2452_CHANNEL_5G_HIGH       41 //[20041210] Index41: channel = 100, Tf = 5500MHz, change VCO2->VCO3
75
76
77 /*---------------------  Export Classes  ----------------------------*/
78
79 /*---------------------  Export Variables  --------------------------*/
80
81 /*---------------------  Export Functions  --------------------------*/
82 #ifdef __cplusplus
83 extern "C" {                            /* Assume C declarations for C++ */
84 #endif /* __cplusplus */
85
86 BOOL IFRFbWriteEmbeded(DWORD_PTR dwIoBase, DWORD dwData);
87 BOOL RFbSelectChannel(DWORD_PTR dwIoBase, BYTE byRFType, BYTE byChannel);
88 BOOL RFbInit (
89     IN  PSDevice  pDevice
90     );
91 BOOL RFvWriteWakeProgSyn(DWORD_PTR dwIoBase, BYTE byRFType, UINT uChannel);
92 BOOL RFbSetPower(PSDevice pDevice, UINT uRATE, UINT uCH);
93 BOOL RFbRawSetPower(
94     IN  PSDevice  pDevice,
95     IN  BYTE      byPwr,
96     IN  UINT      uRATE
97     );
98
99 VOID
100 RFvRSSITodBm(
101     IN  PSDevice pDevice,
102     IN  BYTE     byCurrRSSI,
103     OUT PLONG    pldBm
104     );
105
106 //{{ RobertYu: 20050104
107 BOOL RFbAL7230SelectChannelPostProcess(DWORD_PTR dwIoBase, BYTE byOldChannel, BYTE byNewChannel);
108 //}} RobertYu
109
110 #ifdef __cplusplus
111 }                                       /* End of extern "C" { */
112 #endif /* __cplusplus */
113
114
115 #endif // __RF_H__
116
117
118