diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-15 14:25:37 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-19 15:58:25 -0400 |
commit | bf3f204b92c48c4afa3e827dfe98353560d9aa7f (patch) | |
tree | 2b8c37bf9d5f055be8fdf4c10868d14371e4e76a /drivers/net/wireless/ath/ath9k/ar5008_phy.c | |
parent | d7084da0ceeddb9caf84de20cf687bb4a9b842b1 (diff) | |
download | blackbird-obmc-linux-bf3f204b92c48c4afa3e827dfe98353560d9aa7f.tar.gz blackbird-obmc-linux-bf3f204b92c48c4afa3e827dfe98353560d9aa7f.zip |
ath9k_hw: fix setting the hardware diversity flag
ath9k_hw_set_diversity is only called from init.c where it cannot affect
the hardware setting because it's cleared on the next reset.
Instead of using a PHY op for something that's supposed to be initialized
statically, set the register value directly in the INI override function.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar5008_phy.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar5008_phy.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index 1381a39a1da4..794a2d96a8ef 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c @@ -704,6 +704,9 @@ static void ar5008_hw_override_ini(struct ath_hw *ah, REG_WRITE(ah, AR_PCU_MISC_MODE2, val); } + REG_SET_BIT(ah, AR_PHY_CCK_DETECT, + AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV); + if (AR_SREV_9280_20_OR_LATER(ah)) return; /* @@ -1007,16 +1010,6 @@ static void ar5008_restore_chainmask(struct ath_hw *ah) } } -static void ar5008_set_diversity(struct ath_hw *ah, bool value) -{ - u32 v = REG_READ(ah, AR_PHY_CCK_DETECT); - if (value) - v |= AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV; - else - v &= ~AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV; - REG_WRITE(ah, AR_PHY_CCK_DETECT, v); -} - static u32 ar9100_hw_compute_pll_control(struct ath_hw *ah, struct ath9k_channel *chan) { @@ -1654,7 +1647,6 @@ void ar5008_hw_attach_phy_ops(struct ath_hw *ah) priv_ops->rfbus_req = ar5008_hw_rfbus_req; priv_ops->rfbus_done = ar5008_hw_rfbus_done; priv_ops->restore_chainmask = ar5008_restore_chainmask; - priv_ops->set_diversity = ar5008_set_diversity; priv_ops->do_getnf = ar5008_hw_do_getnf; priv_ops->set_radar_params = ar5008_hw_set_radar_params; |