1 /******************************************************************************
2 * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
4 * This program is distributed in the hope that it will be useful, but WITHOUT
5 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
9 * You should have received a copy of the GNU General Public License along with
10 * this program; if not, write to the Free Software Foundation, Inc.,
11 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
13 * The full GNU General Public License is included in this distribution in the
14 * file called LICENSE.
16 * Contact Information:
17 * wlanfae <wlanfae@realtek.com>
18 ******************************************************************************/
24 #include <linux/types.h>
26 #define MAX_SILENT_RESET_RX_SLOT_NUM 10
28 #define RX_MPDU_QUEUE 0
29 #define RX_CMD_QUEUE 1
32 enum rtl819x_loopback
{
33 RTL819X_NO_LOOPBACK
= 0,
34 RTL819X_MAC_LOOPBACK
= 1,
35 RTL819X_DMA_LOOPBACK
= 2,
36 RTL819X_CCK_LOOPBACK
= 3,
40 #define RESET_DELAY_8185 20
42 #define RT_IBSS_INT_MASKS (IMR_BcnInt | IMR_BcnInt | IMR_TBDOK | IMR_TBDER)
44 #define DESC90_RATE1M 0x00
45 #define DESC90_RATE2M 0x01
46 #define DESC90_RATE5_5M 0x02
47 #define DESC90_RATE11M 0x03
48 #define DESC90_RATE6M 0x04
49 #define DESC90_RATE9M 0x05
50 #define DESC90_RATE12M 0x06
51 #define DESC90_RATE18M 0x07
52 #define DESC90_RATE24M 0x08
53 #define DESC90_RATE36M 0x09
54 #define DESC90_RATE48M 0x0a
55 #define DESC90_RATE54M 0x0b
56 #define DESC90_RATEMCS0 0x00
57 #define DESC90_RATEMCS1 0x01
58 #define DESC90_RATEMCS2 0x02
59 #define DESC90_RATEMCS3 0x03
60 #define DESC90_RATEMCS4 0x04
61 #define DESC90_RATEMCS5 0x05
62 #define DESC90_RATEMCS6 0x06
63 #define DESC90_RATEMCS7 0x07
64 #define DESC90_RATEMCS8 0x08
65 #define DESC90_RATEMCS9 0x09
66 #define DESC90_RATEMCS10 0x0a
67 #define DESC90_RATEMCS11 0x0b
68 #define DESC90_RATEMCS12 0x0c
69 #define DESC90_RATEMCS13 0x0d
70 #define DESC90_RATEMCS14 0x0e
71 #define DESC90_RATEMCS15 0x0f
72 #define DESC90_RATEMCS32 0x20
74 #define SHORT_SLOT_TIME 9
75 #define NON_SHORT_SLOT_TIME 20
78 #define MAX_LINES_HWCONFIG_TXT 1000
79 #define MAX_BYTES_LINE_HWCONFIG_TXT 128
81 #define SW_THREE_WIRE 0
82 #define HW_THREE_WIRE 2
84 #define BT_DEMO_BOARD 0
94 #define QSLT_BEACON 0x10
95 #define QSLT_HIGH 0x11
96 #define QSLT_MGNT 0x12
99 #define NUM_OF_FIRMWARE_QUEUE 10
100 #define NUM_OF_PAGES_IN_FW 0x100
101 #define NUM_OF_PAGE_IN_FW_QUEUE_BK 0x007
102 #define NUM_OF_PAGE_IN_FW_QUEUE_BE 0x0aa
103 #define NUM_OF_PAGE_IN_FW_QUEUE_VI 0x024
104 #define NUM_OF_PAGE_IN_FW_QUEUE_VO 0x007
105 #define NUM_OF_PAGE_IN_FW_QUEUE_HCCA 0
106 #define NUM_OF_PAGE_IN_FW_QUEUE_CMD 0x2
107 #define NUM_OF_PAGE_IN_FW_QUEUE_MGNT 0x10
108 #define NUM_OF_PAGE_IN_FW_QUEUE_HIGH 0
109 #define NUM_OF_PAGE_IN_FW_QUEUE_BCN 0x4
110 #define NUM_OF_PAGE_IN_FW_QUEUE_PUB 0xd
112 #define NUM_OF_PAGE_IN_FW_QUEUE_BK_DTM 0x026
113 #define NUM_OF_PAGE_IN_FW_QUEUE_BE_DTM 0x048
114 #define NUM_OF_PAGE_IN_FW_QUEUE_VI_DTM 0x048
115 #define NUM_OF_PAGE_IN_FW_QUEUE_VO_DTM 0x026
116 #define NUM_OF_PAGE_IN_FW_QUEUE_PUB_DTM 0x00
118 #define APPLIED_RESERVED_QUEUE_IN_FW 0x80000000
119 #define RSVD_FW_QUEUE_PAGE_BK_SHIFT 0x00
120 #define RSVD_FW_QUEUE_PAGE_BE_SHIFT 0x08
121 #define RSVD_FW_QUEUE_PAGE_VI_SHIFT 0x10
122 #define RSVD_FW_QUEUE_PAGE_VO_SHIFT 0x18
123 #define RSVD_FW_QUEUE_PAGE_MGNT_SHIFT 0x10
124 #define RSVD_FW_QUEUE_PAGE_BCN_SHIFT 0x00
125 #define RSVD_FW_QUEUE_PAGE_PUB_SHIFT 0x08
127 #define HAL_PRIME_CHNL_OFFSET_DONT_CARE 0
128 #define HAL_PRIME_CHNL_OFFSET_LOWER 1
129 #define HAL_PRIME_CHNL_OFFSET_UPPER 2
132 enum version_8190_loopback
{
133 VERSION_8190_BD
= 0x3,
137 #define IC_VersionCut_C 0x2
138 #define IC_VersionCut_D 0x3
139 #define IC_VersionCut_E 0x4
142 RF_OP_By_SW_3wire
= 0,
148 enum power_save_mode
{
149 POWER_SAVE_MODE_ACTIVE
,
150 POWER_SAVE_MODE_SAVE
,
153 enum interface_select_8190pci
{
154 INTF_SEL1_MINICARD
= 0,
160 struct bb_reg_definition
{
178 u32 rfLSSIReadBackPi
;
191 u8 AllowAggregation
:1;
208 struct tx_fwinfo_8190pci
{
218 u8 AllowAggregation
:1;
228 u32 TxPerPktInfoFeedback
:1;
241 #define TX_DESC_SIZE 32
243 #define TX_DESC_CMD_SIZE 32
246 #define TX_STATUS_DESC_SIZE 32
248 #define TX_FWINFO_SIZE 8
251 #define RX_DESC_SIZE 16
253 #define RX_STATUS_DESC_SIZE 16
255 #define RX_DRIVER_INFO_SIZE 8
257 struct log_int_8190
{
272 struct phy_ofdm_rx_status_rxsc_sgien_exintfflag
{
279 struct phy_sts_ofdm_819xpci
{
295 struct phy_sts_cck_819xpci
{
302 #define PHY_RSSI_SLID_WIN_MAX 100
303 #define PHY_Beacon_RSSI_SLID_WIN_MAX 10