Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315605
b: refs/heads/master
c: 89be49e
h: refs/heads/master
i:
  315603: 060add4
v: v3
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Jul 17, 2012
1 parent 7a429aa commit 43dac6f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa5955c36fc3dfa6d18b47fc206987c561d903d8
refs/heads/master: 89be49e1cd91aba694065cd2ab1463338830c3a4
23 changes: 23 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -3962,9 +3962,32 @@ static void ar9003_hw_txend_to_xpa_off_apply(struct ath_hw *ah, u16 freq)
AR_PHY_XPA_TIMING_CTL_TX_END_XPAA_OFF, value);
}

static void ar9003_hw_xpa_timing_control_apply(struct ath_hw *ah, bool is_2ghz)
{
struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
u8 xpa_ctl;

if (!(eep->baseEepHeader.featureEnable & 0x80))
return;

if (!AR_SREV_9300(ah) && !AR_SREV_9340(ah) && !AR_SREV_9580(ah))
return;

if (is_2ghz) {
xpa_ctl = eep->modalHeader2G.txFrameToXpaOn;
REG_RMW_FIELD(ah, AR_PHY_XPA_TIMING_CTL,
AR_PHY_XPA_TIMING_CTL_FRAME_XPAB_ON, xpa_ctl);
} else {
xpa_ctl = eep->modalHeader5G.txFrameToXpaOn;
REG_RMW_FIELD(ah, AR_PHY_XPA_TIMING_CTL,
AR_PHY_XPA_TIMING_CTL_FRAME_XPAA_ON, xpa_ctl);
}
}

static void ath9k_hw_ar9300_set_board_values(struct ath_hw *ah,
struct ath9k_channel *chan)
{
ar9003_hw_xpa_timing_control_apply(ah, IS_CHAN_2GHZ(chan));
ar9003_hw_xpa_bias_level_apply(ah, IS_CHAN_2GHZ(chan));
ar9003_hw_ant_ctrl_apply(ah, IS_CHAN_2GHZ(chan));
ar9003_hw_drive_strength_apply(ah);
Expand Down

0 comments on commit 43dac6f

Please sign in to comment.