Commit | Line | Data |
---|---|---|
5449c685 FB |
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 | * | |
612822f5 | 19 | * |
5449c685 FB |
20 | * File: baseband.c |
21 | * | |
22 | * Purpose: Implement functions to access baseband | |
23 | * | |
24 | * Author: Kyle Hsu | |
25 | * | |
26 | * Date: Aug.22, 2002 | |
27 | * | |
28 | * Functions: | |
29 | * BBuGetFrameTime - Calculate data frame transmitting time | |
527ef70d SB |
30 | * BBvCaculateParameter - Caculate PhyLength, PhyService and Phy Signal |
31 | * parameter for baseband Tx | |
623b2b39 JM |
32 | * BBbReadEmbedded - Embedded read baseband register via MAC |
33 | * BBbWriteEmbedded - Embedded write baseband register via MAC | |
5449c685 | 34 | * BBbVT3253Init - VIA VT3253 baseband chip init code |
5449c685 FB |
35 | * |
36 | * Revision History: | |
37 | * 06-10-2003 Bryan YC Fan: Re-write codes to support VT3253 spec. | |
38 | * 08-07-2003 Bryan YC Fan: Add MAXIM2827/2825 and RFMD2959 support. | |
7664ec86 | 39 | * 08-26-2003 Kyle Hsu : Modify BBuGetFrameTime() and BBvCalculateParameter(). |
5449c685 FB |
40 | * cancel the setting of MAC_REG_SOFTPWRCTL on BBbVT3253Init(). |
41 | * Add the comments. | |
42 | * 09-01-2003 Bryan YC Fan: RF & BB tables updated. | |
43 | * Modified BBvLoopbackOn & BBvLoopbackOff(). | |
612822f5 JL |
44 | * |
45 | * | |
5449c685 FB |
46 | */ |
47 | ||
5449c685 | 48 | #include "tmacro.h" |
5449c685 | 49 | #include "mac.h" |
5449c685 | 50 | #include "baseband.h" |
5449c685 | 51 | #include "srom.h" |
5449c685 | 52 | #include "rf.h" |
5449c685 | 53 | |
5449c685 FB |
54 | /*--------------------- Static Classes ----------------------------*/ |
55 | ||
56 | /*--------------------- Static Variables --------------------------*/ | |
612822f5 | 57 | |
5449c685 FB |
58 | /*--------------------- Static Functions --------------------------*/ |
59 | ||
60 | /*--------------------- Export Variables --------------------------*/ | |
61 | ||
62 | /*--------------------- Static Definitions -------------------------*/ | |
63 | ||
64 | /*--------------------- Static Classes ----------------------------*/ | |
65 | ||
66 | /*--------------------- Static Variables --------------------------*/ | |
67 | ||
5449c685 | 68 | #define CB_VT3253_INIT_FOR_RFMD 446 |
9e4c5c28 | 69 | static unsigned char byVT3253InitTab_RFMD[CB_VT3253_INIT_FOR_RFMD][2] = { |
37529367 JP |
70 | {0x00, 0x30}, |
71 | {0x01, 0x00}, | |
72 | {0x02, 0x00}, | |
73 | {0x03, 0x00}, | |
74 | {0x04, 0x00}, | |
75 | {0x05, 0x00}, | |
76 | {0x06, 0x00}, | |
77 | {0x07, 0x00}, | |
78 | {0x08, 0x70}, | |
79 | {0x09, 0x45}, | |
80 | {0x0a, 0x2a}, | |
81 | {0x0b, 0x76}, | |
82 | {0x0c, 0x00}, | |
83 | {0x0d, 0x01}, | |
84 | {0x0e, 0x80}, | |
85 | {0x0f, 0x00}, | |
86 | {0x10, 0x00}, | |
87 | {0x11, 0x00}, | |
88 | {0x12, 0x00}, | |
89 | {0x13, 0x00}, | |
90 | {0x14, 0x00}, | |
91 | {0x15, 0x00}, | |
92 | {0x16, 0x00}, | |
93 | {0x17, 0x00}, | |
94 | {0x18, 0x00}, | |
95 | {0x19, 0x00}, | |
96 | {0x1a, 0x00}, | |
97 | {0x1b, 0x9d}, | |
98 | {0x1c, 0x05}, | |
99 | {0x1d, 0x00}, | |
100 | {0x1e, 0x00}, | |
101 | {0x1f, 0x00}, | |
102 | {0x20, 0x00}, | |
103 | {0x21, 0x00}, | |
104 | {0x22, 0x00}, | |
105 | {0x23, 0x00}, | |
106 | {0x24, 0x00}, | |
107 | {0x25, 0x4a}, | |
108 | {0x26, 0x00}, | |
109 | {0x27, 0x00}, | |
110 | {0x28, 0x00}, | |
111 | {0x29, 0x00}, | |
112 | {0x2a, 0x00}, | |
113 | {0x2b, 0x00}, | |
114 | {0x2c, 0x00}, | |
115 | {0x2d, 0xa8}, | |
116 | {0x2e, 0x1a}, | |
117 | {0x2f, 0x0c}, | |
118 | {0x30, 0x26}, | |
119 | {0x31, 0x5b}, | |
120 | {0x32, 0x00}, | |
121 | {0x33, 0x00}, | |
122 | {0x34, 0x00}, | |
123 | {0x35, 0x00}, | |
124 | {0x36, 0xaa}, | |
125 | {0x37, 0xaa}, | |
126 | {0x38, 0xff}, | |
127 | {0x39, 0xff}, | |
128 | {0x3a, 0x00}, | |
129 | {0x3b, 0x00}, | |
130 | {0x3c, 0x00}, | |
131 | {0x3d, 0x0d}, | |
132 | {0x3e, 0x51}, | |
133 | {0x3f, 0x04}, | |
134 | {0x40, 0x00}, | |
135 | {0x41, 0x08}, | |
136 | {0x42, 0x00}, | |
137 | {0x43, 0x08}, | |
138 | {0x44, 0x06}, | |
139 | {0x45, 0x14}, | |
140 | {0x46, 0x05}, | |
141 | {0x47, 0x08}, | |
142 | {0x48, 0x00}, | |
143 | {0x49, 0x00}, | |
144 | {0x4a, 0x00}, | |
145 | {0x4b, 0x00}, | |
146 | {0x4c, 0x09}, | |
147 | {0x4d, 0x80}, | |
148 | {0x4e, 0x00}, | |
149 | {0x4f, 0xc5}, | |
150 | {0x50, 0x14}, | |
151 | {0x51, 0x19}, | |
152 | {0x52, 0x00}, | |
153 | {0x53, 0x00}, | |
154 | {0x54, 0x00}, | |
155 | {0x55, 0x00}, | |
156 | {0x56, 0x00}, | |
157 | {0x57, 0x00}, | |
158 | {0x58, 0x00}, | |
159 | {0x59, 0xb0}, | |
160 | {0x5a, 0x00}, | |
161 | {0x5b, 0x00}, | |
162 | {0x5c, 0x00}, | |
163 | {0x5d, 0x00}, | |
164 | {0x5e, 0x00}, | |
165 | {0x5f, 0x00}, | |
166 | {0x60, 0x44}, | |
167 | {0x61, 0x04}, | |
168 | {0x62, 0x00}, | |
169 | {0x63, 0x00}, | |
170 | {0x64, 0x00}, | |
171 | {0x65, 0x00}, | |
172 | {0x66, 0x04}, | |
173 | {0x67, 0xb7}, | |
174 | {0x68, 0x00}, | |
175 | {0x69, 0x00}, | |
176 | {0x6a, 0x00}, | |
177 | {0x6b, 0x00}, | |
178 | {0x6c, 0x00}, | |
179 | {0x6d, 0x03}, | |
180 | {0x6e, 0x01}, | |
181 | {0x6f, 0x00}, | |
182 | {0x70, 0x00}, | |
183 | {0x71, 0x00}, | |
184 | {0x72, 0x00}, | |
185 | {0x73, 0x00}, | |
186 | {0x74, 0x00}, | |
187 | {0x75, 0x00}, | |
188 | {0x76, 0x00}, | |
189 | {0x77, 0x00}, | |
190 | {0x78, 0x00}, | |
191 | {0x79, 0x00}, | |
192 | {0x7a, 0x00}, | |
193 | {0x7b, 0x00}, | |
194 | {0x7c, 0x00}, | |
195 | {0x7d, 0x00}, | |
196 | {0x7e, 0x00}, | |
197 | {0x7f, 0x00}, | |
198 | {0x80, 0x0b}, | |
199 | {0x81, 0x00}, | |
200 | {0x82, 0x3c}, | |
201 | {0x83, 0x00}, | |
202 | {0x84, 0x00}, | |
203 | {0x85, 0x00}, | |
204 | {0x86, 0x00}, | |
205 | {0x87, 0x00}, | |
206 | {0x88, 0x08}, | |
207 | {0x89, 0x00}, | |
208 | {0x8a, 0x08}, | |
209 | {0x8b, 0xa6}, | |
210 | {0x8c, 0x84}, | |
211 | {0x8d, 0x47}, | |
212 | {0x8e, 0xbb}, | |
213 | {0x8f, 0x02}, | |
214 | {0x90, 0x21}, | |
215 | {0x91, 0x0c}, | |
216 | {0x92, 0x04}, | |
217 | {0x93, 0x22}, | |
218 | {0x94, 0x00}, | |
219 | {0x95, 0x00}, | |
220 | {0x96, 0x00}, | |
221 | {0x97, 0xeb}, | |
222 | {0x98, 0x00}, | |
223 | {0x99, 0x00}, | |
224 | {0x9a, 0x00}, | |
225 | {0x9b, 0x00}, | |
226 | {0x9c, 0x00}, | |
227 | {0x9d, 0x00}, | |
228 | {0x9e, 0x00}, | |
229 | {0x9f, 0x00}, | |
230 | {0xa0, 0x00}, | |
231 | {0xa1, 0x00}, | |
232 | {0xa2, 0x00}, | |
233 | {0xa3, 0x00}, | |
234 | {0xa4, 0x00}, | |
235 | {0xa5, 0x00}, | |
236 | {0xa6, 0x10}, | |
237 | {0xa7, 0x04}, | |
238 | {0xa8, 0x10}, | |
239 | {0xa9, 0x00}, | |
240 | {0xaa, 0x8f}, | |
241 | {0xab, 0x00}, | |
242 | {0xac, 0x00}, | |
243 | {0xad, 0x00}, | |
244 | {0xae, 0x00}, | |
245 | {0xaf, 0x80}, | |
246 | {0xb0, 0x38}, | |
247 | {0xb1, 0x00}, | |
248 | {0xb2, 0x00}, | |
249 | {0xb3, 0x00}, | |
250 | {0xb4, 0xee}, | |
251 | {0xb5, 0xff}, | |
252 | {0xb6, 0x10}, | |
253 | {0xb7, 0x00}, | |
254 | {0xb8, 0x00}, | |
255 | {0xb9, 0x00}, | |
256 | {0xba, 0x00}, | |
257 | {0xbb, 0x03}, | |
258 | {0xbc, 0x00}, | |
259 | {0xbd, 0x00}, | |
260 | {0xbe, 0x00}, | |
261 | {0xbf, 0x00}, | |
262 | {0xc0, 0x10}, | |
263 | {0xc1, 0x10}, | |
264 | {0xc2, 0x18}, | |
265 | {0xc3, 0x20}, | |
266 | {0xc4, 0x10}, | |
267 | {0xc5, 0x00}, | |
268 | {0xc6, 0x22}, | |
269 | {0xc7, 0x14}, | |
270 | {0xc8, 0x0f}, | |
271 | {0xc9, 0x08}, | |
272 | {0xca, 0xa4}, | |
273 | {0xcb, 0xa7}, | |
274 | {0xcc, 0x3c}, | |
275 | {0xcd, 0x10}, | |
276 | {0xce, 0x20}, | |
277 | {0xcf, 0x00}, | |
278 | {0xd0, 0x00}, | |
279 | {0xd1, 0x10}, | |
280 | {0xd2, 0x00}, | |
281 | {0xd3, 0x00}, | |
282 | {0xd4, 0x10}, | |
283 | {0xd5, 0x33}, | |
284 | {0xd6, 0x70}, | |
285 | {0xd7, 0x01}, | |
286 | {0xd8, 0x00}, | |
287 | {0xd9, 0x00}, | |
288 | {0xda, 0x00}, | |
289 | {0xdb, 0x00}, | |
290 | {0xdc, 0x00}, | |
291 | {0xdd, 0x00}, | |
292 | {0xde, 0x00}, | |
293 | {0xdf, 0x00}, | |
294 | {0xe0, 0x00}, | |
295 | {0xe1, 0x00}, | |
296 | {0xe2, 0xcc}, | |
297 | {0xe3, 0x04}, | |
298 | {0xe4, 0x08}, | |
299 | {0xe5, 0x10}, | |
300 | {0xe6, 0x00}, | |
301 | {0xe7, 0x0e}, | |
302 | {0xe8, 0x88}, | |
303 | {0xe9, 0xd4}, | |
304 | {0xea, 0x05}, | |
305 | {0xeb, 0xf0}, | |
306 | {0xec, 0x79}, | |
307 | {0xed, 0x0f}, | |
308 | {0xee, 0x04}, | |
309 | {0xef, 0x04}, | |
310 | {0xf0, 0x00}, | |
311 | {0xf1, 0x00}, | |
312 | {0xf2, 0x00}, | |
313 | {0xf3, 0x00}, | |
314 | {0xf4, 0x00}, | |
315 | {0xf5, 0x00}, | |
316 | {0xf6, 0x00}, | |
317 | {0xf7, 0x00}, | |
318 | {0xf8, 0x00}, | |
319 | {0xf9, 0x00}, | |
320 | {0xF0, 0x00}, | |
321 | {0xF1, 0xF8}, | |
322 | {0xF0, 0x80}, | |
323 | {0xF0, 0x00}, | |
324 | {0xF1, 0xF4}, | |
325 | {0xF0, 0x81}, | |
326 | {0xF0, 0x01}, | |
327 | {0xF1, 0xF0}, | |
328 | {0xF0, 0x82}, | |
329 | {0xF0, 0x02}, | |
330 | {0xF1, 0xEC}, | |
331 | {0xF0, 0x83}, | |
332 | {0xF0, 0x03}, | |
333 | {0xF1, 0xE8}, | |
334 | {0xF0, 0x84}, | |
335 | {0xF0, 0x04}, | |
336 | {0xF1, 0xE4}, | |
337 | {0xF0, 0x85}, | |
338 | {0xF0, 0x05}, | |
339 | {0xF1, 0xE0}, | |
340 | {0xF0, 0x86}, | |
341 | {0xF0, 0x06}, | |
342 | {0xF1, 0xDC}, | |
343 | {0xF0, 0x87}, | |
344 | {0xF0, 0x07}, | |
345 | {0xF1, 0xD8}, | |
346 | {0xF0, 0x88}, | |
347 | {0xF0, 0x08}, | |
348 | {0xF1, 0xD4}, | |
349 | {0xF0, 0x89}, | |
350 | {0xF0, 0x09}, | |
351 | {0xF1, 0xD0}, | |
352 | {0xF0, 0x8A}, | |
353 | {0xF0, 0x0A}, | |
354 | {0xF1, 0xCC}, | |
355 | {0xF0, 0x8B}, | |
356 | {0xF0, 0x0B}, | |
357 | {0xF1, 0xC8}, | |
358 | {0xF0, 0x8C}, | |
359 | {0xF0, 0x0C}, | |
360 | {0xF1, 0xC4}, | |
361 | {0xF0, 0x8D}, | |
362 | {0xF0, 0x0D}, | |
363 | {0xF1, 0xC0}, | |
364 | {0xF0, 0x8E}, | |
365 | {0xF0, 0x0E}, | |
366 | {0xF1, 0xBC}, | |
367 | {0xF0, 0x8F}, | |
368 | {0xF0, 0x0F}, | |
369 | {0xF1, 0xB8}, | |
370 | {0xF0, 0x90}, | |
371 | {0xF0, 0x10}, | |
372 | {0xF1, 0xB4}, | |
373 | {0xF0, 0x91}, | |
374 | {0xF0, 0x11}, | |
375 | {0xF1, 0xB0}, | |
376 | {0xF0, 0x92}, | |
377 | {0xF0, 0x12}, | |
378 | {0xF1, 0xAC}, | |
379 | {0xF0, 0x93}, | |
380 | {0xF0, 0x13}, | |
381 | {0xF1, 0xA8}, | |
382 | {0xF0, 0x94}, | |
383 | {0xF0, 0x14}, | |
384 | {0xF1, 0xA4}, | |
385 | {0xF0, 0x95}, | |
386 | {0xF0, 0x15}, | |
387 | {0xF1, 0xA0}, | |
388 | {0xF0, 0x96}, | |
389 | {0xF0, 0x16}, | |
390 | {0xF1, 0x9C}, | |
391 | {0xF0, 0x97}, | |
392 | {0xF0, 0x17}, | |
393 | {0xF1, 0x98}, | |
394 | {0xF0, 0x98}, | |
395 | {0xF0, 0x18}, | |
396 | {0xF1, 0x94}, | |
397 | {0xF0, 0x99}, | |
398 | {0xF0, 0x19}, | |
399 | {0xF1, 0x90}, | |
400 | {0xF0, 0x9A}, | |
401 | {0xF0, 0x1A}, | |
402 | {0xF1, 0x8C}, | |
403 | {0xF0, 0x9B}, | |
404 | {0xF0, 0x1B}, | |
405 | {0xF1, 0x88}, | |
406 | {0xF0, 0x9C}, | |
407 | {0xF0, 0x1C}, | |
408 | {0xF1, 0x84}, | |
409 | {0xF0, 0x9D}, | |
410 | {0xF0, 0x1D}, | |
411 | {0xF1, 0x80}, | |
412 | {0xF0, 0x9E}, | |
413 | {0xF0, 0x1E}, | |
414 | {0xF1, 0x7C}, | |
415 | {0xF0, 0x9F}, | |
416 | {0xF0, 0x1F}, | |
417 | {0xF1, 0x78}, | |
418 | {0xF0, 0xA0}, | |
419 | {0xF0, 0x20}, | |
420 | {0xF1, 0x74}, | |
421 | {0xF0, 0xA1}, | |
422 | {0xF0, 0x21}, | |
423 | {0xF1, 0x70}, | |
424 | {0xF0, 0xA2}, | |
425 | {0xF0, 0x22}, | |
426 | {0xF1, 0x6C}, | |
427 | {0xF0, 0xA3}, | |
428 | {0xF0, 0x23}, | |
429 | {0xF1, 0x68}, | |
430 | {0xF0, 0xA4}, | |
431 | {0xF0, 0x24}, | |
432 | {0xF1, 0x64}, | |
433 | {0xF0, 0xA5}, | |
434 | {0xF0, 0x25}, | |
435 | {0xF1, 0x60}, | |
436 | {0xF0, 0xA6}, | |
437 | {0xF0, 0x26}, | |
438 | {0xF1, 0x5C}, | |
439 | {0xF0, 0xA7}, | |
440 | {0xF0, 0x27}, | |
441 | {0xF1, 0x58}, | |
442 | {0xF0, 0xA8}, | |
443 | {0xF0, 0x28}, | |
444 | {0xF1, 0x54}, | |
445 | {0xF0, 0xA9}, | |
446 | {0xF0, 0x29}, | |
447 | {0xF1, 0x50}, | |
448 | {0xF0, 0xAA}, | |
449 | {0xF0, 0x2A}, | |
450 | {0xF1, 0x4C}, | |
451 | {0xF0, 0xAB}, | |
452 | {0xF0, 0x2B}, | |
453 | {0xF1, 0x48}, | |
454 | {0xF0, 0xAC}, | |
455 | {0xF0, 0x2C}, | |
456 | {0xF1, 0x44}, | |
457 | {0xF0, 0xAD}, | |
458 | {0xF0, 0x2D}, | |
459 | {0xF1, 0x40}, | |
460 | {0xF0, 0xAE}, | |
461 | {0xF0, 0x2E}, | |
462 | {0xF1, 0x3C}, | |
463 | {0xF0, 0xAF}, | |
464 | {0xF0, 0x2F}, | |
465 | {0xF1, 0x38}, | |
466 | {0xF0, 0xB0}, | |
467 | {0xF0, 0x30}, | |
468 | {0xF1, 0x34}, | |
469 | {0xF0, 0xB1}, | |
470 | {0xF0, 0x31}, | |
471 | {0xF1, 0x30}, | |
472 | {0xF0, 0xB2}, | |
473 | {0xF0, 0x32}, | |
474 | {0xF1, 0x2C}, | |
475 | {0xF0, 0xB3}, | |
476 | {0xF0, 0x33}, | |
477 | {0xF1, 0x28}, | |
478 | {0xF0, 0xB4}, | |
479 | {0xF0, 0x34}, | |
480 | {0xF1, 0x24}, | |
481 | {0xF0, 0xB5}, | |
482 | {0xF0, 0x35}, | |
483 | {0xF1, 0x20}, | |
484 | {0xF0, 0xB6}, | |
485 | {0xF0, 0x36}, | |
486 | {0xF1, 0x1C}, | |
487 | {0xF0, 0xB7}, | |
488 | {0xF0, 0x37}, | |
489 | {0xF1, 0x18}, | |
490 | {0xF0, 0xB8}, | |
491 | {0xF0, 0x38}, | |
492 | {0xF1, 0x14}, | |
493 | {0xF0, 0xB9}, | |
494 | {0xF0, 0x39}, | |
495 | {0xF1, 0x10}, | |
496 | {0xF0, 0xBA}, | |
497 | {0xF0, 0x3A}, | |
498 | {0xF1, 0x0C}, | |
499 | {0xF0, 0xBB}, | |
500 | {0xF0, 0x3B}, | |
501 | {0xF1, 0x08}, | |
502 | {0xF0, 0x00}, | |
503 | {0xF0, 0x3C}, | |
504 | {0xF1, 0x04}, | |
505 | {0xF0, 0xBD}, | |
506 | {0xF0, 0x3D}, | |
507 | {0xF1, 0x00}, | |
508 | {0xF0, 0xBE}, | |
509 | {0xF0, 0x3E}, | |
510 | {0xF1, 0x00}, | |
511 | {0xF0, 0xBF}, | |
512 | {0xF0, 0x3F}, | |
513 | {0xF1, 0x00}, | |
514 | {0xF0, 0xC0}, | |
515 | {0xF0, 0x00}, | |
5449c685 FB |
516 | }; |
517 | ||
518 | #define CB_VT3253B0_INIT_FOR_RFMD 256 | |
9e4c5c28 | 519 | static unsigned char byVT3253B0_RFMD[CB_VT3253B0_INIT_FOR_RFMD][2] = { |
37529367 JP |
520 | {0x00, 0x31}, |
521 | {0x01, 0x00}, | |
522 | {0x02, 0x00}, | |
523 | {0x03, 0x00}, | |
524 | {0x04, 0x00}, | |
525 | {0x05, 0x81}, | |
526 | {0x06, 0x00}, | |
527 | {0x07, 0x00}, | |
528 | {0x08, 0x38}, | |
529 | {0x09, 0x45}, | |
530 | {0x0a, 0x2a}, | |
531 | {0x0b, 0x76}, | |
532 | {0x0c, 0x00}, | |
533 | {0x0d, 0x00}, | |
534 | {0x0e, 0x80}, | |
535 | {0x0f, 0x00}, | |
536 | {0x10, 0x00}, | |
537 | {0x11, 0x00}, | |
538 | {0x12, 0x00}, | |
539 | {0x13, 0x00}, | |
540 | {0x14, 0x00}, | |
541 | {0x15, 0x00}, | |
542 | {0x16, 0x00}, | |
543 | {0x17, 0x00}, | |
544 | {0x18, 0x00}, | |
545 | {0x19, 0x00}, | |
546 | {0x1a, 0x00}, | |
547 | {0x1b, 0x8e}, | |
548 | {0x1c, 0x06}, | |
549 | {0x1d, 0x00}, | |
550 | {0x1e, 0x00}, | |
551 | {0x1f, 0x00}, | |
552 | {0x20, 0x00}, | |
553 | {0x21, 0x00}, | |
554 | {0x22, 0x00}, | |
555 | {0x23, 0x00}, | |
556 | {0x24, 0x00}, | |
557 | {0x25, 0x4a}, | |
558 | {0x26, 0x00}, | |
559 | {0x27, 0x00}, | |
560 | {0x28, 0x00}, | |
561 | {0x29, 0x00}, | |
562 | {0x2a, 0x00}, | |
563 | {0x2b, 0x00}, | |
564 | {0x2c, 0x00}, | |
565 | {0x2d, 0x34}, | |
566 | {0x2e, 0x18}, | |
567 | {0x2f, 0x0c}, | |
568 | {0x30, 0x26}, | |
569 | {0x31, 0x5b}, | |
570 | {0x32, 0x00}, | |
571 | {0x33, 0x00}, | |
572 | {0x34, 0x00}, | |
573 | {0x35, 0x00}, | |
574 | {0x36, 0xaa}, | |
575 | {0x37, 0xaa}, | |
576 | {0x38, 0xff}, | |
577 | {0x39, 0xff}, | |
578 | {0x3a, 0xf8}, | |
579 | {0x3b, 0x00}, | |
580 | {0x3c, 0x00}, | |
581 | {0x3d, 0x09}, | |
582 | {0x3e, 0x0d}, | |
583 | {0x3f, 0x04}, | |
584 | {0x40, 0x00}, | |
585 | {0x41, 0x08}, | |
586 | {0x42, 0x00}, | |
587 | {0x43, 0x08}, | |
588 | {0x44, 0x08}, | |
589 | {0x45, 0x14}, | |
590 | {0x46, 0x05}, | |
591 | {0x47, 0x08}, | |
592 | {0x48, 0x00}, | |
593 | {0x49, 0x00}, | |
594 | {0x4a, 0x00}, | |
595 | {0x4b, 0x00}, | |
596 | {0x4c, 0x09}, | |
597 | {0x4d, 0x80}, | |
598 | {0x4e, 0x00}, | |
599 | {0x4f, 0xc5}, | |
600 | {0x50, 0x14}, | |
601 | {0x51, 0x19}, | |
602 | {0x52, 0x00}, | |
603 | {0x53, 0x00}, | |
604 | {0x54, 0x00}, | |
605 | {0x55, 0x00}, | |
606 | {0x56, 0x00}, | |
607 | {0x57, 0x00}, | |
608 | {0x58, 0x00}, | |
609 | {0x59, 0xb0}, | |
610 | {0x5a, 0x00}, | |
611 | {0x5b, 0x00}, | |
612 | {0x5c, 0x00}, | |
613 | {0x5d, 0x00}, | |
614 | {0x5e, 0x00}, | |
615 | {0x5f, 0x00}, | |
616 | {0x60, 0x39}, | |
617 | {0x61, 0x83}, | |
618 | {0x62, 0x00}, | |
619 | {0x63, 0x00}, | |
620 | {0x64, 0x00}, | |
621 | {0x65, 0x00}, | |
622 | {0x66, 0xc0}, | |
623 | {0x67, 0x49}, | |
624 | {0x68, 0x00}, | |
625 | {0x69, 0x00}, | |
626 | {0x6a, 0x00}, | |
627 | {0x6b, 0x00}, | |
628 | {0x6c, 0x00}, | |
629 | {0x6d, 0x03}, | |
630 | {0x6e, 0x01}, | |
631 | {0x6f, 0x00}, | |
632 | {0x70, 0x00}, | |
633 | {0x71, 0x00}, | |
634 | {0x72, 0x00}, | |
635 | {0x73, 0x00}, | |
636 | {0x74, 0x00}, | |
637 | {0x75, 0x00}, | |
638 | {0x76, 0x00}, | |
639 | {0x77, 0x00}, | |
640 | {0x78, 0x00}, | |
641 | {0x79, 0x00}, | |
642 | {0x7a, 0x00}, | |
643 | {0x7b, 0x00}, | |
644 | {0x7c, 0x00}, | |
645 | {0x7d, 0x00}, | |
646 | {0x7e, 0x00}, | |
647 | {0x7f, 0x00}, | |
648 | {0x80, 0x89}, | |
649 | {0x81, 0x00}, | |
650 | {0x82, 0x0e}, | |
651 | {0x83, 0x00}, | |
652 | {0x84, 0x00}, | |
653 | {0x85, 0x00}, | |
654 | {0x86, 0x00}, | |
655 | {0x87, 0x00}, | |
656 | {0x88, 0x08}, | |
657 | {0x89, 0x00}, | |
658 | {0x8a, 0x0e}, | |
659 | {0x8b, 0xa7}, | |
660 | {0x8c, 0x88}, | |
661 | {0x8d, 0x47}, | |
662 | {0x8e, 0xaa}, | |
663 | {0x8f, 0x02}, | |
664 | {0x90, 0x23}, | |
665 | {0x91, 0x0c}, | |
666 | {0x92, 0x06}, | |
667 | {0x93, 0x08}, | |
668 | {0x94, 0x00}, | |
669 | {0x95, 0x00}, | |
670 | {0x96, 0x00}, | |
671 | {0x97, 0xeb}, | |
672 | {0x98, 0x00}, | |
673 | {0x99, 0x00}, | |
674 | {0x9a, 0x00}, | |
675 | {0x9b, 0x00}, | |
676 | {0x9c, 0x00}, | |
677 | {0x9d, 0x00}, | |
678 | {0x9e, 0x00}, | |
679 | {0x9f, 0x00}, | |
680 | {0xa0, 0x00}, | |
681 | {0xa1, 0x00}, | |
682 | {0xa2, 0x00}, | |
683 | {0xa3, 0xcd}, | |
684 | {0xa4, 0x07}, | |
685 | {0xa5, 0x33}, | |
686 | {0xa6, 0x18}, | |
687 | {0xa7, 0x00}, | |
688 | {0xa8, 0x18}, | |
689 | {0xa9, 0x00}, | |
690 | {0xaa, 0x28}, | |
691 | {0xab, 0x00}, | |
692 | {0xac, 0x00}, | |
693 | {0xad, 0x00}, | |
694 | {0xae, 0x00}, | |
695 | {0xaf, 0x18}, | |
696 | {0xb0, 0x38}, | |
697 | {0xb1, 0x30}, | |
698 | {0xb2, 0x00}, | |
699 | {0xb3, 0x00}, | |
700 | {0xb4, 0x00}, | |
701 | {0xb5, 0x00}, | |
702 | {0xb6, 0x84}, | |
703 | {0xb7, 0xfd}, | |
704 | {0xb8, 0x00}, | |
705 | {0xb9, 0x00}, | |
706 | {0xba, 0x00}, | |
707 | {0xbb, 0x03}, | |
708 | {0xbc, 0x00}, | |
709 | {0xbd, 0x00}, | |
710 | {0xbe, 0x00}, | |
711 | {0xbf, 0x00}, | |
712 | {0xc0, 0x10}, | |
713 | {0xc1, 0x20}, | |
714 | {0xc2, 0x18}, | |
715 | {0xc3, 0x20}, | |
716 | {0xc4, 0x10}, | |
717 | {0xc5, 0x2c}, | |
718 | {0xc6, 0x1e}, | |
719 | {0xc7, 0x10}, | |
720 | {0xc8, 0x12}, | |
721 | {0xc9, 0x01}, | |
722 | {0xca, 0x6f}, | |
723 | {0xcb, 0xa7}, | |
724 | {0xcc, 0x3c}, | |
725 | {0xcd, 0x10}, | |
726 | {0xce, 0x00}, | |
727 | {0xcf, 0x22}, | |
728 | {0xd0, 0x00}, | |
729 | {0xd1, 0x10}, | |
730 | {0xd2, 0x00}, | |
731 | {0xd3, 0x00}, | |
732 | {0xd4, 0x10}, | |
733 | {0xd5, 0x33}, | |
734 | {0xd6, 0x80}, | |
735 | {0xd7, 0x21}, | |
736 | {0xd8, 0x00}, | |
737 | {0xd9, 0x00}, | |
738 | {0xda, 0x00}, | |
739 | {0xdb, 0x00}, | |
740 | {0xdc, 0x00}, | |
741 | {0xdd, 0x00}, | |
742 | {0xde, 0x00}, | |
743 | {0xdf, 0x00}, | |
744 | {0xe0, 0x00}, | |
745 | {0xe1, 0xB3}, | |
746 | {0xe2, 0x00}, | |
747 | {0xe3, 0x00}, | |
748 | {0xe4, 0x00}, | |
749 | {0xe5, 0x10}, | |
750 | {0xe6, 0x00}, | |
751 | {0xe7, 0x18}, | |
752 | {0xe8, 0x08}, | |
753 | {0xe9, 0xd4}, | |
754 | {0xea, 0x00}, | |
755 | {0xeb, 0xff}, | |
756 | {0xec, 0x79}, | |
757 | {0xed, 0x10}, | |
758 | {0xee, 0x30}, | |
759 | {0xef, 0x02}, | |
760 | {0xf0, 0x00}, | |
761 | {0xf1, 0x09}, | |
762 | {0xf2, 0x00}, | |
763 | {0xf3, 0x00}, | |
764 | {0xf4, 0x00}, | |
765 | {0xf5, 0x00}, | |
766 | {0xf6, 0x00}, | |
767 | {0xf7, 0x00}, | |
768 | {0xf8, 0x00}, | |
769 | {0xf9, 0x00}, | |
770 | {0xfa, 0x00}, | |
771 | {0xfb, 0x00}, | |
772 | {0xfc, 0x00}, | |
773 | {0xfd, 0x00}, | |
774 | {0xfe, 0x00}, | |
775 | {0xff, 0x00}, | |
5449c685 FB |
776 | }; |
777 | ||
778 | #define CB_VT3253B0_AGC_FOR_RFMD2959 195 | |
15974dce | 779 | /* For RFMD2959 */ |
9e4c5c28 | 780 | static unsigned char byVT3253B0_AGC4_RFMD2959[CB_VT3253B0_AGC_FOR_RFMD2959][2] = { |
37529367 JP |
781 | {0xF0, 0x00}, |
782 | {0xF1, 0x3E}, | |
783 | {0xF0, 0x80}, | |
784 | {0xF0, 0x00}, | |
785 | {0xF1, 0x3E}, | |
786 | {0xF0, 0x81}, | |
787 | {0xF0, 0x01}, | |
788 | {0xF1, 0x3E}, | |
789 | {0xF0, 0x82}, | |
790 | {0xF0, 0x02}, | |
791 | {0xF1, 0x3E}, | |
792 | {0xF0, 0x83}, | |
793 | {0xF0, 0x03}, | |
794 | {0xF1, 0x3B}, | |
795 | {0xF0, 0x84}, | |
796 | {0xF0, 0x04}, | |
797 | {0xF1, 0x39}, | |
798 | {0xF0, 0x85}, | |
799 | {0xF0, 0x05}, | |
800 | {0xF1, 0x38}, | |
801 | {0xF0, 0x86}, | |
802 | {0xF0, 0x06}, | |
803 | {0xF1, 0x37}, | |
804 | {0xF0, 0x87}, | |
805 | {0xF0, 0x07}, | |
806 | {0xF1, 0x36}, | |
807 | {0xF0, 0x88}, | |
808 | {0xF0, 0x08}, | |
809 | {0xF1, 0x35}, | |
810 | {0xF0, 0x89}, | |
811 | {0xF0, 0x09}, | |
812 | {0xF1, 0x35}, | |
813 | {0xF0, 0x8A}, | |
814 | {0xF0, 0x0A}, | |
815 | {0xF1, 0x34}, | |
816 | {0xF0, 0x8B}, | |
817 | {0xF0, 0x0B}, | |
818 | {0xF1, 0x34}, | |
819 | {0xF0, 0x8C}, | |
820 | {0xF0, 0x0C}, | |
821 | {0xF1, 0x33}, | |
822 | {0xF0, 0x8D}, | |
823 | {0xF0, 0x0D}, | |
824 | {0xF1, 0x32}, | |
825 | {0xF0, 0x8E}, | |
826 | {0xF0, 0x0E}, | |
827 | {0xF1, 0x31}, | |
828 | {0xF0, 0x8F}, | |
829 | {0xF0, 0x0F}, | |
830 | {0xF1, 0x30}, | |
831 | {0xF0, 0x90}, | |
832 | {0xF0, 0x10}, | |
833 | {0xF1, 0x2F}, | |
834 | {0xF0, 0x91}, | |
835 | {0xF0, 0x11}, | |
836 | {0xF1, 0x2F}, | |
837 | {0xF0, 0x92}, | |
838 | {0xF0, 0x12}, | |
839 | {0xF1, 0x2E}, | |
840 | {0xF0, 0x93}, | |
841 | {0xF0, 0x13}, | |
842 | {0xF1, 0x2D}, | |
843 | {0xF0, 0x94}, | |
844 | {0xF0, 0x14}, | |
845 | {0xF1, 0x2C}, | |
846 | {0xF0, 0x95}, | |
847 | {0xF0, 0x15}, | |
848 | {0xF1, 0x2B}, | |
849 | {0xF0, 0x96}, | |
850 | {0xF0, 0x16}, | |
851 | {0xF1, 0x2B}, | |
852 | {0xF0, 0x97}, | |
853 | {0xF0, 0x17}, | |
854 | {0xF1, 0x2A}, | |
855 | {0xF0, 0x98}, | |
856 | {0xF0, 0x18}, | |
857 | {0xF1, 0x29}, | |
858 | {0xF0, 0x99}, | |
859 | {0xF0, 0x19}, | |
860 | {0xF1, 0x28}, | |
861 | {0xF0, 0x9A}, | |
862 | {0xF0, 0x1A}, | |
863 | {0xF1, 0x27}, | |
864 | {0xF0, 0x9B}, | |
865 | {0xF0, 0x1B}, | |
866 | {0xF1, 0x26}, | |
867 | {0xF0, 0x9C}, | |
868 | {0xF0, 0x1C}, | |
869 | {0xF1, 0x25}, | |
870 | {0xF0, 0x9D}, | |
871 | {0xF0, 0x1D}, | |
872 | {0xF1, 0x24}, | |
873 | {0xF0, 0x9E}, | |
874 | {0xF0, 0x1E}, | |
875 | {0xF1, 0x24}, | |
876 | {0xF0, 0x9F}, | |
877 | {0xF0, 0x1F}, | |
878 | {0xF1, 0x23}, | |
879 | {0xF0, 0xA0}, | |
880 | {0xF0, 0x20}, | |
881 | {0xF1, 0x22}, | |
882 | {0xF0, 0xA1}, | |
883 | {0xF0, 0x21}, | |
884 | {0xF1, 0x21}, | |
885 | {0xF0, 0xA2}, | |
886 | {0xF0, 0x22}, | |
887 | {0xF1, 0x20}, | |
888 | {0xF0, 0xA3}, | |
889 | {0xF0, 0x23}, | |
890 | {0xF1, 0x20}, | |
891 | {0xF0, 0xA4}, | |
892 | {0xF0, 0x24}, | |
893 | {0xF1, 0x1F}, | |
894 | {0xF0, 0xA5}, | |
895 | {0xF0, 0x25}, | |
896 | {0xF1, 0x1E}, | |
897 | {0xF0, 0xA6}, | |
898 | {0xF0, 0x26}, | |
899 | {0xF1, 0x1D}, | |
900 | {0xF0, 0xA7}, | |
901 | {0xF0, 0x27}, | |
902 | {0xF1, 0x1C}, | |
903 | {0xF0, 0xA8}, | |
904 | {0xF0, 0x28}, | |
905 | {0xF1, 0x1B}, | |
906 | {0xF0, 0xA9}, | |
907 | {0xF0, 0x29}, | |
908 | {0xF1, 0x1B}, | |
909 | {0xF0, 0xAA}, | |
910 | {0xF0, 0x2A}, | |
911 | {0xF1, 0x1A}, | |
912 | {0xF0, 0xAB}, | |
913 | {0xF0, 0x2B}, | |
914 | {0xF1, 0x1A}, | |
915 | {0xF0, 0xAC}, | |
916 | {0xF0, 0x2C}, | |
917 | {0xF1, 0x19}, | |
918 | {0xF0, 0xAD}, | |
919 | {0xF0, 0x2D}, | |
920 | {0xF1, 0x18}, | |
921 | {0xF0, 0xAE}, | |
922 | {0xF0, 0x2E}, | |
923 | {0xF1, 0x17}, | |
924 | {0xF0, 0xAF}, | |
925 | {0xF0, 0x2F}, | |
926 | {0xF1, 0x16}, | |
927 | {0xF0, 0xB0}, | |
928 | {0xF0, 0x30}, | |
929 | {0xF1, 0x15}, | |
930 | {0xF0, 0xB1}, | |
931 | {0xF0, 0x31}, | |
932 | {0xF1, 0x15}, | |
933 | {0xF0, 0xB2}, | |
934 | {0xF0, 0x32}, | |
935 | {0xF1, 0x15}, | |
936 | {0xF0, 0xB3}, | |
937 | {0xF0, 0x33}, | |
938 | {0xF1, 0x14}, | |
939 | {0xF0, 0xB4}, | |
940 | {0xF0, 0x34}, | |
941 | {0xF1, 0x13}, | |
942 | {0xF0, 0xB5}, | |
943 | {0xF0, 0x35}, | |
944 | {0xF1, 0x12}, | |
945 | {0xF0, 0xB6}, | |
946 | {0xF0, 0x36}, | |
947 | {0xF1, 0x11}, | |
948 | {0xF0, 0xB7}, | |
949 | {0xF0, 0x37}, | |
950 | {0xF1, 0x10}, | |
951 | {0xF0, 0xB8}, | |
952 | {0xF0, 0x38}, | |
953 | {0xF1, 0x0F}, | |
954 | {0xF0, 0xB9}, | |
955 | {0xF0, 0x39}, | |
956 | {0xF1, 0x0E}, | |
957 | {0xF0, 0xBA}, | |
958 | {0xF0, 0x3A}, | |
959 | {0xF1, 0x0D}, | |
960 | {0xF0, 0xBB}, | |
961 | {0xF0, 0x3B}, | |
962 | {0xF1, 0x0C}, | |
963 | {0xF0, 0xBC}, | |
964 | {0xF0, 0x3C}, | |
965 | {0xF1, 0x0B}, | |
966 | {0xF0, 0xBD}, | |
967 | {0xF0, 0x3D}, | |
968 | {0xF1, 0x0B}, | |
969 | {0xF0, 0xBE}, | |
970 | {0xF0, 0x3E}, | |
971 | {0xF1, 0x0A}, | |
972 | {0xF0, 0xBF}, | |
973 | {0xF0, 0x3F}, | |
974 | {0xF1, 0x09}, | |
975 | {0xF0, 0x00}, | |
5449c685 FB |
976 | }; |
977 | ||
978 | #define CB_VT3253B0_INIT_FOR_AIROHA2230 256 | |
15974dce | 979 | /* For AIROHA */ |
9e4c5c28 | 980 | static unsigned char byVT3253B0_AIROHA2230[CB_VT3253B0_INIT_FOR_AIROHA2230][2] = { |
37529367 JP |
981 | {0x00, 0x31}, |
982 | {0x01, 0x00}, | |
983 | {0x02, 0x00}, | |
984 | {0x03, 0x00}, | |
985 | {0x04, 0x00}, | |
986 | {0x05, 0x80}, | |
987 | {0x06, 0x00}, | |
988 | {0x07, 0x00}, | |
989 | {0x08, 0x70}, | |
990 | {0x09, 0x41}, | |
991 | {0x0a, 0x2A}, | |
992 | {0x0b, 0x76}, | |
993 | {0x0c, 0x00}, | |
994 | {0x0d, 0x00}, | |
995 | {0x0e, 0x80}, | |
996 | {0x0f, 0x00}, | |
997 | {0x10, 0x00}, | |
998 | {0x11, 0x00}, | |
999 | {0x12, 0x00}, | |
1000 | {0x13, 0x00}, | |
1001 | {0x14, 0x00}, | |
1002 | {0x15, 0x00}, | |
1003 | {0x16, 0x00}, | |
1004 | {0x17, 0x00}, | |
1005 | {0x18, 0x00}, | |
1006 | {0x19, 0x00}, | |
1007 | {0x1a, 0x00}, | |
1008 | {0x1b, 0x8f}, | |
1009 | {0x1c, 0x09}, | |
1010 | {0x1d, 0x00}, | |
1011 | {0x1e, 0x00}, | |
1012 | {0x1f, 0x00}, | |
1013 | {0x20, 0x00}, | |
1014 | {0x21, 0x00}, | |
1015 | {0x22, 0x00}, | |
1016 | {0x23, 0x00}, | |
1017 | {0x24, 0x00}, | |
1018 | {0x25, 0x4a}, | |
1019 | {0x26, 0x00}, | |
1020 | {0x27, 0x00}, | |
1021 | {0x28, 0x00}, | |
1022 | {0x29, 0x00}, | |
1023 | {0x2a, 0x00}, | |
1024 | {0x2b, 0x00}, | |
1025 | {0x2c, 0x00}, | |
1026 | {0x2d, 0x4a}, | |
1027 | {0x2e, 0x00}, | |
1028 | {0x2f, 0x0a}, | |
1029 | {0x30, 0x26}, | |
1030 | {0x31, 0x5b}, | |
1031 | {0x32, 0x00}, | |
1032 | {0x33, 0x00}, | |
1033 | {0x34, 0x00}, | |
1034 | {0x35, 0x00}, | |
1035 | {0x36, 0xaa}, | |
1036 | {0x37, 0xaa}, | |
1037 | {0x38, 0xff}, | |
1038 | {0x39, 0xff}, | |
1039 | {0x3a, 0x79}, | |
1040 | {0x3b, 0x00}, | |
1041 | {0x3c, 0x00}, | |
1042 | {0x3d, 0x0b}, | |
1043 | {0x3e, 0x48}, | |
1044 | {0x3f, 0x04}, | |
1045 | {0x40, 0x00}, | |
1046 | {0x41, 0x08}, | |
1047 | {0x42, 0x00}, | |
1048 | {0x43, 0x08}, | |
1049 | {0x44, 0x08}, | |
1050 | {0x45, 0x14}, | |
1051 | {0x46, 0x05}, | |
1052 | {0x47, 0x09}, | |
1053 | {0x48, 0x00}, | |
1054 | {0x49, 0x00}, | |
1055 | {0x4a, 0x00}, | |
1056 | {0x4b, 0x00}, | |
1057 | {0x4c, 0x09}, | |
1058 | {0x4d, 0x73}, | |
1059 | {0x4e, 0x00}, | |
1060 | {0x4f, 0xc5}, | |
1061 | {0x50, 0x15}, | |
1062 | {0x51, 0x19}, | |
1063 | {0x52, 0x00}, | |
1064 | {0x53, 0x00}, | |
1065 | {0x54, 0x00}, | |
1066 | {0x55, 0x00}, | |
1067 | {0x56, 0x00}, | |
1068 | {0x57, 0x00}, | |
1069 | {0x58, 0x00}, | |
1070 | {0x59, 0xb0}, | |
1071 | {0x5a, 0x00}, | |
1072 | {0x5b, 0x00}, | |
1073 | {0x5c, 0x00}, | |
1074 | {0x5d, 0x00}, | |
1075 | {0x5e, 0x00}, | |
1076 | {0x5f, 0x00}, | |
1077 | {0x60, 0xe4}, | |
1078 | {0x61, 0x80}, | |
1079 | {0x62, 0x00}, | |
1080 | {0x63, 0x00}, | |
1081 | {0x64, 0x00}, | |
1082 | {0x65, 0x00}, | |
1083 | {0x66, 0x98}, | |
1084 | {0x67, 0x0a}, | |
1085 | {0x68, 0x00}, | |
1086 | {0x69, 0x00}, | |
1087 | {0x6a, 0x00}, | |
1088 | {0x6b, 0x00}, | |
15974dce | 1089 | {0x6c, 0x00}, /* RobertYu:20050125, request by JJSue */ |
37529367 JP |
1090 | {0x6d, 0x03}, |
1091 | {0x6e, 0x01}, | |
1092 | {0x6f, 0x00}, | |
1093 | {0x70, 0x00}, | |
1094 | {0x71, 0x00}, | |
1095 | {0x72, 0x00}, | |
1096 | {0x73, 0x00}, | |
1097 | {0x74, 0x00}, | |
1098 | {0x75, 0x00}, | |
1099 | {0x76, 0x00}, | |
1100 | {0x77, 0x00}, | |
1101 | {0x78, 0x00}, | |
1102 | {0x79, 0x00}, | |
1103 | {0x7a, 0x00}, | |
1104 | {0x7b, 0x00}, | |
1105 | {0x7c, 0x00}, | |
1106 | {0x7d, 0x00}, | |
1107 | {0x7e, 0x00}, | |
1108 | {0x7f, 0x00}, | |
1109 | {0x80, 0x8c}, | |
1110 | {0x81, 0x01}, | |
1111 | {0x82, 0x09}, | |
1112 | {0x83, 0x00}, | |
1113 | {0x84, 0x00}, | |
1114 | {0x85, 0x00}, | |
1115 | {0x86, 0x00}, | |
1116 | {0x87, 0x00}, | |
1117 | {0x88, 0x08}, | |
1118 | {0x89, 0x00}, | |
1119 | {0x8a, 0x0f}, | |
1120 | {0x8b, 0xb7}, | |
1121 | {0x8c, 0x88}, | |
1122 | {0x8d, 0x47}, | |
1123 | {0x8e, 0xaa}, | |
1124 | {0x8f, 0x02}, | |
1125 | {0x90, 0x22}, | |
1126 | {0x91, 0x00}, | |
1127 | {0x92, 0x00}, | |
1128 | {0x93, 0x00}, | |
1129 | {0x94, 0x00}, | |
1130 | {0x95, 0x00}, | |
1131 | {0x96, 0x00}, | |
1132 | {0x97, 0xeb}, | |
1133 | {0x98, 0x00}, | |
1134 | {0x99, 0x00}, | |
1135 | {0x9a, 0x00}, | |
1136 | {0x9b, 0x00}, | |
1137 | {0x9c, 0x00}, | |
1138 | {0x9d, 0x00}, | |
1139 | {0x9e, 0x00}, | |
1140 | {0x9f, 0x01}, | |
1141 | {0xa0, 0x00}, | |
1142 | {0xa1, 0x00}, | |
1143 | {0xa2, 0x00}, | |
1144 | {0xa3, 0x00}, | |
1145 | {0xa4, 0x00}, | |
1146 | {0xa5, 0x00}, | |
1147 | {0xa6, 0x10}, | |
1148 | {0xa7, 0x00}, | |
1149 | {0xa8, 0x18}, | |
1150 | {0xa9, 0x00}, | |
1151 | {0xaa, 0x00}, | |
1152 | {0xab, 0x00}, | |
1153 | {0xac, 0x00}, | |
1154 | {0xad, 0x00}, | |
1155 | {0xae, 0x00}, | |
1156 | {0xaf, 0x18}, | |
1157 | {0xb0, 0x38}, | |
1158 | {0xb1, 0x30}, | |
1159 | {0xb2, 0x00}, | |
1160 | {0xb3, 0x00}, | |
1161 | {0xb4, 0xff}, | |
1162 | {0xb5, 0x0f}, | |
1163 | {0xb6, 0xe4}, | |
1164 | {0xb7, 0xe2}, | |
1165 | {0xb8, 0x00}, | |
1166 | {0xb9, 0x00}, | |
1167 | {0xba, 0x00}, | |
1168 | {0xbb, 0x03}, | |
1169 | {0xbc, 0x01}, | |
1170 | {0xbd, 0x00}, | |
1171 | {0xbe, 0x00}, | |
1172 | {0xbf, 0x00}, | |
1173 | {0xc0, 0x18}, | |
1174 | {0xc1, 0x20}, | |
1175 | {0xc2, 0x07}, | |
1176 | {0xc3, 0x18}, | |
1177 | {0xc4, 0xff}, | |
1178 | {0xc5, 0x2c}, | |
1179 | {0xc6, 0x0c}, | |
1180 | {0xc7, 0x0a}, | |
1181 | {0xc8, 0x0e}, | |
1182 | {0xc9, 0x01}, | |
1183 | {0xca, 0x68}, | |
1184 | {0xcb, 0xa7}, | |
1185 | {0xcc, 0x3c}, | |
1186 | {0xcd, 0x10}, | |
1187 | {0xce, 0x00}, | |
1188 | {0xcf, 0x25}, | |
1189 | {0xd0, 0x40}, | |
1190 | {0xd1, 0x12}, | |
1191 | {0xd2, 0x00}, | |
1192 | {0xd3, 0x00}, | |
1193 | {0xd4, 0x10}, | |
1194 | {0xd5, 0x28}, | |
1195 | {0xd6, 0x80}, | |
1196 | {0xd7, 0x2A}, | |
1197 | {0xd8, 0x00}, | |
1198 | {0xd9, 0x00}, | |
1199 | {0xda, 0x00}, | |
1200 | {0xdb, 0x00}, | |
1201 | {0xdc, 0x00}, | |
1202 | {0xdd, 0x00}, | |
1203 | {0xde, 0x00}, | |
1204 | {0xdf, 0x00}, | |
1205 | {0xe0, 0x00}, | |
1206 | {0xe1, 0xB3}, | |
1207 | {0xe2, 0x00}, | |
1208 | {0xe3, 0x00}, | |
1209 | {0xe4, 0x00}, | |
1210 | {0xe5, 0x10}, | |
1211 | {0xe6, 0x00}, | |
1212 | {0xe7, 0x1C}, | |
1213 | {0xe8, 0x00}, | |
1214 | {0xe9, 0xf4}, | |
1215 | {0xea, 0x00}, | |
1216 | {0xeb, 0xff}, | |
1217 | {0xec, 0x79}, | |
1218 | {0xed, 0x20}, | |
1219 | {0xee, 0x30}, | |
1220 | {0xef, 0x01}, | |
1221 | {0xf0, 0x00}, | |
1222 | {0xf1, 0x3e}, | |
1223 | {0xf2, 0x00}, | |
1224 | {0xf3, 0x00}, | |
1225 | {0xf4, 0x00}, | |
1226 | {0xf5, 0x00}, | |
1227 | {0xf6, 0x00}, | |
1228 | {0xf7, 0x00}, | |
1229 | {0xf8, 0x00}, | |
1230 | {0xf9, 0x00}, | |
1231 | {0xfa, 0x00}, | |
1232 | {0xfb, 0x00}, | |
1233 | {0xfc, 0x00}, | |
1234 | {0xfd, 0x00}, | |
1235 | {0xfe, 0x00}, | |
1236 | {0xff, 0x00}, | |
5449c685 FB |
1237 | }; |
1238 | ||
5449c685 | 1239 | #define CB_VT3253B0_INIT_FOR_UW2451 256 |
15974dce | 1240 | /* For UW2451 */ |
9e4c5c28 | 1241 | static unsigned char byVT3253B0_UW2451[CB_VT3253B0_INIT_FOR_UW2451][2] = { |
37529367 JP |
1242 | {0x00, 0x31}, |
1243 | {0x01, 0x00}, | |
1244 | {0x02, 0x00}, | |
1245 | {0x03, 0x00}, | |
1246 | {0x04, 0x00}, | |
1247 | {0x05, 0x81}, | |
1248 | {0x06, 0x00}, | |
1249 | {0x07, 0x00}, | |
1250 | {0x08, 0x38}, | |
1251 | {0x09, 0x45}, | |
1252 | {0x0a, 0x28}, | |
1253 | {0x0b, 0x76}, | |
1254 | {0x0c, 0x00}, | |
1255 | {0x0d, 0x00}, | |
1256 | {0x0e, 0x80}, | |
1257 | {0x0f, 0x00}, | |
1258 | {0x10, 0x00}, | |
1259 | {0x11, 0x00}, | |
1260 | {0x12, 0x00}, | |
1261 | {0x13, 0x00}, | |
1262 | {0x14, 0x00}, | |
1263 | {0x15, 0x00}, | |
1264 | {0x16, 0x00}, | |
1265 | {0x17, 0x00}, | |
1266 | {0x18, 0x00}, | |
1267 | {0x19, 0x00}, | |
1268 | {0x1a, 0x00}, | |
1269 | {0x1b, 0x8f}, | |
1270 | {0x1c, 0x0f}, | |
1271 | {0x1d, 0x00}, | |
1272 | {0x1e, 0x00}, | |
1273 | {0x1f, 0x00}, | |
1274 | {0x20, 0x00}, | |
1275 | {0x21, 0x00}, | |
1276 | {0x22, 0x00}, | |
1277 | {0x23, 0x00}, | |
1278 | {0x24, 0x00}, | |
1279 | {0x25, 0x4a}, | |
1280 | {0x26, 0x00}, | |
1281 | {0x27, 0x00}, | |
1282 | {0x28, 0x00}, | |
1283 | {0x29, 0x00}, | |
1284 | {0x2a, 0x00}, | |
1285 | {0x2b, 0x00}, | |
1286 | {0x2c, 0x00}, | |
1287 | {0x2d, 0x18}, | |
1288 | {0x2e, 0x00}, | |
1289 | {0x2f, 0x0a}, | |
1290 | {0x30, 0x26}, | |
1291 | {0x31, 0x5b}, | |
1292 | {0x32, 0x00}, | |
1293 | {0x33, 0x00}, | |
1294 | {0x34, 0x00}, | |
1295 | {0x35, 0x00}, | |
1296 | {0x36, 0xaa}, | |
1297 | {0x37, 0xaa}, | |
1298 | {0x38, 0xff}, | |
1299 | {0x39, 0xff}, | |
1300 | {0x3a, 0x00}, | |
1301 | {0x3b, 0x00}, | |
1302 | {0x3c, 0x00}, | |
1303 | {0x3d, 0x03}, | |
1304 | {0x3e, 0x1d}, | |
1305 | {0x3f, 0x04}, | |
1306 | {0x40, 0x00}, | |
1307 | {0x41, 0x08}, | |
1308 | {0x42, 0x00}, | |
1309 | {0x43, 0x08}, | |
1310 | {0x44, 0x08}, | |
1311 | {0x45, 0x14}, | |
1312 | {0x46, 0x05}, | |
1313 | {0x47, 0x09}, | |
1314 | {0x48, 0x00}, | |
1315 | {0x49, 0x00}, | |
1316 | {0x4a, 0x00}, | |
1317 | {0x4b, 0x00}, | |
1318 | {0x4c, 0x09}, | |
1319 | {0x4d, 0x90}, | |
1320 | {0x4e, 0x00}, | |
1321 | {0x4f, 0xc5}, | |
1322 | {0x50, 0x15}, | |
1323 | {0x51, 0x19}, | |
1324 | {0x52, 0x00}, | |
1325 | {0x53, 0x00}, | |
1326 | {0x54, 0x00}, | |
1327 | {0x55, 0x00}, | |
1328 | {0x56, 0x00}, | |
1329 | {0x57, 0x00}, | |
1330 | {0x58, 0x00}, | |
1331 | {0x59, 0xb0}, | |
1332 | {0x5a, 0x00}, | |
1333 | {0x5b, 0x00}, | |
1334 | {0x5c, 0x00}, | |
1335 | {0x5d, 0x00}, | |
1336 | {0x5e, 0x00}, | |
1337 | {0x5f, 0x00}, | |
1338 | {0x60, 0xb3}, | |
1339 | {0x61, 0x81}, | |
1340 | {0x62, 0x00}, | |
1341 | {0x63, 0x00}, | |
1342 | {0x64, 0x00}, | |
1343 | {0x65, 0x00}, | |
1344 | {0x66, 0x57}, | |
1345 | {0x67, 0x6c}, | |
1346 | {0x68, 0x00}, | |
1347 | {0x69, 0x00}, | |
1348 | {0x6a, 0x00}, | |
1349 | {0x6b, 0x00}, | |
15974dce | 1350 | {0x6c, 0x00}, /* RobertYu:20050125, request by JJSue */ |
37529367 JP |
1351 | {0x6d, 0x03}, |
1352 | {0x6e, 0x01}, | |
1353 | {0x6f, 0x00}, | |
1354 | {0x70, 0x00}, | |
1355 | {0x71, 0x00}, | |
1356 | {0x72, 0x00}, | |
1357 | {0x73, 0x00}, | |
1358 | {0x74, 0x00}, | |
1359 | {0x75, 0x00}, | |
1360 | {0x76, 0x00}, | |
1361 | {0x77, 0x00}, | |
1362 | {0x78, 0x00}, | |
1363 | {0x79, 0x00}, | |
1364 | {0x7a, 0x00}, | |
1365 | {0x7b, 0x00}, | |
1366 | {0x7c, 0x00}, | |
1367 | {0x7d, 0x00}, | |
1368 | {0x7e, 0x00}, | |
1369 | {0x7f, 0x00}, | |
1370 | {0x80, 0x8c}, | |
1371 | {0x81, 0x00}, | |
1372 | {0x82, 0x0e}, | |
1373 | {0x83, 0x00}, | |
1374 | {0x84, 0x00}, | |
1375 | {0x85, 0x00}, | |
1376 | {0x86, 0x00}, | |
1377 | {0x87, 0x00}, | |
1378 | {0x88, 0x08}, | |
1379 | {0x89, 0x00}, | |
1380 | {0x8a, 0x0e}, | |
1381 | {0x8b, 0xa7}, | |
1382 | {0x8c, 0x88}, | |
1383 | {0x8d, 0x47}, | |
1384 | {0x8e, 0xaa}, | |
1385 | {0x8f, 0x02}, | |
1386 | {0x90, 0x00}, | |
1387 | {0x91, 0x00}, | |
1388 | {0x92, 0x00}, | |
1389 | {0x93, 0x00}, | |
1390 | {0x94, 0x00}, | |
1391 | {0x95, 0x00}, | |
1392 | {0x96, 0x00}, | |
1393 | {0x97, 0xe3}, | |
1394 | {0x98, 0x00}, | |
1395 | {0x99, 0x00}, | |
1396 | {0x9a, 0x00}, | |
1397 | {0x9b, 0x00}, | |
1398 | {0x9c, 0x00}, | |
1399 | {0x9d, 0x00}, | |
1400 | {0x9e, 0x00}, | |
1401 | {0x9f, 0x00}, | |
1402 | {0xa0, 0x00}, | |
1403 | {0xa1, 0x00}, | |
1404 | {0xa2, 0x00}, | |
1405 | {0xa3, 0x00}, | |
1406 | {0xa4, 0x00}, | |
1407 | {0xa5, 0x00}, | |
1408 | {0xa6, 0x10}, | |
1409 | {0xa7, 0x00}, | |
1410 | {0xa8, 0x18}, | |
1411 | {0xa9, 0x00}, | |
1412 | {0xaa, 0x00}, | |
1413 | {0xab, 0x00}, | |
1414 | {0xac, 0x00}, | |
1415 | {0xad, 0x00}, | |
1416 | {0xae, 0x00}, | |
1417 | {0xaf, 0x18}, | |
1418 | {0xb0, 0x18}, | |
1419 | {0xb1, 0x30}, | |
1420 | {0xb2, 0x00}, | |
1421 | {0xb3, 0x00}, | |
1422 | {0xb4, 0x00}, | |
1423 | {0xb5, 0x00}, | |
1424 | {0xb6, 0x00}, | |
1425 | {0xb7, 0x00}, | |
1426 | {0xb8, 0x00}, | |
1427 | {0xb9, 0x00}, | |
1428 | {0xba, 0x00}, | |
1429 | {0xbb, 0x03}, | |
1430 | {0xbc, 0x01}, | |
1431 | {0xbd, 0x00}, | |
1432 | {0xbe, 0x00}, | |
1433 | {0xbf, 0x00}, | |
1434 | {0xc0, 0x10}, | |
1435 | {0xc1, 0x20}, | |
1436 | {0xc2, 0x00}, | |
1437 | {0xc3, 0x20}, | |
1438 | {0xc4, 0x00}, | |
1439 | {0xc5, 0x2c}, | |
1440 | {0xc6, 0x1c}, | |
1441 | {0xc7, 0x10}, | |
1442 | {0xc8, 0x10}, | |
1443 | {0xc9, 0x01}, | |
1444 | {0xca, 0x68}, | |
1445 | {0xcb, 0xa7}, | |
1446 | {0xcc, 0x3c}, | |
1447 | {0xcd, 0x09}, | |
1448 | {0xce, 0x00}, | |
1449 | {0xcf, 0x20}, | |
1450 | {0xd0, 0x40}, | |
1451 | {0xd1, 0x10}, | |
1452 | {0xd2, 0x00}, | |
1453 | {0xd3, 0x00}, | |
1454 | {0xd4, 0x20}, | |
1455 | {0xd5, 0x28}, | |
1456 | {0xd6, 0xa0}, | |
1457 | {0xd7, 0x2a}, | |
1458 | {0xd8, 0x00}, | |
1459 | {0xd9, 0x00}, | |
1460 | {0xda, 0x00}, | |
1461 | {0xdb, 0x00}, | |
1462 | {0xdc, 0x00}, | |
1463 | {0xdd, 0x00}, | |
1464 | {0xde, 0x00}, | |
1465 | {0xdf, 0x00}, | |
1466 | {0xe0, 0x00}, | |
1467 | {0xe1, 0xd3}, | |
1468 | {0xe2, 0xc0}, | |
1469 | {0xe3, 0x00}, | |
1470 | {0xe4, 0x00}, | |
1471 | {0xe5, 0x10}, | |
1472 | {0xe6, 0x00}, | |
1473 | {0xe7, 0x12}, | |
1474 | {0xe8, 0x12}, | |
1475 | {0xe9, 0x34}, | |
1476 | {0xea, 0x00}, | |
1477 | {0xeb, 0xff}, | |
1478 | {0xec, 0x79}, | |
1479 | {0xed, 0x20}, | |
1480 | {0xee, 0x30}, | |
1481 | {0xef, 0x01}, | |
1482 | {0xf0, 0x00}, | |
1483 | {0xf1, 0x3e}, | |
1484 | {0xf2, 0x00}, | |
1485 | {0xf3, 0x00}, | |
1486 | {0xf4, 0x00}, | |
1487 | {0xf5, 0x00}, | |
1488 | {0xf6, 0x00}, | |
1489 | {0xf7, 0x00}, | |
1490 | {0xf8, 0x00}, | |
1491 | {0xf9, 0x00}, | |
1492 | {0xfa, 0x00}, | |
1493 | {0xfb, 0x00}, | |
1494 | {0xfc, 0x00}, | |
1495 | {0xfd, 0x00}, | |
1496 | {0xfe, 0x00}, | |
1497 | {0xff, 0x00}, | |
5449c685 FB |
1498 | }; |
1499 | ||
1500 | #define CB_VT3253B0_AGC 193 | |
15974dce | 1501 | /* For AIROHA */ |
9e4c5c28 | 1502 | static unsigned char byVT3253B0_AGC[CB_VT3253B0_AGC][2] = { |
37529367 JP |
1503 | {0xF0, 0x00}, |
1504 | {0xF1, 0x00}, | |
1505 | {0xF0, 0x80}, | |
1506 | {0xF0, 0x01}, | |
1507 | {0xF1, 0x00}, | |
1508 | {0xF0, 0x81}, | |
1509 | {0xF0, 0x02}, | |
1510 | {0xF1, 0x02}, | |
1511 | {0xF0, 0x82}, | |
1512 | {0xF0, 0x03}, | |
1513 | {0xF1, 0x04}, | |
1514 | {0xF0, 0x83}, | |
1515 | {0xF0, 0x03}, | |
1516 | {0xF1, 0x04}, | |
1517 | {0xF0, 0x84}, | |
1518 | {0xF0, 0x04}, | |
1519 | {0xF1, 0x06}, | |
1520 | {0xF0, 0x85}, | |
1521 | {0xF0, 0x05}, | |
1522 | {0xF1, 0x06}, | |
1523 | {0xF0, 0x86}, | |
1524 | {0xF0, 0x06}, | |
1525 | {0xF1, 0x06}, | |
1526 | {0xF0, 0x87}, | |
1527 | {0xF0, 0x07}, | |
1528 | {0xF1, 0x08}, | |
1529 | {0xF0, 0x88}, | |
1530 | {0xF0, 0x08}, | |
1531 | {0xF1, 0x08}, | |
1532 | {0xF0, 0x89}, | |
1533 | {0xF0, 0x09}, | |
1534 | {0xF1, 0x0A}, | |
1535 | {0xF0, 0x8A}, | |
1536 | {0xF0, 0x0A}, | |
1537 | {0xF1, 0x0A}, | |
1538 | {0xF0, 0x8B}, | |
1539 | {0xF0, 0x0B}, | |
1540 | {0xF1, 0x0C}, | |
1541 | {0xF0, 0x8C}, | |
1542 | {0xF0, 0x0C}, | |
1543 | {0xF1, 0x0C}, | |
1544 | {0xF0, 0x8D}, | |
1545 | {0xF0, 0x0D}, | |
1546 | {0xF1, 0x0E}, | |
1547 | {0xF0, 0x8E}, | |
1548 | {0xF0, 0x0E}, | |
1549 | {0xF1, 0x0E}, | |
1550 | {0xF0, 0x8F}, | |
1551 | {0xF0, 0x0F}, | |
1552 | {0xF1, 0x10}, | |
1553 | {0xF0, 0x90}, | |
1554 | {0xF0, 0x10}, | |
1555 | {0xF1, 0x10}, | |
1556 | {0xF0, 0x91}, | |
1557 | {0xF0, 0x11}, | |
1558 | {0xF1, 0x12}, | |
1559 | {0xF0, 0x92}, | |
1560 | {0xF0, 0x12}, | |
1561 | {0xF1, 0x12}, | |
1562 | {0xF0, 0x93}, | |
1563 | {0xF0, 0x13}, | |
1564 | {0xF1, 0x14}, | |
1565 | {0xF0, 0x94}, | |
1566 | {0xF0, 0x14}, | |
1567 | {0xF1, 0x14}, | |
1568 | {0xF0, 0x95}, | |
1569 | {0xF0, 0x15}, | |
1570 | {0xF1, 0x16}, | |
1571 | {0xF0, 0x96}, | |
1572 | {0xF0, 0x16}, | |
1573 | {0xF1, 0x16}, | |
1574 | {0xF0, 0x97}, | |
1575 | {0xF0, 0x17}, | |
1576 | {0xF1, 0x18}, | |
1577 | {0xF0, 0x98}, | |
1578 | {0xF0, 0x18}, | |
1579 | {0xF1, 0x18}, | |
1580 | {0xF0, 0x99}, | |
1581 | {0xF0, 0x19}, | |
1582 | {0xF1, 0x1A}, | |
1583 | {0xF0, 0x9A}, | |
1584 | {0xF0, 0x1A}, | |
1585 | {0xF1, 0x1A}, | |
1586 | {0xF0, 0x9B}, | |
1587 | {0xF0, 0x1B}, | |
1588 | {0xF1, 0x1C}, | |
1589 | {0xF0, 0x9C}, | |
1590 | {0xF0, 0x1C}, | |
1591 | {0xF1, 0x1C}, | |
1592 | {0xF0, 0x9D}, | |
1593 | {0xF0, 0x1D}, | |
1594 | {0xF1, 0x1E}, | |
1595 | {0xF0, 0x9E}, | |
1596 | {0xF0, 0x1E}, | |
1597 | {0xF1, 0x1E}, | |
1598 | {0xF0, 0x9F}, | |
1599 | {0xF0, 0x1F}, | |
1600 | {0xF1, 0x20}, | |
1601 | {0xF0, 0xA0}, | |
1602 | {0xF0, 0x20}, | |
1603 | {0xF1, 0x20}, | |
1604 | {0xF0, 0xA1}, | |
1605 | {0xF0, 0x21}, | |
1606 | {0xF1, 0x22}, | |
1607 | {0xF0, 0xA2}, | |
1608 | {0xF0, 0x22}, | |
1609 | {0xF1, 0x22}, | |
1610 | {0xF0, 0xA3}, | |
1611 | {0xF0, 0x23}, | |
1612 | {0xF1, 0x24}, | |
1613 | {0xF0, 0xA4}, | |
1614 | {0xF0, 0x24}, | |
1615 | {0xF1, 0x24}, | |
1616 | {0xF0, 0xA5}, | |
1617 | {0xF0, 0x25}, | |
1618 | {0xF1, 0x26}, | |
1619 | {0xF0, 0xA6}, | |
1620 | {0xF0, 0x26}, | |
1621 | {0xF1, 0x26}, | |
1622 | {0xF0, 0xA7}, | |
1623 | {0xF0, 0x27}, | |
1624 | {0xF1, 0x28}, | |
1625 | {0xF0, 0xA8}, | |
1626 | {0xF0, 0x28}, | |
1627 | {0xF1, 0x28}, | |
1628 | {0xF0, 0xA9}, | |
1629 | {0xF0, 0x29}, | |
1630 | {0xF1, 0x2A}, | |
1631 | {0xF0, 0xAA}, | |
1632 | {0xF0, 0x2A}, | |
1633 | {0xF1, 0x2A}, | |
1634 | {0xF0, 0xAB}, | |
1635 | {0xF0, 0x2B}, | |
1636 | {0xF1, 0x2C}, | |
1637 | {0xF0, 0xAC}, | |
1638 | {0xF0, 0x2C}, | |
1639 | {0xF1, 0x2C}, | |
1640 | {0xF0, 0xAD}, | |
1641 | {0xF0, 0x2D}, | |
1642 | {0xF1, 0x2E}, | |
1643 | {0xF0, 0xAE}, | |
1644 | {0xF0, 0x2E}, | |
1645 | {0xF1, 0x2E}, | |
1646 | {0xF0, 0xAF}, | |
1647 | {0xF0, 0x2F}, | |
1648 | {0xF1, 0x30}, | |
1649 | {0xF0, 0xB0}, | |
1650 | {0xF0, 0x30}, | |
1651 | {0xF1, 0x30}, | |
1652 | {0xF0, 0xB1}, | |
1653 | {0xF0, 0x31}, | |
1654 | {0xF1, 0x32}, | |
1655 | {0xF0, 0xB2}, | |
1656 | {0xF0, 0x32}, | |
1657 | {0xF1, 0x32}, | |
1658 | {0xF0, 0xB3}, | |
1659 | {0xF0, 0x33}, | |
1660 | {0xF1, 0x34}, | |
1661 | {0xF0, 0xB4}, | |
1662 | {0xF0, 0x34}, | |
1663 | {0xF1, 0x34}, | |
1664 | {0xF0, 0xB5}, | |
1665 | {0xF0, 0x35}, | |
1666 | {0xF1, 0x36}, | |
1667 | {0xF0, 0xB6}, | |
1668 | {0xF0, 0x36}, | |
1669 | {0xF1, 0x36}, | |
1670 | {0xF0, 0xB7}, | |
1671 | {0xF0, 0x37}, | |
1672 | {0xF1, 0x38}, | |
1673 | {0xF0, 0xB8}, | |
1674 | {0xF0, 0x38}, | |
1675 | {0xF1, 0x38}, | |
1676 | {0xF0, 0xB9}, | |
1677 | {0xF0, 0x39}, | |
1678 | {0xF1, 0x3A}, | |
1679 | {0xF0, 0xBA}, | |
1680 | {0xF0, 0x3A}, | |
1681 | {0xF1, 0x3A}, | |
1682 | {0xF0, 0xBB}, | |
1683 | {0xF0, 0x3B}, | |
1684 | {0xF1, 0x3C}, | |
1685 | {0xF0, 0xBC}, | |
1686 | {0xF0, 0x3C}, | |
1687 | {0xF1, 0x3C}, | |
1688 | {0xF0, 0xBD}, | |
1689 | {0xF0, 0x3D}, | |
1690 | {0xF1, 0x3E}, | |
1691 | {0xF0, 0xBE}, | |
1692 | {0xF0, 0x3E}, | |
1693 | {0xF1, 0x3E}, | |
1694 | {0xF0, 0xBF}, | |
1695 | {0xF0, 0x00}, | |
5449c685 FB |
1696 | }; |
1697 | ||
78fc8484 TP |
1698 | static const unsigned short awcFrameTime[MAX_RATE] = { |
1699 | 10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216 | |
1700 | }; | |
5449c685 | 1701 | |
5449c685 FB |
1702 | /*--------------------- Export Variables --------------------------*/ |
1703 | /* | |
1704 | * Description: Calculate data frame transmitting time | |
1705 | * | |
1706 | * Parameters: | |
1707 | * In: | |
1708 | * byPreambleType - Preamble Type | |
1709 | * byPktType - PK_TYPE_11A, PK_TYPE_11B, PK_TYPE_11GB, PK_TYPE_11GA | |
1710 | * cbFrameLength - Baseband Type | |
1711 | * wRate - Tx Rate | |
1712 | * Out: | |
1713 | * | |
1714 | * Return Value: FrameTime | |
1715 | * | |
1716 | */ | |
b6e95cd5 | 1717 | unsigned int |
37529367 JP |
1718 | BBuGetFrameTime( |
1719 | unsigned char byPreambleType, | |
1720 | unsigned char byPktType, | |
1721 | unsigned int cbFrameLength, | |
1722 | unsigned short wRate | |
1723 | ) | |
5449c685 | 1724 | { |
37529367 JP |
1725 | unsigned int uFrameTime; |
1726 | unsigned int uPreamble; | |
1727 | unsigned int uTmp; | |
1728 | unsigned int uRateIdx = (unsigned int) wRate; | |
1729 | unsigned int uRate = 0; | |
1730 | ||
217ed3ab | 1731 | if (uRateIdx > RATE_54M) |
37529367 | 1732 | return 0; |
37529367 JP |
1733 | |
1734 | uRate = (unsigned int)awcFrameTime[uRateIdx]; | |
1735 | ||
15974dce JS |
1736 | if (uRateIdx <= 3) { /* CCK mode */ |
1737 | if (byPreambleType == 1) /* Short */ | |
37529367 | 1738 | uPreamble = 96; |
bc5cf656 | 1739 | else |
37529367 | 1740 | uPreamble = 192; |
bc5cf656 | 1741 | |
15974dce | 1742 | uFrameTime = (cbFrameLength * 80) / uRate; /* ????? */ |
37529367 | 1743 | uTmp = (uFrameTime * uRate) / 80; |
bc5cf656 | 1744 | if (cbFrameLength != uTmp) |
37529367 | 1745 | uFrameTime++; |
37529367 | 1746 | |
a4ef27ad | 1747 | return uPreamble + uFrameTime; |
14cd1df4 DU |
1748 | } |
1749 | uFrameTime = (cbFrameLength * 8 + 22) / uRate; /* ???????? */ | |
1750 | uTmp = ((uFrameTime * uRate) - 22) / 8; | |
1751 | if (cbFrameLength != uTmp) | |
1752 | uFrameTime++; | |
bc5cf656 | 1753 | |
14cd1df4 DU |
1754 | uFrameTime = uFrameTime * 4; /* ??????? */ |
1755 | if (byPktType != PK_TYPE_11A) | |
1756 | uFrameTime += 6; /* ?????? */ | |
bc5cf656 | 1757 | |
14cd1df4 | 1758 | return 20 + uFrameTime; /* ?????? */ |
5449c685 FB |
1759 | } |
1760 | ||
1761 | /* | |
7664ec86 | 1762 | * Description: Calculate Length, Service, and Signal fields of Phy for Tx |
5449c685 FB |
1763 | * |
1764 | * Parameters: | |
1765 | * In: | |
10c17445 MP |
1766 | * priv - Device Structure |
1767 | * frame_length - Tx Frame Length | |
1768 | * tx_rate - Tx Rate | |
5449c685 | 1769 | * Out: |
10c17445 MP |
1770 | * struct vnt_phy_field *phy |
1771 | * - pointer to Phy Length field | |
1772 | * - pointer to Phy Service field | |
1773 | * - pointer to Phy Signal field | |
5449c685 FB |
1774 | * |
1775 | * Return Value: none | |
1776 | * | |
1777 | */ | |
10c17445 MP |
1778 | void vnt_get_phy_field(struct vnt_private *priv, u32 frame_length, |
1779 | u16 tx_rate, u8 pkt_type, struct vnt_phy_field *phy) | |
1780 | { | |
1781 | u32 bit_count; | |
1782 | u32 count = 0; | |
1783 | u32 tmp; | |
1784 | int ext_bit; | |
1785 | u8 preamble_type = priv->byPreambleType; | |
1786 | ||
1787 | bit_count = frame_length * 8; | |
1788 | ext_bit = false; | |
1789 | ||
1790 | switch (tx_rate) { | |
1791 | case RATE_1M: | |
1792 | count = bit_count; | |
1793 | ||
1794 | phy->signal = 0x00; | |
1795 | ||
1796 | break; | |
1797 | case RATE_2M: | |
1798 | count = bit_count / 2; | |
1799 | ||
1800 | if (preamble_type == 1) | |
1801 | phy->signal = 0x09; | |
1802 | else | |
1803 | phy->signal = 0x01; | |
1804 | ||
1805 | break; | |
1806 | case RATE_5M: | |
1807 | count = (bit_count * 10) / 55; | |
1808 | tmp = (count * 55) / 10; | |
1809 | ||
1810 | if (tmp != bit_count) | |
1811 | count++; | |
1812 | ||
1813 | if (preamble_type == 1) | |
1814 | phy->signal = 0x0a; | |
1815 | else | |
1816 | phy->signal = 0x02; | |
1817 | ||
1818 | break; | |
1819 | case RATE_11M: | |
1820 | count = bit_count / 11; | |
1821 | tmp = count * 11; | |
1822 | ||
1823 | if (tmp != bit_count) { | |
1824 | count++; | |
1825 | ||
1826 | if ((bit_count - tmp) <= 3) | |
1827 | ext_bit = true; | |
1828 | } | |
1829 | ||
1830 | if (preamble_type == 1) | |
1831 | phy->signal = 0x0b; | |
1832 | else | |
1833 | phy->signal = 0x03; | |
1834 | ||
1835 | break; | |
1836 | case RATE_6M: | |
1837 | if (pkt_type == PK_TYPE_11A) | |
1838 | phy->signal = 0x9b; | |
1839 | else | |
1840 | phy->signal = 0x8b; | |
1841 | ||
1842 | break; | |
1843 | case RATE_9M: | |
1844 | if (pkt_type == PK_TYPE_11A) | |
1845 | phy->signal = 0x9f; | |
1846 | else | |
1847 | phy->signal = 0x8f; | |
1848 | ||
1849 | break; | |
1850 | case RATE_12M: | |
1851 | if (pkt_type == PK_TYPE_11A) | |
1852 | phy->signal = 0x9a; | |
1853 | else | |
1854 | phy->signal = 0x8a; | |
1855 | ||
1856 | break; | |
1857 | case RATE_18M: | |
1858 | if (pkt_type == PK_TYPE_11A) | |
1859 | phy->signal = 0x9e; | |
1860 | else | |
1861 | phy->signal = 0x8e; | |
1862 | ||
1863 | break; | |
1864 | case RATE_24M: | |
1865 | if (pkt_type == PK_TYPE_11A) | |
1866 | phy->signal = 0x99; | |
1867 | else | |
1868 | phy->signal = 0x89; | |
1869 | ||
1870 | break; | |
1871 | case RATE_36M: | |
1872 | if (pkt_type == PK_TYPE_11A) | |
1873 | phy->signal = 0x9d; | |
1874 | else | |
1875 | phy->signal = 0x8d; | |
1876 | ||
1877 | break; | |
1878 | case RATE_48M: | |
1879 | if (pkt_type == PK_TYPE_11A) | |
1880 | phy->signal = 0x98; | |
1881 | else | |
1882 | phy->signal = 0x88; | |
1883 | ||
1884 | break; | |
1885 | case RATE_54M: | |
1886 | if (pkt_type == PK_TYPE_11A) | |
1887 | phy->signal = 0x9c; | |
1888 | else | |
1889 | phy->signal = 0x8c; | |
1890 | break; | |
1891 | default: | |
1892 | if (pkt_type == PK_TYPE_11A) | |
1893 | phy->signal = 0x9c; | |
1894 | else | |
1895 | phy->signal = 0x8c; | |
1896 | break; | |
1897 | } | |
1898 | ||
1899 | if (pkt_type == PK_TYPE_11B) { | |
1900 | phy->service = 0x00; | |
1901 | if (ext_bit) | |
1902 | phy->service |= 0x80; | |
1903 | phy->len = cpu_to_le16((u16)count); | |
1904 | } else { | |
1905 | phy->service = 0x00; | |
1906 | phy->len = cpu_to_le16((u16)frame_length); | |
1907 | } | |
1908 | } | |
1909 | ||
5449c685 | 1910 | /* |
789d1aef | 1911 | * Description: Read a byte from BASEBAND, by embedded programming |
5449c685 FB |
1912 | * |
1913 | * Parameters: | |
1914 | * In: | |
1915 | * dwIoBase - I/O base address | |
1916 | * byBBAddr - address of register in Baseband | |
1917 | * Out: | |
1918 | * pbyData - data read | |
1919 | * | |
5a5a2a6a | 1920 | * Return Value: true if succeeded; false if failed. |
5449c685 FB |
1921 | * |
1922 | */ | |
8e8a9f51 MP |
1923 | bool BBbReadEmbedded(struct vnt_private *priv, |
1924 | unsigned char byBBAddr, unsigned char *pbyData) | |
5449c685 | 1925 | { |
8e8a9f51 | 1926 | void __iomem *dwIoBase = priv->PortOffset; |
37529367 JP |
1927 | unsigned short ww; |
1928 | unsigned char byValue; | |
1929 | ||
15974dce | 1930 | /* BB reg offset */ |
37529367 JP |
1931 | VNSvOutPortB(dwIoBase + MAC_REG_BBREGADR, byBBAddr); |
1932 | ||
15974dce | 1933 | /* turn on REGR */ |
37529367 | 1934 | MACvRegBitsOn(dwIoBase, MAC_REG_BBREGCTL, BBREGCTL_REGR); |
15974dce | 1935 | /* W_MAX_TIMEOUT is the timeout period */ |
37529367 JP |
1936 | for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { |
1937 | VNSvInPortB(dwIoBase + MAC_REG_BBREGCTL, &byValue); | |
1938 | if (byValue & BBREGCTL_DONE) | |
1939 | break; | |
1940 | } | |
1941 | ||
15974dce | 1942 | /* get BB data */ |
37529367 JP |
1943 | VNSvInPortB(dwIoBase + MAC_REG_BBREGDATA, pbyData); |
1944 | ||
1945 | if (ww == W_MAX_TIMEOUT) { | |
48caf5a0 | 1946 | pr_debug(" DBG_PORT80(0x30)\n"); |
37529367 JP |
1947 | return false; |
1948 | } | |
1949 | return true; | |
5449c685 FB |
1950 | } |
1951 | ||
5449c685 | 1952 | /* |
789d1aef | 1953 | * Description: Write a Byte to BASEBAND, by embedded programming |
5449c685 FB |
1954 | * |
1955 | * Parameters: | |
1956 | * In: | |
1957 | * dwIoBase - I/O base address | |
1958 | * byBBAddr - address of register in Baseband | |
1959 | * byData - data to write | |
1960 | * Out: | |
1961 | * none | |
1962 | * | |
5a5a2a6a | 1963 | * Return Value: true if succeeded; false if failed. |
5449c685 FB |
1964 | * |
1965 | */ | |
377f5bc0 MP |
1966 | bool BBbWriteEmbedded(struct vnt_private *priv, |
1967 | unsigned char byBBAddr, unsigned char byData) | |
5449c685 | 1968 | { |
377f5bc0 | 1969 | void __iomem *dwIoBase = priv->PortOffset; |
37529367 JP |
1970 | unsigned short ww; |
1971 | unsigned char byValue; | |
1972 | ||
15974dce | 1973 | /* BB reg offset */ |
37529367 | 1974 | VNSvOutPortB(dwIoBase + MAC_REG_BBREGADR, byBBAddr); |
15974dce | 1975 | /* set BB data */ |
37529367 JP |
1976 | VNSvOutPortB(dwIoBase + MAC_REG_BBREGDATA, byData); |
1977 | ||
15974dce | 1978 | /* turn on BBREGCTL_REGW */ |
37529367 | 1979 | MACvRegBitsOn(dwIoBase, MAC_REG_BBREGCTL, BBREGCTL_REGW); |
15974dce | 1980 | /* W_MAX_TIMEOUT is the timeout period */ |
37529367 JP |
1981 | for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { |
1982 | VNSvInPortB(dwIoBase + MAC_REG_BBREGCTL, &byValue); | |
1983 | if (byValue & BBREGCTL_DONE) | |
1984 | break; | |
1985 | } | |
1986 | ||
1987 | if (ww == W_MAX_TIMEOUT) { | |
48caf5a0 | 1988 | pr_debug(" DBG_PORT80(0x31)\n"); |
37529367 JP |
1989 | return false; |
1990 | } | |
1991 | return true; | |
5449c685 FB |
1992 | } |
1993 | ||
5449c685 FB |
1994 | /* |
1995 | * Description: VIA VT3253 Baseband chip init function | |
1996 | * | |
1997 | * Parameters: | |
1998 | * In: | |
1999 | * dwIoBase - I/O base address | |
2000 | * byRevId - Revision ID | |
2001 | * byRFType - RF type | |
2002 | * Out: | |
2003 | * none | |
2004 | * | |
5a5a2a6a | 2005 | * Return Value: true if succeeded; false if failed. |
5449c685 FB |
2006 | * |
2007 | */ | |
2008 | ||
8514408b | 2009 | bool BBbVT3253Init(struct vnt_private *priv) |
5449c685 | 2010 | { |
37529367 JP |
2011 | bool bResult = true; |
2012 | int ii; | |
8514408b MP |
2013 | void __iomem *dwIoBase = priv->PortOffset; |
2014 | unsigned char byRFType = priv->byRFType; | |
2015 | unsigned char byLocalID = priv->byLocalID; | |
37529367 JP |
2016 | |
2017 | if (byRFType == RF_RFMD2959) { | |
2018 | if (byLocalID <= REV_ID_VT3253_A1) { | |
bc5cf656 | 2019 | for (ii = 0; ii < CB_VT3253_INIT_FOR_RFMD; ii++) |
5b4ac54f HA |
2020 | bResult &= BBbWriteEmbedded(priv, |
2021 | byVT3253InitTab_RFMD[ii][0], | |
2022 | byVT3253InitTab_RFMD[ii][1]); | |
bc5cf656 | 2023 | |
37529367 | 2024 | } else { |
bc5cf656 | 2025 | for (ii = 0; ii < CB_VT3253B0_INIT_FOR_RFMD; ii++) |
5b4ac54f HA |
2026 | bResult &= BBbWriteEmbedded(priv, |
2027 | byVT3253B0_RFMD[ii][0], | |
2028 | byVT3253B0_RFMD[ii][1]); | |
bc5cf656 GM |
2029 | |
2030 | for (ii = 0; ii < CB_VT3253B0_AGC_FOR_RFMD2959; ii++) | |
5b4ac54f HA |
2031 | bResult &= BBbWriteEmbedded(priv, |
2032 | byVT3253B0_AGC4_RFMD2959[ii][0], | |
2033 | byVT3253B0_AGC4_RFMD2959[ii][1]); | |
bc5cf656 | 2034 | |
37529367 | 2035 | VNSvOutPortD(dwIoBase + MAC_REG_ITRTMSET, 0x23); |
837a38f7 | 2036 | MACvRegBitsOn(dwIoBase, MAC_REG_PAPEDELAY, BIT(0)); |
37529367 | 2037 | } |
8514408b MP |
2038 | priv->abyBBVGA[0] = 0x18; |
2039 | priv->abyBBVGA[1] = 0x0A; | |
2040 | priv->abyBBVGA[2] = 0x0; | |
2041 | priv->abyBBVGA[3] = 0x0; | |
2042 | priv->ldBmThreshold[0] = -70; | |
2043 | priv->ldBmThreshold[1] = -50; | |
2044 | priv->ldBmThreshold[2] = 0; | |
2045 | priv->ldBmThreshold[3] = 0; | |
37529367 | 2046 | } else if ((byRFType == RF_AIROHA) || (byRFType == RF_AL2230S)) { |
bc5cf656 | 2047 | for (ii = 0; ii < CB_VT3253B0_INIT_FOR_AIROHA2230; ii++) |
5b4ac54f HA |
2048 | bResult &= BBbWriteEmbedded(priv, |
2049 | byVT3253B0_AIROHA2230[ii][0], | |
2050 | byVT3253B0_AIROHA2230[ii][1]); | |
bc5cf656 GM |
2051 | |
2052 | for (ii = 0; ii < CB_VT3253B0_AGC; ii++) | |
5b4ac54f HA |
2053 | bResult &= BBbWriteEmbedded(priv, |
2054 | byVT3253B0_AGC[ii][0], byVT3253B0_AGC[ii][1]); | |
bc5cf656 | 2055 | |
8514408b MP |
2056 | priv->abyBBVGA[0] = 0x1C; |
2057 | priv->abyBBVGA[1] = 0x10; | |
2058 | priv->abyBBVGA[2] = 0x0; | |
2059 | priv->abyBBVGA[3] = 0x0; | |
2060 | priv->ldBmThreshold[0] = -70; | |
2061 | priv->ldBmThreshold[1] = -48; | |
2062 | priv->ldBmThreshold[2] = 0; | |
2063 | priv->ldBmThreshold[3] = 0; | |
37529367 | 2064 | } else if (byRFType == RF_UW2451) { |
bc5cf656 | 2065 | for (ii = 0; ii < CB_VT3253B0_INIT_FOR_UW2451; ii++) |
5b4ac54f HA |
2066 | bResult &= BBbWriteEmbedded(priv, |
2067 | byVT3253B0_UW2451[ii][0], | |
2068 | byVT3253B0_UW2451[ii][1]); | |
bc5cf656 GM |
2069 | |
2070 | for (ii = 0; ii < CB_VT3253B0_AGC; ii++) | |
5b4ac54f HA |
2071 | bResult &= BBbWriteEmbedded(priv, |
2072 | byVT3253B0_AGC[ii][0], | |
2073 | byVT3253B0_AGC[ii][1]); | |
bc5cf656 | 2074 | |
37529367 | 2075 | VNSvOutPortB(dwIoBase + MAC_REG_ITRTMSET, 0x23); |
837a38f7 | 2076 | MACvRegBitsOn(dwIoBase, MAC_REG_PAPEDELAY, BIT(0)); |
37529367 | 2077 | |
8514408b MP |
2078 | priv->abyBBVGA[0] = 0x14; |
2079 | priv->abyBBVGA[1] = 0x0A; | |
2080 | priv->abyBBVGA[2] = 0x0; | |
2081 | priv->abyBBVGA[3] = 0x0; | |
2082 | priv->ldBmThreshold[0] = -60; | |
2083 | priv->ldBmThreshold[1] = -50; | |
2084 | priv->ldBmThreshold[2] = 0; | |
2085 | priv->ldBmThreshold[3] = 0; | |
37529367 | 2086 | } else if (byRFType == RF_UW2452) { |
bc5cf656 | 2087 | for (ii = 0; ii < CB_VT3253B0_INIT_FOR_UW2451; ii++) |
5b4ac54f HA |
2088 | bResult &= BBbWriteEmbedded(priv, |
2089 | byVT3253B0_UW2451[ii][0], | |
2090 | byVT3253B0_UW2451[ii][1]); | |
bc5cf656 | 2091 | |
5f7a9424 AKB |
2092 | /* Init ANT B select, |
2093 | * TX Config CR09 = 0x61->0x45, | |
2094 | * 0x45->0x41(VC1/VC2 define, make the ANT_A, ANT_B inverted) | |
2095 | */ | |
2096 | ||
15974dce | 2097 | /*bResult &= BBbWriteEmbedded(dwIoBase,0x09,0x41);*/ |
5f7a9424 AKB |
2098 | |
2099 | /* Init ANT B select, | |
2100 | * RX Config CR10 = 0x28->0x2A, | |
2101 | * 0x2A->0x28(VC1/VC2 define, | |
2102 | * make the ANT_A, ANT_B inverted) | |
2103 | */ | |
2104 | ||
15974dce JS |
2105 | /*bResult &= BBbWriteEmbedded(dwIoBase,0x0a,0x28);*/ |
2106 | /* Select VC1/VC2, CR215 = 0x02->0x06 */ | |
377f5bc0 | 2107 | bResult &= BBbWriteEmbedded(priv, 0xd7, 0x06); |
37529367 | 2108 | |
15974dce | 2109 | /* {{RobertYu:20050125, request by Jack */ |
377f5bc0 MP |
2110 | bResult &= BBbWriteEmbedded(priv, 0x90, 0x20); |
2111 | bResult &= BBbWriteEmbedded(priv, 0x97, 0xeb); | |
15974dce | 2112 | /* }} */ |
37529367 | 2113 | |
15974dce | 2114 | /* {{RobertYu:20050221, request by Jack */ |
377f5bc0 MP |
2115 | bResult &= BBbWriteEmbedded(priv, 0xa6, 0x00); |
2116 | bResult &= BBbWriteEmbedded(priv, 0xa8, 0x30); | |
15974dce | 2117 | /* }} */ |
377f5bc0 | 2118 | bResult &= BBbWriteEmbedded(priv, 0xb0, 0x58); |
37529367 | 2119 | |
bc5cf656 | 2120 | for (ii = 0; ii < CB_VT3253B0_AGC; ii++) |
5b4ac54f HA |
2121 | bResult &= BBbWriteEmbedded(priv, |
2122 | byVT3253B0_AGC[ii][0], byVT3253B0_AGC[ii][1]); | |
37529367 | 2123 | |
8514408b MP |
2124 | priv->abyBBVGA[0] = 0x14; |
2125 | priv->abyBBVGA[1] = 0x0A; | |
2126 | priv->abyBBVGA[2] = 0x0; | |
2127 | priv->abyBBVGA[3] = 0x0; | |
2128 | priv->ldBmThreshold[0] = -60; | |
2129 | priv->ldBmThreshold[1] = -50; | |
2130 | priv->ldBmThreshold[2] = 0; | |
2131 | priv->ldBmThreshold[3] = 0; | |
15974dce | 2132 | /* }} RobertYu */ |
37529367 JP |
2133 | |
2134 | } else if (byRFType == RF_VT3226) { | |
bc5cf656 | 2135 | for (ii = 0; ii < CB_VT3253B0_INIT_FOR_AIROHA2230; ii++) |
5b4ac54f HA |
2136 | bResult &= BBbWriteEmbedded(priv, |
2137 | byVT3253B0_AIROHA2230[ii][0], | |
2138 | byVT3253B0_AIROHA2230[ii][1]); | |
bc5cf656 GM |
2139 | |
2140 | for (ii = 0; ii < CB_VT3253B0_AGC; ii++) | |
5b4ac54f HA |
2141 | bResult &= BBbWriteEmbedded(priv, |
2142 | byVT3253B0_AGC[ii][0], byVT3253B0_AGC[ii][1]); | |
bc5cf656 | 2143 | |
8514408b MP |
2144 | priv->abyBBVGA[0] = 0x1C; |
2145 | priv->abyBBVGA[1] = 0x10; | |
2146 | priv->abyBBVGA[2] = 0x0; | |
2147 | priv->abyBBVGA[3] = 0x0; | |
2148 | priv->ldBmThreshold[0] = -70; | |
2149 | priv->ldBmThreshold[1] = -48; | |
2150 | priv->ldBmThreshold[2] = 0; | |
2151 | priv->ldBmThreshold[3] = 0; | |
15974dce | 2152 | /* Fix VT3226 DFC system timing issue */ |
37529367 | 2153 | MACvSetRFLE_LatchBase(dwIoBase); |
15974dce | 2154 | /* {{ RobertYu: 20050104 */ |
37529367 | 2155 | } else if (byRFType == RF_AIROHA7230) { |
bc5cf656 | 2156 | for (ii = 0; ii < CB_VT3253B0_INIT_FOR_AIROHA2230; ii++) |
5b4ac54f HA |
2157 | bResult &= BBbWriteEmbedded(priv, |
2158 | byVT3253B0_AIROHA2230[ii][0], | |
2159 | byVT3253B0_AIROHA2230[ii][1]); | |
bc5cf656 | 2160 | |
37529367 | 2161 | |
15974dce JS |
2162 | /* {{ RobertYu:20050223, request by JerryChung */ |
2163 | /* Init ANT B select,TX Config CR09 = 0x61->0x45, 0x45->0x41(VC1/VC2 define, make the ANT_A, ANT_B inverted) */ | |
2164 | /*bResult &= BBbWriteEmbedded(dwIoBase,0x09,0x41);*/ | |
2165 | /* Init ANT B select,RX Config CR10 = 0x28->0x2A, 0x2A->0x28(VC1/VC2 define, make the ANT_A, ANT_B inverted) */ | |
2166 | /*bResult &= BBbWriteEmbedded(dwIoBase,0x0a,0x28);*/ | |
2167 | /* Select VC1/VC2, CR215 = 0x02->0x06 */ | |
a307d1d6 | 2168 | bResult &= BBbWriteEmbedded(priv, 0xd7, 0x06); |
15974dce | 2169 | /* }} */ |
37529367 | 2170 | |
bc5cf656 | 2171 | for (ii = 0; ii < CB_VT3253B0_AGC; ii++) |
5b4ac54f HA |
2172 | bResult &= BBbWriteEmbedded(priv, |
2173 | byVT3253B0_AGC[ii][0], byVT3253B0_AGC[ii][1]); | |
bc5cf656 | 2174 | |
8514408b MP |
2175 | priv->abyBBVGA[0] = 0x1C; |
2176 | priv->abyBBVGA[1] = 0x10; | |
2177 | priv->abyBBVGA[2] = 0x0; | |
2178 | priv->abyBBVGA[3] = 0x0; | |
2179 | priv->ldBmThreshold[0] = -70; | |
2180 | priv->ldBmThreshold[1] = -48; | |
2181 | priv->ldBmThreshold[2] = 0; | |
2182 | priv->ldBmThreshold[3] = 0; | |
15974dce | 2183 | /* }} RobertYu */ |
37529367 | 2184 | } else { |
15974dce | 2185 | /* No VGA Table now */ |
8514408b MP |
2186 | priv->bUpdateBBVGA = false; |
2187 | priv->abyBBVGA[0] = 0x1C; | |
37529367 JP |
2188 | } |
2189 | ||
2190 | if (byLocalID > REV_ID_VT3253_A1) { | |
377f5bc0 MP |
2191 | BBbWriteEmbedded(priv, 0x04, 0x7F); |
2192 | BBbWriteEmbedded(priv, 0x0D, 0x01); | |
37529367 JP |
2193 | } |
2194 | ||
2195 | return bResult; | |
5449c685 FB |
2196 | } |
2197 | ||
5449c685 FB |
2198 | /* |
2199 | * Description: Set ShortSlotTime mode | |
2200 | * | |
2201 | * Parameters: | |
2202 | * In: | |
8514408b | 2203 | * priv - Device Structure |
5449c685 FB |
2204 | * Out: |
2205 | * none | |
2206 | * | |
2207 | * Return Value: none | |
2208 | * | |
2209 | */ | |
6b35b7b3 | 2210 | void |
8514408b | 2211 | BBvSetShortSlotTime(struct vnt_private *priv) |
5449c685 | 2212 | { |
37529367 JP |
2213 | unsigned char byBBRxConf = 0; |
2214 | unsigned char byBBVGA = 0; | |
5449c685 | 2215 | |
8e8a9f51 | 2216 | BBbReadEmbedded(priv, 0x0A, &byBBRxConf); /* CR10 */ |
5449c685 | 2217 | |
8514408b | 2218 | if (priv->bShortSlotTime) |
15974dce | 2219 | byBBRxConf &= 0xDF; /* 1101 1111 */ |
bc5cf656 | 2220 | else |
15974dce | 2221 | byBBRxConf |= 0x20; /* 0010 0000 */ |
5449c685 | 2222 | |
15974dce | 2223 | /* patch for 3253B0 Baseband with Cardbus module */ |
8e8a9f51 | 2224 | BBbReadEmbedded(priv, 0xE7, &byBBVGA); |
8514408b | 2225 | if (byBBVGA == priv->abyBBVGA[0]) |
15974dce | 2226 | byBBRxConf |= 0x20; /* 0010 0000 */ |
5449c685 | 2227 | |
377f5bc0 | 2228 | BBbWriteEmbedded(priv, 0x0A, byBBRxConf); /* CR10 */ |
5449c685 FB |
2229 | } |
2230 | ||
8514408b | 2231 | void BBvSetVGAGainOffset(struct vnt_private *priv, unsigned char byData) |
5449c685 | 2232 | { |
37529367 JP |
2233 | unsigned char byBBRxConf = 0; |
2234 | ||
377f5bc0 | 2235 | BBbWriteEmbedded(priv, 0xE7, byData); |
37529367 | 2236 | |
8e8a9f51 | 2237 | BBbReadEmbedded(priv, 0x0A, &byBBRxConf); /* CR10 */ |
15974dce | 2238 | /* patch for 3253B0 Baseband with Cardbus module */ |
8514408b | 2239 | if (byData == priv->abyBBVGA[0]) |
15974dce | 2240 | byBBRxConf |= 0x20; /* 0010 0000 */ |
8514408b | 2241 | else if (priv->bShortSlotTime) |
15974dce | 2242 | byBBRxConf &= 0xDF; /* 1101 1111 */ |
5c36d5ae | 2243 | else |
15974dce | 2244 | byBBRxConf |= 0x20; /* 0010 0000 */ |
8514408b | 2245 | priv->byBBVGACurrent = byData; |
377f5bc0 | 2246 | BBbWriteEmbedded(priv, 0x0A, byBBRxConf); /* CR10 */ |
5449c685 FB |
2247 | } |
2248 | ||
5449c685 FB |
2249 | /* |
2250 | * Description: Baseband SoftwareReset | |
2251 | * | |
2252 | * Parameters: | |
2253 | * In: | |
2254 | * dwIoBase - I/O base address | |
2255 | * Out: | |
2256 | * none | |
2257 | * | |
2258 | * Return Value: none | |
2259 | * | |
2260 | */ | |
6b35b7b3 | 2261 | void |
a5f0eef3 | 2262 | BBvSoftwareReset(struct vnt_private *priv) |
5449c685 | 2263 | { |
377f5bc0 MP |
2264 | BBbWriteEmbedded(priv, 0x50, 0x40); |
2265 | BBbWriteEmbedded(priv, 0x50, 0); | |
2266 | BBbWriteEmbedded(priv, 0x9C, 0x01); | |
2267 | BBbWriteEmbedded(priv, 0x9C, 0); | |
5449c685 FB |
2268 | } |
2269 | ||
2270 | /* | |
2271 | * Description: Baseband Power Save Mode ON | |
2272 | * | |
2273 | * Parameters: | |
2274 | * In: | |
2275 | * dwIoBase - I/O base address | |
2276 | * Out: | |
2277 | * none | |
2278 | * | |
2279 | * Return Value: none | |
2280 | * | |
2281 | */ | |
6b35b7b3 | 2282 | void |
78b3c1fd | 2283 | BBvPowerSaveModeON(struct vnt_private *priv) |
5449c685 | 2284 | { |
37529367 | 2285 | unsigned char byOrgData; |
5449c685 | 2286 | |
8e8a9f51 | 2287 | BBbReadEmbedded(priv, 0x0D, &byOrgData); |
837a38f7 | 2288 | byOrgData |= BIT(0); |
377f5bc0 | 2289 | BBbWriteEmbedded(priv, 0x0D, byOrgData); |
5449c685 FB |
2290 | } |
2291 | ||
2292 | /* | |
2293 | * Description: Baseband Power Save Mode OFF | |
2294 | * | |
2295 | * Parameters: | |
2296 | * In: | |
2297 | * dwIoBase - I/O base address | |
2298 | * Out: | |
2299 | * none | |
2300 | * | |
2301 | * Return Value: none | |
2302 | * | |
2303 | */ | |
6b35b7b3 | 2304 | void |
78b3c1fd | 2305 | BBvPowerSaveModeOFF(struct vnt_private *priv) |
5449c685 | 2306 | { |
37529367 | 2307 | unsigned char byOrgData; |
5449c685 | 2308 | |
8e8a9f51 | 2309 | BBbReadEmbedded(priv, 0x0D, &byOrgData); |
837a38f7 | 2310 | byOrgData &= ~(BIT(0)); |
377f5bc0 | 2311 | BBbWriteEmbedded(priv, 0x0D, byOrgData); |
5449c685 FB |
2312 | } |
2313 | ||
2314 | /* | |
2315 | * Description: Set Tx Antenna mode | |
2316 | * | |
2317 | * Parameters: | |
2318 | * In: | |
8514408b | 2319 | * priv - Device Structure |
5449c685 FB |
2320 | * byAntennaMode - Antenna Mode |
2321 | * Out: | |
2322 | * none | |
2323 | * | |
2324 | * Return Value: none | |
2325 | * | |
2326 | */ | |
2327 | ||
6b35b7b3 | 2328 | void |
a5f0eef3 | 2329 | BBvSetTxAntennaMode(struct vnt_private *priv, unsigned char byAntennaMode) |
5449c685 | 2330 | { |
37529367 | 2331 | unsigned char byBBTxConf; |
5449c685 | 2332 | |
8e8a9f51 | 2333 | BBbReadEmbedded(priv, 0x09, &byBBTxConf); /* CR09 */ |
37529367 | 2334 | if (byAntennaMode == ANT_DIVERSITY) { |
15974dce | 2335 | /* bit 1 is diversity */ |
37529367 JP |
2336 | byBBTxConf |= 0x02; |
2337 | } else if (byAntennaMode == ANT_A) { | |
15974dce JS |
2338 | /* bit 2 is ANTSEL */ |
2339 | byBBTxConf &= 0xF9; /* 1111 1001 */ | |
37529367 | 2340 | } else if (byAntennaMode == ANT_B) { |
15974dce | 2341 | byBBTxConf &= 0xFD; /* 1111 1101 */ |
37529367 JP |
2342 | byBBTxConf |= 0x04; |
2343 | } | |
377f5bc0 | 2344 | BBbWriteEmbedded(priv, 0x09, byBBTxConf); /* CR09 */ |
5449c685 FB |
2345 | } |
2346 | ||
5449c685 FB |
2347 | /* |
2348 | * Description: Set Rx Antenna mode | |
2349 | * | |
2350 | * Parameters: | |
2351 | * In: | |
8514408b | 2352 | * priv - Device Structure |
5449c685 FB |
2353 | * byAntennaMode - Antenna Mode |
2354 | * Out: | |
2355 | * none | |
2356 | * | |
2357 | * Return Value: none | |
2358 | * | |
2359 | */ | |
2360 | ||
6b35b7b3 | 2361 | void |
a5f0eef3 | 2362 | BBvSetRxAntennaMode(struct vnt_private *priv, unsigned char byAntennaMode) |
5449c685 | 2363 | { |
37529367 JP |
2364 | unsigned char byBBRxConf; |
2365 | ||
8e8a9f51 | 2366 | BBbReadEmbedded(priv, 0x0A, &byBBRxConf); /* CR10 */ |
37529367 JP |
2367 | if (byAntennaMode == ANT_DIVERSITY) { |
2368 | byBBRxConf |= 0x01; | |
2369 | ||
2370 | } else if (byAntennaMode == ANT_A) { | |
15974dce | 2371 | byBBRxConf &= 0xFC; /* 1111 1100 */ |
37529367 | 2372 | } else if (byAntennaMode == ANT_B) { |
15974dce | 2373 | byBBRxConf &= 0xFE; /* 1111 1110 */ |
37529367 JP |
2374 | byBBRxConf |= 0x02; |
2375 | } | |
377f5bc0 | 2376 | BBbWriteEmbedded(priv, 0x0A, byBBRxConf); /* CR10 */ |
5449c685 FB |
2377 | } |
2378 | ||
5449c685 FB |
2379 | /* |
2380 | * Description: BBvSetDeepSleep | |
2381 | * | |
2382 | * Parameters: | |
2383 | * In: | |
8514408b | 2384 | * priv - Device Structure |
5449c685 FB |
2385 | * Out: |
2386 | * none | |
2387 | * | |
2388 | * Return Value: none | |
2389 | * | |
2390 | */ | |
6b35b7b3 | 2391 | void |
a5f0eef3 | 2392 | BBvSetDeepSleep(struct vnt_private *priv, unsigned char byLocalID) |
5449c685 | 2393 | { |
377f5bc0 MP |
2394 | BBbWriteEmbedded(priv, 0x0C, 0x17); /* CR12 */ |
2395 | BBbWriteEmbedded(priv, 0x0D, 0xB9); /* CR13 */ | |
5449c685 FB |
2396 | } |
2397 | ||
6b35b7b3 | 2398 | void |
a5f0eef3 | 2399 | BBvExitDeepSleep(struct vnt_private *priv, unsigned char byLocalID) |
5449c685 | 2400 | { |
377f5bc0 MP |
2401 | BBbWriteEmbedded(priv, 0x0C, 0x00); /* CR12 */ |
2402 | BBbWriteEmbedded(priv, 0x0D, 0x01); /* CR13 */ | |
5449c685 | 2403 | } |