diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-15 08:25:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-19 15:58:25 -0400 |
commit | bf3f204b92c48c4afa3e827dfe98353560d9aa7f (patch) | |
tree | 2b8c37bf9d5f055be8fdf4c10868d14371e4e76a /drivers/net/wireless/ath/ath9k/ar9003_phy.c | |
parent | d7084da0ceeddb9caf84de20cf687bb4a9b842b1 (diff) |
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/ar9003_phy.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index 95147948794..9874248240e 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -595,6 +595,9 @@ static void ar9003_hw_override_ini(struct ath_hw *ah) | |||
595 | val = REG_READ(ah, AR_PCU_MISC_MODE2) & (~AR_ADHOC_MCAST_KEYID_ENABLE); | 595 | val = REG_READ(ah, AR_PCU_MISC_MODE2) & (~AR_ADHOC_MCAST_KEYID_ENABLE); |
596 | REG_WRITE(ah, AR_PCU_MISC_MODE2, | 596 | REG_WRITE(ah, AR_PCU_MISC_MODE2, |
597 | val | AR_AGG_WEP_ENABLE_FIX | AR_AGG_WEP_ENABLE); | 597 | val | AR_AGG_WEP_ENABLE_FIX | AR_AGG_WEP_ENABLE); |
598 | |||
599 | REG_SET_BIT(ah, AR_PHY_CCK_DETECT, | ||
600 | AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV); | ||
598 | } | 601 | } |
599 | 602 | ||
600 | static void ar9003_hw_prog_ini(struct ath_hw *ah, | 603 | static void ar9003_hw_prog_ini(struct ath_hw *ah, |
@@ -795,16 +798,6 @@ static void ar9003_hw_rfbus_done(struct ath_hw *ah) | |||
795 | REG_WRITE(ah, AR_PHY_RFBUS_REQ, 0); | 798 | REG_WRITE(ah, AR_PHY_RFBUS_REQ, 0); |
796 | } | 799 | } |
797 | 800 | ||
798 | static void ar9003_hw_set_diversity(struct ath_hw *ah, bool value) | ||
799 | { | ||
800 | u32 v = REG_READ(ah, AR_PHY_CCK_DETECT); | ||
801 | if (value) | ||
802 | v |= AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV; | ||
803 | else | ||
804 | v &= ~AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV; | ||
805 | REG_WRITE(ah, AR_PHY_CCK_DETECT, v); | ||
806 | } | ||
807 | |||
808 | static bool ar9003_hw_ani_control(struct ath_hw *ah, | 801 | static bool ar9003_hw_ani_control(struct ath_hw *ah, |
809 | enum ath9k_ani_cmd cmd, int param) | 802 | enum ath9k_ani_cmd cmd, int param) |
810 | { | 803 | { |
@@ -1287,7 +1280,6 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah) | |||
1287 | priv_ops->set_delta_slope = ar9003_hw_set_delta_slope; | 1280 | priv_ops->set_delta_slope = ar9003_hw_set_delta_slope; |
1288 | priv_ops->rfbus_req = ar9003_hw_rfbus_req; | 1281 | priv_ops->rfbus_req = ar9003_hw_rfbus_req; |
1289 | priv_ops->rfbus_done = ar9003_hw_rfbus_done; | 1282 | priv_ops->rfbus_done = ar9003_hw_rfbus_done; |
1290 | priv_ops->set_diversity = ar9003_hw_set_diversity; | ||
1291 | priv_ops->ani_control = ar9003_hw_ani_control; | 1283 | priv_ops->ani_control = ar9003_hw_ani_control; |
1292 | priv_ops->do_getnf = ar9003_hw_do_getnf; | 1284 | priv_ops->do_getnf = ar9003_hw_do_getnf; |
1293 | priv_ops->ani_cache_ini_regs = ar9003_hw_ani_cache_ini_regs; | 1285 | priv_ops->ani_cache_ini_regs = ar9003_hw_ani_cache_ini_regs; |