OSDN Git Service

rtl8723au: Remove dead code associated with CONFIG_GSPI_HCI
[android-x86/external-modules-rtl8723au.git] / include / odm_types.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17  *
18  *
19  ******************************************************************************/
20 #ifndef __ODM_TYPES_H__
21 #define __ODM_TYPES_H__
22
23 //
24 // Define Different SW team support
25 //
26 #define ODM_AP                  0x01     //BIT0
27 #define ODM_ADSL                0x02    //BIT1
28 #define ODM_CE                  0x04    //BIT2
29 #define ODM_MP                  0x08    //BIT3
30
31 #define DM_ODM_SUPPORT_TYPE                     ODM_CE
32
33 #if (DM_ODM_SUPPORT_TYPE != ODM_MP)
34 #define         RT_PCI_INTERFACE                                1
35 #define         RT_USB_INTERFACE                                2
36 #define         RT_SDIO_INTERFACE                               3
37 #endif
38
39 typedef enum _HAL_STATUS{
40         HAL_STATUS_SUCCESS,
41         HAL_STATUS_FAILURE,
42         /*RT_STATUS_PENDING,
43         RT_STATUS_RESOURCE,
44         RT_STATUS_INVALID_CONTEXT,
45         RT_STATUS_INVALID_PARAMETER,
46         RT_STATUS_NOT_SUPPORT,
47         RT_STATUS_OS_API_FAILED,*/
48 }HAL_STATUS,*PHAL_STATUS;
49
50 #if (DM_ODM_SUPPORT_TYPE == ODM_CE)
51 typedef enum _RT_SPINLOCK_TYPE{
52         RT_TEMP =1,
53 }RT_SPINLOCK_TYPE;
54 #elif( (DM_ODM_SUPPORT_TYPE == ODM_AP) ||(DM_ODM_SUPPORT_TYPE == ODM_ADSL))
55
56 #define         VISTA_USB_RX_REVISE                     0
57
58 //
59 // Declare for ODM spin lock defintion temporarily fro compile pass.
60 //
61 typedef enum _RT_SPINLOCK_TYPE{
62         RT_TX_SPINLOCK = 1,
63         RT_RX_SPINLOCK = 2,
64         RT_RM_SPINLOCK = 3,
65         RT_CAM_SPINLOCK = 4,
66         RT_SCAN_SPINLOCK = 5,
67         RT_LOG_SPINLOCK = 7,
68         RT_BW_SPINLOCK = 8,
69         RT_CHNLOP_SPINLOCK = 9,
70         RT_RF_OPERATE_SPINLOCK = 10,
71         RT_INITIAL_SPINLOCK = 11,
72         RT_RF_STATE_SPINLOCK = 12, // For RF state. Added by Bruce, 2007-10-30.
73 #if VISTA_USB_RX_REVISE
74         RT_USBRX_CONTEXT_SPINLOCK = 13,
75         RT_USBRX_POSTPROC_SPINLOCK = 14, // protect data of Adapter->IndicateW/ IndicateR
76 #endif
77         //Shall we define Ndis 6.2 SpinLock Here ?
78         RT_PORT_SPINLOCK=16,
79         RT_VNIC_SPINLOCK=17,
80         RT_HVL_SPINLOCK=18,
81         RT_H2C_SPINLOCK = 20, // For H2C cmd. Added by tynli. 2009.11.09.
82
83         RT_BTData_SPINLOCK=25,
84
85         RT_WAPI_OPTION_SPINLOCK=26,
86         RT_WAPI_RX_SPINLOCK=27,
87
88       // add for 92D CCK control issue
89         RT_CCK_PAGEA_SPINLOCK = 28,
90         RT_BUFFER_SPINLOCK = 29,
91         RT_CHANNEL_AND_BANDWIDTH_SPINLOCK = 30,
92         RT_GEN_TEMP_BUF_SPINLOCK = 31,
93         RT_AWB_SPINLOCK = 32,
94         RT_FW_PS_SPINLOCK = 33,
95         RT_HW_TIMER_SPIN_LOCK = 34,
96         RT_MPT_WI_SPINLOCK = 35
97 }RT_SPINLOCK_TYPE;
98
99 #endif
100
101
102 #if (DM_ODM_SUPPORT_TYPE == ODM_MP)
103         #define STA_INFO_T                      RT_WLAN_STA
104         #define PSTA_INFO_T                     PRT_WLAN_STA
105
106         #define CONFIG_HW_ANTENNA_DIVERSITY
107 #define CONFIG_SW_ANTENNA_DIVERSITY
108
109 #elif (DM_ODM_SUPPORT_TYPE == ODM_AP)
110
111         // To let ADSL/AP project compile ok; it should be removed after all conflict are solved. Added by Annie, 2011-10-07.
112         #define ADSL_AP_BUILD_WORKAROUND
113         #define AP_BUILD_WORKAROUND
114         //
115
116         #ifdef AP_BUILD_WORKAROUND
117         #include "typedef.h"
118         #else
119         typedef void                                    VOID,*PVOID;
120         typedef unsigned char                   bool,*Pbool;
121         typedef unsigned char                   u1Byte,*pu1Byte;
122         typedef unsigned short                  u2Byte,*pu2Byte;
123         typedef unsigned int                    u4Byte,*pu4Byte;
124         typedef unsigned long long              u8Byte,*pu8Byte;
125         typedef char                                    s1Byte,*ps1Byte;
126         typedef short                                   s2Byte,*ps2Byte;
127         typedef long                                    s4Byte,*ps4Byte;
128         typedef long long                               s8Byte,*ps8Byte;
129         #endif
130
131         typedef struct rtl8192cd_priv   *prtl8192cd_priv;
132         typedef struct stat_info                STA_INFO_T,*PSTA_INFO_T;
133         typedef struct timer_list               RT_TIMER, *PRT_TIMER;
134         typedef  void *                                 RT_TIMER_CALL_BACK;
135
136         #define         DEV_BUS_TYPE            RT_PCI_INTERFACE
137
138         #define _TRUE                           1
139         #define _FALSE                          0
140
141 #elif (DM_ODM_SUPPORT_TYPE == ODM_ADSL)
142
143         // To let ADSL/AP project compile ok; it should be removed after all conflict are solved. Added by Annie, 2011-10-07.
144         #define ADSL_AP_BUILD_WORKAROUND
145         #define ADSL_BUILD_WORKAROUND
146         //
147
148         typedef unsigned char           bool,*Pbool;
149         typedef unsigned char           u1Byte,*pu1Byte;
150         typedef unsigned short          u2Byte,*pu2Byte;
151         typedef unsigned int                    u4Byte,*pu4Byte;
152         typedef unsigned long long      u8Byte,*pu8Byte;
153         typedef char                            s1Byte,*ps1Byte;
154         typedef short                           s2Byte,*ps2Byte;
155         typedef long                            s4Byte,*ps4Byte;
156         typedef long long                       s8Byte,*ps8Byte;
157
158         typedef struct rtl8192cd_priv   *prtl8192cd_priv;
159         typedef struct stat_info                STA_INFO_T,*PSTA_INFO_T;
160         typedef struct timer_list               RT_TIMER, *PRT_TIMER;
161         typedef  void *                         RT_TIMER_CALL_BACK;
162
163         #define DEV_BUS_TYPE    RT_PCI_INTERFACE
164
165         #define _TRUE                           1
166         #define _FALSE                          0
167
168 #elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
169         #include <basic_types.h>
170
171 #if 0
172         typedef u8                                      u1Byte, *pu1Byte;
173         typedef u16                                     u2Byte,*pu2Byte;
174         typedef u32                                     u4Byte,*pu4Byte;
175         typedef u64                                     u8Byte,*pu8Byte;
176         typedef s8                                      s1Byte,*ps1Byte;
177         typedef s16                                     s2Byte,*ps2Byte;
178         typedef s32                                     s4Byte,*ps4Byte;
179         typedef s64                                     s8Byte,*ps8Byte;
180 #else
181         #define u1Byte          u8
182         #define pu1Byte                 u8*
183
184         #define u2Byte          u16
185         #define pu2Byte                 u16*
186
187         #define u4Byte          u32
188         #define pu4Byte                 u32*
189
190         #define u8Byte          u64
191         #define pu8Byte                 u64*
192
193         #define s1Byte          s8
194         #define ps1Byte                 s8*
195
196         #define s2Byte          s16
197         #define ps2Byte                 s16*
198
199         #define s4Byte          s32
200         #define ps4Byte                 s32*
201
202         #define s8Byte          s64
203         #define ps8Byte                 s64*
204
205 #endif
206         #ifdef CONFIG_USB_HCI
207                 #define DEV_BUS_TYPE    RT_USB_INTERFACE
208         #endif
209
210         typedef struct timer_list               RT_TIMER, *PRT_TIMER;
211         typedef  void *                         RT_TIMER_CALL_BACK;
212         #define STA_INFO_T                      struct sta_info
213         #define PSTA_INFO_T             struct sta_info *
214
215
216
217         #define TRUE    _TRUE
218         #define FALSE   _FALSE
219
220
221         #define SET_TX_DESC_ANTSEL_A_88E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 24, 1, __Value)
222         #define SET_TX_DESC_ANTSEL_B_88E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 25, 1, __Value)
223         #define SET_TX_DESC_ANTSEL_C_88E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+28, 29, 1, __Value)
224
225         //define useless flag to avoid compile warning
226         #define USE_WORKITEM                    0
227         #define         FOR_BRAZIL_PRETEST      0
228         #define BT_30_SUPPORT                   0
229         #define   FPGA_TWO_MAC_VERIFICATION     0
230 #endif
231
232
233 #endif // __ODM_TYPES_H__