diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/rfgain.h')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/rfgain.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/rfgain.h b/drivers/net/wireless/ath/ath5k/rfgain.h index ebfae052d89e..4d21df0e5975 100644 --- a/drivers/net/wireless/ath/ath5k/rfgain.h +++ b/drivers/net/wireless/ath/ath5k/rfgain.h | |||
@@ -18,13 +18,17 @@ | |||
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | 20 | ||
21 | /* | 21 | /** |
22 | * struct ath5k_ini_rfgain - RF Gain table | ||
23 | * @rfg_register: RF Gain register address | ||
24 | * @rfg_value: Register value for 5 and 2GHz | ||
25 | * | ||
22 | * Mode-specific RF Gain table (64bytes) for RF5111/5112 | 26 | * Mode-specific RF Gain table (64bytes) for RF5111/5112 |
23 | * (RF5110 only comes with AR5210 and only supports a/turbo a mode so initial | 27 | * (RF5110 only comes with AR5210 and only supports a/turbo a mode so initial |
24 | * RF Gain values are included in AR5K_AR5210_INI) | 28 | * RF Gain values are included in AR5K_AR5210_INI) |
25 | */ | 29 | */ |
26 | struct ath5k_ini_rfgain { | 30 | struct ath5k_ini_rfgain { |
27 | u16 rfg_register; /* RF Gain register address */ | 31 | u16 rfg_register; |
28 | u32 rfg_value[2]; /* [freq (see below)] */ | 32 | u32 rfg_value[2]; /* [freq (see below)] */ |
29 | }; | 33 | }; |
30 | 34 | ||
@@ -455,18 +459,31 @@ static const struct ath5k_ini_rfgain rfgain_2425[] = { | |||
455 | #define AR5K_GAIN_CHECK_ADJUST(_g) \ | 459 | #define AR5K_GAIN_CHECK_ADJUST(_g) \ |
456 | ((_g)->g_current <= (_g)->g_low || (_g)->g_current >= (_g)->g_high) | 460 | ((_g)->g_current <= (_g)->g_low || (_g)->g_current >= (_g)->g_high) |
457 | 461 | ||
462 | /** | ||
463 | * struct ath5k_gain_opt_step - An RF gain optimization step | ||
464 | * @gos_param: Set of parameters | ||
465 | * @gos_gain: Gain | ||
466 | */ | ||
458 | struct ath5k_gain_opt_step { | 467 | struct ath5k_gain_opt_step { |
459 | s8 gos_param[AR5K_GAIN_CRN_MAX_FIX_BITS]; | 468 | s8 gos_param[AR5K_GAIN_CRN_MAX_FIX_BITS]; |
460 | s8 gos_gain; | 469 | s8 gos_gain; |
461 | }; | 470 | }; |
462 | 471 | ||
472 | /** | ||
473 | * struct ath5k_gain_opt - RF Gain optimization ladder | ||
474 | * @go_default: The default step | ||
475 | * @go_steps_count: How many optimization steps | ||
476 | * @go_step: Array of &struct ath5k_gain_opt_step | ||
477 | */ | ||
463 | struct ath5k_gain_opt { | 478 | struct ath5k_gain_opt { |
464 | u8 go_default; | 479 | u8 go_default; |
465 | u8 go_steps_count; | 480 | u8 go_steps_count; |
466 | const struct ath5k_gain_opt_step go_step[AR5K_GAIN_STEP_COUNT]; | 481 | const struct ath5k_gain_opt_step go_step[AR5K_GAIN_STEP_COUNT]; |
467 | }; | 482 | }; |
468 | 483 | ||
484 | |||
469 | /* | 485 | /* |
486 | * RF5111 | ||
470 | * Parameters on gos_param: | 487 | * Parameters on gos_param: |
471 | * 1) Tx clip PHY register | 488 | * 1) Tx clip PHY register |
472 | * 2) PWD 90 RF register | 489 | * 2) PWD 90 RF register |
@@ -490,6 +507,7 @@ static const struct ath5k_gain_opt rfgain_opt_5111 = { | |||
490 | }; | 507 | }; |
491 | 508 | ||
492 | /* | 509 | /* |
510 | * RF5112 | ||
493 | * Parameters on gos_param: | 511 | * Parameters on gos_param: |
494 | * 1) Mixgain ovr RF register | 512 | * 1) Mixgain ovr RF register |
495 | * 2) PWD 138 RF register | 513 | * 2) PWD 138 RF register |