diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-07-11 16:45:58 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-07-11 16:45:58 +0000 |
commit | 0e152e29fa9709afe67697a98be873a2fb566d7b (patch) | |
tree | d515e86efc567bc42d15e3fd9cc3757f439720ea /package/mac80211/patches/571-ath9k_xpa_timing_control.patch | |
parent | c931254968b2436546cc54d1943f9e1affa1eaae (diff) |
ath9k: add a number of ar93xx eeprom related fixes / enhancements
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32669 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/571-ath9k_xpa_timing_control.patch')
-rw-r--r-- | package/mac80211/patches/571-ath9k_xpa_timing_control.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/package/mac80211/patches/571-ath9k_xpa_timing_control.patch b/package/mac80211/patches/571-ath9k_xpa_timing_control.patch new file mode 100644 index 000000000..3efaeaf6a --- /dev/null +++ b/package/mac80211/patches/571-ath9k_xpa_timing_control.patch @@ -0,0 +1,35 @@ +--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c ++++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +@@ -3962,9 +3962,32 @@ static void ar9003_hw_txend_to_xpa_off_a + 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); |