diff options
| author | David S. Miller <davem@davemloft.net> | 2010-08-06 16:30:43 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-08-06 16:30:43 -0400 |
| commit | e225567960db50e9810a152c8621c7a6ed94de71 (patch) | |
| tree | d0129e2988f8aea56d4f00f04c4818c2e8cc07a2 | |
| parent | 4b030d4288a569d6bdeca884d7f102d951f097f2 (diff) | |
| parent | a24d52f390a77ce90dc8cf0cd75d27ec0a6ea3f8 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
41 files changed, 866 insertions, 301 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 88ec0447a4f3..44620aebb369 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -1087,7 +1087,6 @@ F: drivers/net/wireless/ath/ath5k/ | |||
| 1087 | ATHEROS ATH9K WIRELESS DRIVER | 1087 | ATHEROS ATH9K WIRELESS DRIVER |
| 1088 | M: "Luis R. Rodriguez" <lrodriguez@atheros.com> | 1088 | M: "Luis R. Rodriguez" <lrodriguez@atheros.com> |
| 1089 | M: Jouni Malinen <jmalinen@atheros.com> | 1089 | M: Jouni Malinen <jmalinen@atheros.com> |
| 1090 | M: Sujith Manoharan <Sujith.Manoharan@atheros.com> | ||
| 1091 | M: Vasanthakumar Thiagarajan <vasanth@atheros.com> | 1090 | M: Vasanthakumar Thiagarajan <vasanth@atheros.com> |
| 1092 | M: Senthil Balasubramanian <senthilkumar@atheros.com> | 1091 | M: Senthil Balasubramanian <senthilkumar@atheros.com> |
| 1093 | L: linux-wireless@vger.kernel.org | 1092 | L: linux-wireless@vger.kernel.org |
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c index dabafb874c36..fe7418aefc4a 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c | |||
| @@ -63,6 +63,7 @@ static bool ar9002_hw_per_calibration(struct ath_hw *ah, | |||
| 63 | u8 rxchainmask, | 63 | u8 rxchainmask, |
| 64 | struct ath9k_cal_list *currCal) | 64 | struct ath9k_cal_list *currCal) |
| 65 | { | 65 | { |
| 66 | struct ath9k_hw_cal_data *caldata = ah->caldata; | ||
| 66 | bool iscaldone = false; | 67 | bool iscaldone = false; |
| 67 | 68 | ||
| 68 | if (currCal->calState == CAL_RUNNING) { | 69 | if (currCal->calState == CAL_RUNNING) { |
| @@ -81,14 +82,14 @@ static bool ar9002_hw_per_calibration(struct ath_hw *ah, | |||
| 81 | } | 82 | } |
| 82 | 83 | ||
| 83 | currCal->calData->calPostProc(ah, numChains); | 84 | currCal->calData->calPostProc(ah, numChains); |
| 84 | ichan->CalValid |= currCal->calData->calType; | 85 | caldata->CalValid |= currCal->calData->calType; |
| 85 | currCal->calState = CAL_DONE; | 86 | currCal->calState = CAL_DONE; |
| 86 | iscaldone = true; | 87 | iscaldone = true; |
| 87 | } else { | 88 | } else { |
| 88 | ar9002_hw_setup_calibration(ah, currCal); | 89 | ar9002_hw_setup_calibration(ah, currCal); |
| 89 | } | 90 | } |
| 90 | } | 91 | } |
| 91 | } else if (!(ichan->CalValid & currCal->calData->calType)) { | 92 | } else if (!(caldata->CalValid & currCal->calData->calType)) { |
| 92 | ath9k_hw_reset_calibration(ah, currCal); | 93 | ath9k_hw_reset_calibration(ah, currCal); |
| 93 | } | 94 | } |
| 94 | 95 | ||
| @@ -686,8 +687,13 @@ static bool ar9002_hw_calibrate(struct ath_hw *ah, | |||
| 686 | { | 687 | { |
| 687 | bool iscaldone = true; | 688 | bool iscaldone = true; |
| 688 | struct ath9k_cal_list *currCal = ah->cal_list_curr; | 689 | struct ath9k_cal_list *currCal = ah->cal_list_curr; |
| 690 | bool nfcal, nfcal_pending = false; | ||
| 689 | 691 | ||
| 690 | if (currCal && | 692 | nfcal = !!(REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF); |
| 693 | if (ah->caldata) | ||
| 694 | nfcal_pending = ah->caldata->nfcal_pending; | ||
| 695 | |||
| 696 | if (currCal && !nfcal && | ||
| 691 | (currCal->calState == CAL_RUNNING || | 697 | (currCal->calState == CAL_RUNNING || |
| 692 | currCal->calState == CAL_WAITING)) { | 698 | currCal->calState == CAL_WAITING)) { |
| 693 | iscaldone = ar9002_hw_per_calibration(ah, chan, | 699 | iscaldone = ar9002_hw_per_calibration(ah, chan, |
| @@ -703,7 +709,7 @@ static bool ar9002_hw_calibrate(struct ath_hw *ah, | |||
| 703 | } | 709 | } |
| 704 | 710 | ||
| 705 | /* Do NF cal only at longer intervals */ | 711 | /* Do NF cal only at longer intervals */ |
| 706 | if (longcal) { | 712 | if (longcal || nfcal_pending) { |
| 707 | /* Do periodic PAOffset Cal */ | 713 | /* Do periodic PAOffset Cal */ |
| 708 | ar9002_hw_pa_cal(ah, false); | 714 | ar9002_hw_pa_cal(ah, false); |
| 709 | ar9002_hw_olc_temp_compensation(ah); | 715 | ar9002_hw_olc_temp_compensation(ah); |
| @@ -712,16 +718,18 @@ static bool ar9002_hw_calibrate(struct ath_hw *ah, | |||
| 712 | * Get the value from the previous NF cal and update | 718 | * Get the value from the previous NF cal and update |
| 713 | * history buffer. | 719 | * history buffer. |
| 714 | */ | 720 | */ |
| 715 | ath9k_hw_getnf(ah, chan); | 721 | if (ath9k_hw_getnf(ah, chan)) { |
| 716 | 722 | /* | |
| 717 | /* | 723 | * Load the NF from history buffer of the current |
| 718 | * Load the NF from history buffer of the current channel. | 724 | * channel. |
| 719 | * NF is slow time-variant, so it is OK to use a historical | 725 | * NF is slow time-variant, so it is OK to use a |
| 720 | * value. | 726 | * historical value. |
| 721 | */ | 727 | */ |
| 722 | ath9k_hw_loadnf(ah, ah->curchan); | 728 | ath9k_hw_loadnf(ah, ah->curchan); |
| 729 | } | ||
| 723 | 730 | ||
| 724 | ath9k_hw_start_nfcal(ah); | 731 | if (longcal) |
| 732 | ath9k_hw_start_nfcal(ah, false); | ||
| 725 | } | 733 | } |
| 726 | 734 | ||
| 727 | return iscaldone; | 735 | return iscaldone; |
| @@ -869,8 +877,10 @@ static bool ar9002_hw_init_cal(struct ath_hw *ah, struct ath9k_channel *chan) | |||
| 869 | ar9002_hw_pa_cal(ah, true); | 877 | ar9002_hw_pa_cal(ah, true); |
| 870 | 878 | ||
| 871 | /* Do NF Calibration after DC offset and other calibrations */ | 879 | /* Do NF Calibration after DC offset and other calibrations */ |
| 872 | REG_WRITE(ah, AR_PHY_AGC_CONTROL, | 880 | ath9k_hw_start_nfcal(ah, true); |
| 873 | REG_READ(ah, AR_PHY_AGC_CONTROL) | AR_PHY_AGC_CONTROL_NF); | 881 | |
| 882 | if (ah->caldata) | ||
