1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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.
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
14 ******************************************************************************/
20 #define HAL_FW_ENABLE 0
21 #define HAL_MAC_ENABLE 0
22 #define HAL_BB_ENABLE 0
23 #define HAL_RF_ENABLE 0
24 #else /* FPGA_PHY and ASIC */
25 #define HAL_FW_ENABLE 1
26 #define HAL_MAC_ENABLE 1
27 #define HAL_BB_ENABLE 1
28 #define HAL_RF_ENABLE 1
31 #define RF6052_MAX_TX_PWR 0x3F
32 #define RF6052_MAX_REG_88E 0xFF
33 #define RF6052_MAX_REG_92C 0x7F
35 #define RF6052_MAX_REG \
36 (RF6052_MAX_REG_88E > RF6052_MAX_REG_92C) ? RF6052_MAX_REG_88E: RF6052_MAX_REG_92C
38 #define GET_RF6052_REAL_MAX_REG(_Adapter) RF6052_MAX_REG_92C
40 #define RF6052_MAX_PATH 2
43 /* Antenna detection method, i.e., using single tone detection or RSSI reported from each antenna detected. */
44 /* Added by Roger, 2013.05.22. */
46 #define ANT_DETECT_BY_SINGLE_TONE BIT0
47 #define ANT_DETECT_BY_RSSI BIT1
48 #define IS_ANT_DETECT_SUPPORT_SINGLE_TONE(__Adapter) ((GET_HAL_DATA(__Adapter)->AntDetection) & ANT_DETECT_BY_SINGLE_TONE)
49 #define IS_ANT_DETECT_SUPPORT_RSSI(__Adapter) ((GET_HAL_DATA(__Adapter)->AntDetection) & ANT_DETECT_BY_RSSI)
52 /*--------------------------Define Parameters-------------------------------*/
61 RF_TYPE_MIN = 0, /* 0 */
62 RF_8225 = 1, /* 1 11b/g RF for verification only */
63 RF_8256 = 2, /* 2 11b/g/n */
64 RF_8258 = 3, /* 3 11a/b/g/n RF */
65 RF_6052 = 4, /* 4 11b/g/n RF */
66 RF_PSEUDO_11N = 5, /* 5, It is a temporality RF. */
82 #define RF_PATH_MAX_92C_88E 2
83 #define RF_PATH_MAX_90_8812 4 /* Max RF number 90 support */
111 enum BaseBand_Config_Type {
112 BaseBand_Config_PHY_REG = 0, /* Radio Path A */
113 BaseBand_Config_AGC_TAB = 1, /* Radio Path B */
114 BaseBand_Config_AGC_TAB_2G = 2,
115 BaseBand_Config_AGC_TAB_5G = 3,
116 BaseBand_Config_PHY_REG_PG
124 HW_BLOCK_MAXIMUM = 4, /* Never use this */
128 WIRELESS_MODE_UNKNOWN = 0x00,
129 WIRELESS_MODE_A = 0x01,
130 WIRELESS_MODE_B = 0x02,
131 WIRELESS_MODE_G = 0x04,
132 WIRELESS_MODE_AUTO = 0x08,
133 WIRELESS_MODE_N_24G = 0x10,
134 WIRELESS_MODE_N_5G = 0x20,
135 WIRELESS_MODE_AC_5G = 0x40,
136 WIRELESS_MODE_AC_24G = 0x80,
137 WIRELESS_MODE_AC_ONLY = 0x100,
142 CmdID_SetTxPowerLevel,
144 CmdID_WritePortUlong,
145 CmdID_WritePortUshort,
146 CmdID_WritePortUchar,
151 enum SwChnlCmdID CmdID;
157 struct R_ANTENNA_SELECT_OFDM {
158 #ifdef __LITTLE_ENDIAN
165 u32 r_ant_non_ht_s1:4;
171 u32 r_ant_non_ht_s1:4;
181 /*--------------------------Exported Function prototype---------------------*/
183 #endif /* __HAL_COMMON_H__ */