diff options
author | Sujith Manoharan <c_manoha@qualcomm.com> | 2012-09-15 22:36:08 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-09-24 14:59:11 -0400 |
commit | 5317c9c3e9258b326c076d372e2eabf565d9a462 (patch) | |
tree | 6de259f5ac5989d75e1120022ecda2c63266f6af | |
parent | 9b460d77e715b5b774ff927a1925b80b483283b1 (diff) |
ath9k_hw: Add antenna diversity group for AR9565
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/antenna.c | 62 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 3 |
2 files changed, 65 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/antenna.c b/drivers/net/wireless/ath/ath9k/antenna.c index eb61c6bc480e..8eb274f16861 100644 --- a/drivers/net/wireless/ath/ath9k/antenna.c +++ b/drivers/net/wireless/ath/ath9k/antenna.c | |||
@@ -475,6 +475,68 @@ static void ath_ant_div_conf_fast_divbias(struct ath_hw_antcomb_conf *ant_conf, | |||
475 | default: | 475 | default: |
476 | break; | 476 | break; |
477 | } | 477 | } |
478 | } else if (ant_conf->div_group == 3) { | ||
479 | switch ((ant_conf->main_lna_conf << 4) | | ||
480 | ant_conf->alt_lna_conf) { | ||
481 | case 0x01: /* A-B LNA2 */ | ||
482 | ant_conf->fast_div_bias = 0x1; | ||
483 | break; | ||
484 | case 0x02: /* A-B LNA1 */ | ||
485 | ant_conf->fast_div_bias = 0x39; | ||
486 | break; | ||
487 | case 0x03: /* A-B A+B */ | ||
488 | ant_conf->fast_div_bias = 0x1; | ||
489 | break; | ||
490 | case 0x10: /* LNA2 A-B */ | ||
491 | if ((antcomb->scan == 0) && | ||
492 | (alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO)) { | ||
493 | ant_conf->fast_div_bias = 0x3f; | ||
494 | } else { | ||
495 | ant_conf->fast_div_bias = 0x1; | ||
496 | } | ||
497 | break; | ||
498 | case 0x12: /* LNA2 LNA1 */ | ||
499 | ant_conf->fast_div_bias = 0x39; | ||
500 | break; | ||
501 | case 0x13: /* LNA2 A+B */ | ||
502 | if ((antcomb->scan == 0) && | ||
503 | (alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO)) { | ||
504 | ant_conf->fast_div_bias = 0x3f; | ||
505 | } else { | ||
506 | ant_conf->fast_div_bias = 0x1; | ||
507 | } | ||
508 | break; | ||
509 | case 0x20: /* LNA1 A-B */ | ||
510 | if ((antcomb->scan == 0) && | ||
511 | (alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO)) { | ||
512 | ant_conf->fast_div_bias = 0x3f; | ||
513 | } else { | ||
514 | ant_conf->fast_div_bias = 0x4; | ||
515 | } | ||
516 | break; | ||
517 | case 0x21: /* LNA1 LNA2 */ | ||
518 | ant_conf->fast_div_bias = 0x6; | ||
519 | break; | ||
520 | case 0x23: /* LNA1 A+B */ | ||
521 | if ((antcomb->scan == 0) && | ||
522 | (alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO)) { | ||
523 | ant_conf->fast_div_bias = 0x3f; | ||
524 | } else { | ||
525 | ant_conf->fast_div_bias = 0x6; | ||
526 | } | ||
527 | break; | ||
528 | case 0x30: /* A+B A-B */ | ||
529 | ant_conf->fast_div_bias = 0x1; | ||
530 | break; | ||
531 | case 0x31: /* A+B LNA2 */ | ||
532 | ant_conf->fast_div_bias = 0x6; | ||
533 | break; | ||
534 | case 0x32: /* A+B LNA1 */ | ||
535 | ant_conf->fast_div_bias = 0x1; | ||
536 | break; | ||
537 | default: | ||
538 | break; | ||
539 | } | ||
478 | } | 540 | } |
479 | } | 541 | } |
480 | 542 | ||
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index 158b50d3a853..a8ab81bf74c4 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -1291,6 +1291,9 @@ static void ar9003_hw_antdiv_comb_conf_get(struct ath_hw *ah, | |||
1291 | } else if (AR_SREV_9485(ah)) { | 1291 | } else if (AR_SREV_9485(ah)) { |
1292 | antconf->lna1_lna2_delta = -9; | 1292 | antconf->lna1_lna2_delta = -9; |
1293 | antconf->div_group = 2; | 1293 | antconf->div_group = 2; |
1294 | } else if (AR_SREV_9565(ah)) { | ||
1295 | antconf->lna1_lna2_delta = -3; | ||
1296 | antconf->div_group = 3; | ||
1294 | } else { | 1297 | } else { |
1295 | antconf->lna1_lna2_delta = -3; | 1298 | antconf->lna1_lna2_delta = -3; |
1296 | antconf->div_group = 0; | 1299 | antconf->div_group = 0; |