Skip to content

Commit

Permalink
ath9k_hw: add a helper for the OLC tem compensation for AR9002
Browse files Browse the repository at this point in the history
Open Loop Control temperature compensation changes between our
hardware so use a helper for it.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Apr 16, 2010
1 parent 4d001d1 commit e83a113
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/net/wireless/ath/ath9k/calib.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,12 @@ static void ar9002_hw_pa_cal(struct ath_hw *ah, bool is_reset)
}
}

static void ar9002_hw_olc_temp_compensation(struct ath_hw *ah)
{
if (OLC_FOR_AR9280_20_LATER || OLC_FOR_AR9287_10_LATER)
ath9k_olc_temp_compensation(ah);
}

bool ath9k_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,
u8 rxchainmask, bool longcal)
{
Expand All @@ -989,9 +995,7 @@ bool ath9k_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,
if (longcal) {
/* Do periodic PAOffset Cal */
ar9002_hw_pa_cal(ah, false);

if (OLC_FOR_AR9280_20_LATER || OLC_FOR_AR9287_10_LATER)
ath9k_olc_temp_compensation(ah);
ar9002_hw_olc_temp_compensation(ah);

/* Get the value from the previous NF cal and update history buffer */
ath9k_hw_getnf(ah, chan);
Expand Down

0 comments on commit e83a113

Please sign in to comment.