Go to the documentation of this file.
42 #define RTL8187_REQT_READ 0xc0
43 #define RTL8187_REQT_WRITE 0x40
44 #define RTL8187_REQ_GET_REGS 0x05
45 #define RTL8187_REQ_SET_REGS 0x05
50 #define R8180_MAX_RETRY 255
53 #define RX_URB_SIZE 9100
55 #define BB_ANTATTEN_CHAN14 0x0c
56 #define BB_ANTENNA_B 0x40
58 #define BB_HOST_BANG (1<<30)
59 #define BB_HOST_BANG_EN (1<<2)
60 #define BB_HOST_BANG_CLK (1<<1)
61 #define BB_HOST_BANG_RW (1<<3)
62 #define BB_HOST_BANG_DATA 1
66 #define AFR_CardBEn (1<<0)
67 #define AFR_CLKRUN_SEL (1<<1)
68 #define AFR_FuncRegEn (1<<2)
69 #define RTL8190_EEPROM_ID 0x8129
70 #define EEPROM_VID 0x02
71 #define EEPROM_PID 0x04
72 #define EEPROM_NODE_ADDRESS_BYTE_0 0x0C
74 #define EEPROM_TxPowerDiff 0x1F
75 #define EEPROM_ThermalMeter 0x20
76 #define EEPROM_PwDiff 0x21 //0x21
77 #define EEPROM_CrystalCap 0x22 //0x22
79 #define EEPROM_TxPwIndex_CCK 0x23 //0x23
80 #define EEPROM_TxPwIndex_OFDM_24G 0x24 //0x24~0x26
81 #define EEPROM_TxPwIndex_CCK_V1 0x29 //0x29~0x2B
82 #define EEPROM_TxPwIndex_OFDM_24G_V1 0x2C //0x2C~0x2E
83 #define EEPROM_TxPwIndex_Ver 0x27 //0x27
85 #define EEPROM_Default_TxPowerDiff 0x0
86 #define EEPROM_Default_ThermalMeter 0x7
87 #define EEPROM_Default_PwDiff 0x4
88 #define EEPROM_Default_CrystalCap 0x5
89 #define EEPROM_Default_TxPower 0x1010
90 #define EEPROM_Customer_ID 0x7B //0x7B:CustomerID
91 #define EEPROM_ChannelPlan 0x16 //0x7C
92 #define EEPROM_IC_VER 0x7d //0x7D
93 #define EEPROM_CRC 0x7e //0x7E~0x7F
95 #define EEPROM_CID_DEFAULT 0x0
96 #define EEPROM_CID_CAMEO 0x1
97 #define EEPROM_CID_RUNTOP 0x2
98 #define EEPROM_CID_Senao 0x3
99 #define EEPROM_CID_TOSHIBA 0x4 // Toshiba setting, Merge by Jacken, 2008/01/31
100 #define EEPROM_CID_NetCore 0x5
101 #define EEPROM_CID_Nettronix 0x6
102 #define EEPROM_CID_Pronet 0x7
103 #define EEPROM_CID_DLINK 0x8
105 #define AC_PARAM_TXOP_LIMIT_OFFSET 16
106 #define AC_PARAM_ECW_MAX_OFFSET 12
107 #define AC_PARAM_ECW_MIN_OFFSET 8
108 #define AC_PARAM_AIFS_OFFSET 0
114 #define BB_GLOBAL_RESET_BIT 0x1
121 #define CR_MulRW 0x01
125 #define TCR_MXDMA_2048 7
126 #define TCR_LRL_OFFSET 0
127 #define TCR_SRL_OFFSET 8
128 #define TCR_MXDMA_OFFSET 21
129 #define TCR_SAT BIT24 // Enable Rate depedent ack timeout timer
131 #define MAC_FILTER_MASK ((1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<5) | \
132 (1<<12) | (1<<18) | (1<<19) | (1<<20) | (1<<21) | (1<<22) | (1<<23))
133 #define RX_FIFO_THRESHOLD_MASK ((1<<13) | (1<<14) | (1<<15))
134 #define RX_FIFO_THRESHOLD_SHIFT 13
135 #define RX_FIFO_THRESHOLD_128 3
136 #define RX_FIFO_THRESHOLD_256 4
137 #define RX_FIFO_THRESHOLD_512 5
138 #define RX_FIFO_THRESHOLD_1024 6
139 #define RX_FIFO_THRESHOLD_NONE 7
140 #define MAX_RX_DMA_MASK ((1<<8) | (1<<9) | (1<<10))
141 #define RCR_MXDMA_OFFSET 8
142 #define RCR_FIFO_OFFSET 13
143 #define RCR_ONLYERLPKT BIT31 // Early Receiving based on Packet Size.
144 #define RCR_ENCS2 BIT30 // Enable Carrier Sense Detection Method 2
145 #define RCR_ENCS1 BIT29 // Enable Carrier Sense Detection Method 1
146 #define RCR_ENMBID BIT27 // Enable Multiple BssId.
147 #define RCR_ACKTXBW (BIT24|BIT25) // TXBW Setting of ACK frames
148 #define RCR_CBSSID BIT23 // Accept BSSID match packet
149 #define RCR_APWRMGT BIT22 // Accept power management packet
150 #define RCR_ADD3 BIT21 // Accept address 3 match packet
151 #define RCR_AMF BIT20 // Accept management type frame
152 #define RCR_ACF BIT19 // Accept control type frame
153 #define RCR_ADF BIT18 // Accept data type frame
154 #define RCR_RXFTH BIT13 // Rx FIFO Threshold
155 #define RCR_AICV BIT12 // Accept ICV error packet
156 #define RCR_ACRC32 BIT5 // Accept CRC32 error packet
157 #define RCR_AB BIT3 // Accept broadcast packet
158 #define RCR_AM BIT2 // Accept multicast packet
159 #define RCR_APM BIT1 // Accept physical match packet
160 #define RCR_AAP BIT0 // Accept all unicast packet
172 #define BCN_TCFG_CW_SHIFT 8
173 #define BCN_TCFG_IFS 0
183 #define SCR_TxUseDK BIT0 //Force Tx Use Default Key
184 #define SCR_RxUseDK BIT1 //Force Rx Use Default Key
185 #define SCR_TxEncEnable BIT2 //Enable Tx Encryption
186 #define SCR_RxDecEnable BIT3 //Enable Rx Decryption
187 #define SCR_SKByA2 BIT4 //Search kEY BY A2
188 #define SCR_NoSKMC BIT5 //No Key Search for Multicast
189 #define SCR_UseDK 0x01
190 #define SCR_TxSecEnable 0x02
191 #define SCR_RxSecEnable 0x04
194 #define CPU_CCK_LOOPBACK 0x00030000
195 #define CPU_GEN_SYSTEM_RESET 0x00000001
196 #define CPU_GEN_FIRMWARE_RESET 0x00000008
197 #define CPU_GEN_BOOT_RDY 0x00000010
198 #define CPU_GEN_FIRM_RDY 0x00000020
199 #define CPU_GEN_PUT_CODE_OK 0x00000080
200 #define CPU_GEN_BB_RST 0x00000100
201 #define CPU_GEN_PWR_STB_CPU 0x00000004
202 #define CPU_GEN_NO_LOOPBACK_MSK 0xFFF8FFFF // Set bit18,17,16 to 0. Set bit19
203 #define CPU_GEN_NO_LOOPBACK_SET 0x00080000 // Set BIT19 to 1
208 #define CPU_CCK_LOOPBACK 0x00030000
209 #define CPU_GEN_SYSTEM_RESET 0x00000001
210 #define CPU_GEN_FIRMWARE_RESET 0x00000008
211 #define CPU_GEN_BOOT_RDY 0x00000010
212 #define CPU_GEN_FIRM_RDY 0x00000020
213 #define CPU_GEN_PUT_CODE_OK 0x00000080
214 #define CPU_GEN_BB_RST 0x00000100
215 #define CPU_GEN_PWR_STB_CPU 0x00000004
216 #define CPU_GEN_NO_LOOPBACK_MSK 0xFFF8FFFF // Set bit18,17,16 to 0. Set bit19
217 #define CPU_GEN_NO_LOOPBACK_SET 0x00080000 // Set BIT19 to 1
229 #define AcmHw_HwEn BIT0
230 #define AcmHw_BeqEn BIT1
231 #define AcmHw_ViqEn BIT2
232 #define AcmHw_VoqEn BIT3
233 #define AcmHw_BeqStatus BIT4
234 #define AcmHw_ViqStatus BIT5
235 #define AcmHw_VoqStatus BIT6
284 #define BW_OPMODE_11J BIT0
285 #define BW_OPMODE_5G BIT1
286 #define BW_OPMODE_20MHZ BIT2
289 #define MSR_LINK_MASK ((1<<0)|(1<<1))
290 #define MSR_LINK_MANAGED 2
291 #define MSR_LINK_NONE 0
292 #define MSR_LINK_SHIFT 0
293 #define MSR_LINK_ADHOC 1
294 #define MSR_LINK_MASTER 3
295 #define MSR_LINK_ENEDCA (1<<4)
297 #define RETRY_LIMIT_SHORT_SHIFT 8
298 #define RETRY_LIMIT_LONG_SHIFT 0
301 #define RRSR_RSC_OFFSET 21
302 #define RRSR_SHORT_OFFSET 23
303 #define RRSR_RSC_DUPLICATE 0x600000
304 #define RRSR_RSC_LOWSUBCHNL 0x400000
305 #define RRSR_RSC_UPSUBCHANL 0x200000
306 #define RRSR_SHORT 0x800000
309 #define RRSR_5_5M BIT2
310 #define RRSR_11M BIT3
313 #define RRSR_12M BIT6
314 #define RRSR_18M BIT7
315 #define RRSR_24M BIT8
316 #define RRSR_36M BIT9
317 #define RRSR_48M BIT10
318 #define RRSR_54M BIT11
319 #define RRSR_MCS0 BIT12
320 #define RRSR_MCS1 BIT13
321 #define RRSR_MCS2 BIT14
322 #define RRSR_MCS3 BIT15
323 #define RRSR_MCS4 BIT16
324 #define RRSR_MCS5 BIT17
325 #define RRSR_MCS6 BIT18
326 #define RRSR_MCS7 BIT19
327 #define BRSR_AckShortPmb BIT23 // CCK ACK: use Short Preamble or not.
335 #define RATR_1M 0x00000001
336 #define RATR_2M 0x00000002
337 #define RATR_55M 0x00000004
338 #define RATR_11M 0x00000008
340 #define RATR_6M 0x00000010
341 #define RATR_9M 0x00000020
342 #define RATR_12M 0x00000040
343 #define RATR_18M 0x00000080
344 #define RATR_24M 0x00000100
345 #define RATR_36M 0x00000200
346 #define RATR_48M 0x00000400
347 #define RATR_54M 0x00000800
349 #define RATR_MCS0 0x00001000
350 #define RATR_MCS1 0x00002000
351 #define RATR_MCS2 0x00004000
352 #define RATR_MCS3 0x00008000
353 #define RATR_MCS4 0x00010000
354 #define RATR_MCS5 0x00020000
355 #define RATR_MCS6 0x00040000
356 #define RATR_MCS7 0x00080000
358 #define RATR_MCS8 0x00100000
359 #define RATR_MCS9 0x00200000
360 #define RATR_MCS10 0x00400000
361 #define RATR_MCS11 0x00800000
362 #define RATR_MCS12 0x01000000
363 #define RATR_MCS13 0x02000000
364 #define RATR_MCS14 0x04000000
365 #define RATR_MCS15 0x08000000
367 #define RATE_ALL_CCK RATR_1M|RATR_2M|RATR_55M|RATR_11M
368 #define RATE_ALL_OFDM_AG RATR_6M|RATR_9M|RATR_12M|RATR_18M|RATR_24M\
369 |RATR_36M|RATR_48M|RATR_54M
370 #define RATE_ALL_OFDM_1SS RATR_MCS0|RATR_MCS1|RATR_MCS2|RATR_MCS3 | \
371 RATR_MCS4|RATR_MCS5|RATR_MCS6|RATR_MCS7
372 #define RATE_ALL_OFDM_2SS RATR_MCS8|RATR_MCS9 |RATR_MCS10|RATR_MCS11| \
373 RATR_MCS12|RATR_MCS13|RATR_MCS14|RATR_MCS15
383 #define Cmd9346CR_9356SEL (1<<4)
384 #define EPROM_CMD_RESERVED_MASK (1<<5)
385 #define EPROM_CMD_OPERATING_MODE_SHIFT 6
386 #define EPROM_CMD_OPERATING_MODE_MASK ((1<<7)|(1<<6))
387 #define EPROM_CMD_CONFIG 0x3
388 #define EPROM_CMD_NORMAL 0
389 #define EPROM_CMD_LOAD 1
390 #define EPROM_CMD_PROGRAM 2
391 #define EPROM_CS_SHIFT 3
392 #define EPROM_CK_SHIFT 2
393 #define EPROM_W_SHIFT 1
394 #define EPROM_R_SHIFT 0