aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/rfgain.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath5k/rfgain.h')
-rw-r--r--drivers/net/wireless/ath5k/rfgain.h40
1 files changed, 38 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath5k/rfgain.h b/drivers/net/wireless/ath5k/rfgain.h
index 6dd2ea13ff41..1354d8c392c8 100644
--- a/drivers/net/wireless/ath5k/rfgain.h
+++ b/drivers/net/wireless/ath5k/rfgain.h
@@ -441,12 +441,38 @@ static const struct ath5k_ini_rfgain rfgain_2425[] = {
441 { AR5K_RF_GAIN(63), { 0x00000000, 0x000000f9 } }, 441 { AR5K_RF_GAIN(63), { 0x00000000, 0x000000f9 } },
442}; 442};
443 443
444#define AR5K_GAIN_CRN_FIX_BITS_5111 4
445#define AR5K_GAIN_CRN_FIX_BITS_5112 7
446#define AR5K_GAIN_CRN_MAX_FIX_BITS AR5K_GAIN_CRN_FIX_BITS_5112
447#define AR5K_GAIN_DYN_ADJUST_HI_MARGIN 15
448#define AR5K_GAIN_DYN_ADJUST_LO_MARGIN 20
449#define AR5K_GAIN_CCK_PROBE_CORR 5
450#define AR5K_GAIN_CCK_OFDM_GAIN_DELTA 15
451#define AR5K_GAIN_STEP_COUNT 10
452
453/* Check if our current measurement is inside our
454 * current variable attenuation window */
455#define AR5K_GAIN_CHECK_ADJUST(_g) \
456 ((_g)->g_current <= (_g)->g_low || (_g)->g_current >= (_g)->g_high)
457
458struct ath5k_gain_opt_step {
459 s8 gos_param[AR5K_GAIN_CRN_MAX_FIX_BITS];
460 s8 gos_gain;
461};
462
444struct ath5k_gain_opt { 463struct ath5k_gain_opt {
445 u32 go_default; 464 u8 go_default;
446 u32 go_steps_count; 465 u8 go_steps_count;
447 const struct ath5k_gain_opt_step go_step[AR5K_GAIN_STEP_COUNT]; 466 const struct ath5k_gain_opt_step go_step[AR5K_GAIN_STEP_COUNT];
448}; 467};
449 468
469/*
470 * Parameters on gos_param:
471 * 1) Tx clip PHY register
472 * 2) PWD 90 RF register
473 * 3) PWD 84 RF register
474 * 4) RFGainSel RF register
475 */
450static const struct ath5k_gain_opt rfgain_opt_5111 = { 476static const struct ath5k_gain_opt rfgain_opt_5111 = {
451 4, 477 4,
452 9, 478 9,
@@ -463,6 +489,16 @@ static const struct ath5k_gain_opt rfgain_opt_5111 = {
463 } 489 }
464}; 490};
465 491
492/*
493 * Parameters on gos_param:
494 * 1) Mixgain ovr RF register
495 * 2) PWD 138 RF register
496 * 3) PWD 137 RF register
497 * 4) PWD 136 RF register
498 * 5) PWD 132 RF register
499 * 6) PWD 131 RF register
500 * 7) PWD 130 RF register
501 */
466static const struct ath5k_gain_opt rfgain_opt_5112 = { 502static const struct ath5k_gain_opt rfgain_opt_5112 = {
467 1, 503 1,
468 8, 504 8,