diff options
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_rf_uw2453.c')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_rf_uw2453.c | 86 |
1 files changed, 44 insertions, 42 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c b/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c index ba0a0ccb1fa0..c4d324e19c24 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c +++ b/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c | |||
@@ -314,42 +314,44 @@ static int uw2453_init_hw(struct zd_rf *rf) | |||
314 | struct zd_chip *chip = zd_rf_to_chip(rf); | 314 | struct zd_chip *chip = zd_rf_to_chip(rf); |
315 | 315 | ||
316 | static const struct zd_ioreq16 ioreqs[] = { | 316 | static const struct zd_ioreq16 ioreqs[] = { |
317 | { CR10, 0x89 }, { CR15, 0x20 }, | 317 | { ZD_CR10, 0x89 }, { ZD_CR15, 0x20 }, |
318 | { CR17, 0x28 }, /* 6112 no change */ | 318 | { ZD_CR17, 0x28 }, /* 6112 no change */ |
319 | { CR23, 0x38 }, { CR24, 0x20 }, { CR26, 0x93 }, | 319 | { ZD_CR23, 0x38 }, { ZD_CR24, 0x20 }, { ZD_CR26, 0x93 }, |
320 | { CR27, 0x15 }, { CR28, 0x3e }, { CR29, 0x00 }, | 320 | { ZD_CR27, 0x15 }, { ZD_CR28, 0x3e }, { ZD_CR29, 0x00 }, |
321 | { CR33, 0x28 }, { CR34, 0x30 }, | 321 | { ZD_CR33, 0x28 }, { ZD_CR34, 0x30 }, |
322 | { CR35, 0x43 }, /* 6112 3e->43 */ | 322 | { ZD_CR35, 0x43 }, /* 6112 3e->43 */ |
323 | { CR41, 0x24 }, { CR44, 0x32 }, | 323 | { ZD_CR41, 0x24 }, { ZD_CR44, 0x32 }, |
324 | { CR46, 0x92 }, /* 6112 96->92 */ | 324 | { ZD_CR46, 0x92 }, /* 6112 96->92 */ |
325 | { CR47, 0x1e }, | 325 | { ZD_CR47, 0x1e }, |
326 | { CR48, 0x04 }, /* 5602 Roger */ | 326 | { ZD_CR48, 0x04 }, /* 5602 Roger */ |
327 | { CR49, 0xfa }, { CR79, 0x58 }, { CR80, 0x30 }, | 327 | { ZD_CR49, 0xfa }, { ZD_CR79, 0x58 }, { ZD_CR80, 0x30 }, |
328 | { CR81, 0x30 }, { CR87, 0x0a }, { CR89, 0x04 }, | 328 | { ZD_CR81, 0x30 }, { ZD_CR87, 0x0a }, { ZD_CR89, 0x04 }, |
329 | { CR91, 0x00 }, { CR92, 0x0a }, { CR98, 0x8d }, | 329 | { ZD_CR91, 0x00 }, { ZD_CR92, 0x0a }, { ZD_CR98, 0x8d }, |
330 | { CR99, 0x28 }, { CR100, 0x02 }, | 330 | { ZD_CR99, 0x28 }, { ZD_CR100, 0x02 }, |
331 | { CR101, 0x09 }, /* 6112 13->1f 6220 1f->13 6407 13->9 */ | 331 | { ZD_CR101, 0x09 }, /* 6112 13->1f 6220 1f->13 6407 13->9 */ |
332 | { CR102, 0x27 }, | 332 | { ZD_CR102, 0x27 }, |
333 | { CR106, 0x1c }, /* 5d07 5112 1f->1c 6220 1c->1f 6221 1f->1c */ | 333 | { ZD_CR106, 0x1c }, /* 5d07 5112 1f->1c 6220 1c->1f |
334 | { CR107, 0x1c }, /* 6220 1c->1a 5221 1a->1c */ | 334 | * 6221 1f->1c |
335 | { CR109, 0x13 }, | 335 | */ |
336 | { CR110, 0x1f }, /* 6112 13->1f 6221 1f->13 6407 13->0x09 */ | 336 | { ZD_CR107, 0x1c }, /* 6220 1c->1a 5221 1a->1c */ |
337 | { CR111, 0x13 }, { CR112, 0x1f }, { CR113, 0x27 }, | 337 | { ZD_CR109, 0x13 }, |
338 | { CR114, 0x23 }, /* 6221 27->23 */ | 338 | { ZD_CR110, 0x1f }, /* 6112 13->1f 6221 1f->13 6407 13->0x09 */ |
339 | { CR115, 0x24 }, /* 6112 24->1c 6220 1c->24 */ | 339 | { ZD_CR111, 0x13 }, { ZD_CR112, 0x1f }, { ZD_CR113, 0x27 }, |
340 | { CR116, 0x24 }, /* 6220 1c->24 */ | 340 | { ZD_CR114, 0x23 }, /* 6221 27->23 */ |
341 | { CR117, 0xfa }, /* 6112 fa->f8 6220 f8->f4 6220 f4->fa */ | 341 | { ZD_CR115, 0x24 }, /* 6112 24->1c 6220 1c->24 */ |
342 | { CR118, 0xf0 }, /* 5d07 6112 f0->f2 6220 f2->f0 */ | 342 | { ZD_CR116, 0x24 }, /* 6220 1c->24 */ |
343 | { CR119, 0x1a }, /* 6112 1a->10 6220 10->14 6220 14->1a */ | 343 | { ZD_CR117, 0xfa }, /* 6112 fa->f8 6220 f8->f4 6220 f4->fa */ |
344 | { CR120, 0x4f }, | 344 | { ZD_CR118, 0xf0 }, /* 5d07 6112 f0->f2 6220 f2->f0 */ |
345 | { CR121, 0x1f }, /* 6220 4f->1f */ | 345 | { ZD_CR119, 0x1a }, /* 6112 1a->10 6220 10->14 6220 14->1a */ |
346 | { CR122, 0xf0 }, { CR123, 0x57 }, { CR125, 0xad }, | 346 | { ZD_CR120, 0x4f }, |
347 | { CR126, 0x6c }, { CR127, 0x03 }, | 347 | { ZD_CR121, 0x1f }, /* 6220 4f->1f */ |
348 | { CR128, 0x14 }, /* 6302 12->11 */ | 348 | { ZD_CR122, 0xf0 }, { ZD_CR123, 0x57 }, { ZD_CR125, 0xad }, |
349 | { CR129, 0x12 }, /* 6301 10->0f */ | 349 | { ZD_CR126, 0x6c }, { ZD_CR127, 0x03 }, |
350 | { CR130, 0x10 }, { CR137, 0x50 }, { CR138, 0xa8 }, | 350 | { ZD_CR128, 0x14 }, /* 6302 12->11 */ |
351 | { CR144, 0xac }, { CR146, 0x20 }, { CR252, 0xff }, | 351 | { ZD_CR129, 0x12 }, /* 6301 10->0f */ |
352 | { CR253, 0xff }, | 352 | { ZD_CR130, 0x10 }, { ZD_CR137, 0x50 }, { ZD_CR138, 0xa8 }, |
353 | { ZD_CR144, 0xac }, { ZD_CR146, 0x20 }, { ZD_CR252, 0xff }, | ||
354 | { ZD_CR253, 0xff }, | ||
353 | }; | 355 | }; |
354 | 356 | ||
355 | static const u32 rv[] = { | 357 | static const u32 rv[] = { |
@@ -433,7 +435,7 @@ static int uw2453_init_hw(struct zd_rf *rf) | |||
433 | * the one that produced a lock. */ | 435 | * the one that produced a lock. */ |
434 | UW2453_PRIV(rf)->config = found_config + 1; | 436 | UW2453_PRIV(rf)->config = found_config + 1; |
435 | 437 | ||
436 | return zd_iowrite16_locked(chip, 0x06, CR203); | 438 | return zd_iowrite16_locked(chip, 0x06, ZD_CR203); |
437 | } | 439 | } |
438 | 440 | ||
439 | static int uw2453_set_channel(struct zd_rf *rf, u8 channel) | 441 | static int uw2453_set_channel(struct zd_rf *rf, u8 channel) |
@@ -445,8 +447,8 @@ static int uw2453_set_channel(struct zd_rf *rf, u8 channel) | |||
445 | struct zd_chip *chip = zd_rf_to_chip(rf); | 447 | struct zd_chip *chip = zd_rf_to_chip(rf); |
446 | 448 | ||
447 | static const struct zd_ioreq16 ioreqs[] = { | 449 | static const struct zd_ioreq16 ioreqs[] = { |
448 | { CR80, 0x30 }, { CR81, 0x30 }, { CR79, 0x58 }, | 450 | { ZD_CR80, 0x30 }, { ZD_CR81, 0x30 }, { ZD_CR79, 0x58 }, |
449 | { CR12, 0xf0 }, { CR77, 0x1b }, { CR78, 0x58 }, | 451 | { ZD_CR12, 0xf0 }, { ZD_CR77, 0x1b }, { ZD_CR78, 0x58 }, |
450 | }; | 452 | }; |
451 | 453 | ||
452 | r = uw2453_synth_set_channel(chip, channel, autocal); | 454 | r = uw2453_synth_set_channel(chip, channel, autocal); |
@@ -474,7 +476,7 @@ static int uw2453_set_channel(struct zd_rf *rf, u8 channel) | |||
474 | if (r) | 476 | if (r) |
475 | return r; | 477 | return r; |
476 | 478 | ||
477 | return zd_iowrite16_locked(chip, 0x06, CR203); | 479 | return zd_iowrite16_locked(chip, 0x06, ZD_CR203); |
478 | } | 480 | } |
479 | 481 | ||
480 | static int uw2453_switch_radio_on(struct zd_rf *rf) | 482 | static int uw2453_switch_radio_on(struct zd_rf *rf) |
@@ -482,7 +484,7 @@ static int uw2453_switch_radio_on(struct zd_rf *rf) | |||
482 | int r; | 484 | int r; |
483 | struct zd_chip *chip = zd_rf_to_chip(rf); | 485 | struct zd_chip *chip = zd_rf_to_chip(rf); |
484 | struct zd_ioreq16 ioreqs[] = { | 486 | struct zd_ioreq16 ioreqs[] = { |
485 | { CR11, 0x00 }, { CR251, 0x3f }, | 487 | { ZD_CR11, 0x00 }, { ZD_CR251, 0x3f }, |
486 | }; | 488 | }; |
487 | 489 | ||
488 | /* enter RXTX mode */ | 490 | /* enter RXTX mode */ |
@@ -501,7 +503,7 @@ static int uw2453_switch_radio_off(struct zd_rf *rf) | |||
501 | int r; | 503 | int r; |
502 | struct zd_chip *chip = zd_rf_to_chip(rf); | 504 | struct zd_chip *chip = zd_rf_to_chip(rf); |
503 | static const struct zd_ioreq16 ioreqs[] = { | 505 | static const struct zd_ioreq16 ioreqs[] = { |
504 | { CR11, 0x04 }, { CR251, 0x2f }, | 506 | { ZD_CR11, 0x04 }, { ZD_CR251, 0x2f }, |
505 | }; | 507 | }; |
506 | 508 | ||
507 | /* enter IDLE mode */ | 509 | /* enter IDLE mode */ |