aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/ar5008_phy.c14
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_phy.c14
-rw-r--r--drivers/net/wireless/ath/ath9k/hw-ops.h5
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c1
5 files changed, 6 insertions, 29 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index 1381a39a1da..794a2d96a8e 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,
704 REG_WRITE(ah, AR_PCU_MISC_MODE2, val); 704 REG_WRITE(ah, AR_PCU_MISC_MODE2, val);
705 } 705 }
706 706
707 REG_SET_BIT(ah, AR_PHY_CCK_DETECT,
708 AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV);
709
707 if (AR_SREV_9280_20_OR_LATER(ah)) 710 if (AR_SREV_9280_20_OR_LATER(ah))
708 return; 711 return;
709 /* 712 /*
@@ -1007,16 +1010,6 @@ static void ar5008_restore_chainmask(struct ath_hw *ah)
1007 } 1010 }
1008} 1011}
1009 1012
1010static void ar5008_set_diversity(struct ath_hw *ah, bool value)
1011{
1012 u32 v = REG_READ(ah, AR_PHY_CCK_DETECT);
1013 if (value)
1014 v |= AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV;
1015 else
1016 v &= ~AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV;
1017 REG_WRITE(ah, AR_PHY_CCK_DETECT, v);
1018}
1019
1020static u32 ar9100_hw_compute_pll_control(struct ath_hw *ah, 1013static u32 ar9100_hw_compute_pll_control(struct ath_hw *ah,
1021 struct ath9k_channel *chan) 1014 struct ath9k_channel *chan)
1022{ 1015{
@@ -1654,7 +1647,6 @@ void ar5008_hw_attach_phy_ops(struct ath_hw *ah)
1654 priv_ops->rfbus_req = ar5008_hw_rfbus_req; 1647 priv_ops->rfbus_req = ar5008_hw_rfbus_req;
1655 priv_ops->rfbus_done = ar5008_hw_rfbus_done; 1648 priv_ops->rfbus_done = ar5008_hw_rfbus_done;
1656 priv_ops->restore_chainmask = ar5008_restore_chainmask; 1649 priv_ops->restore_chainmask = ar5008_restore_chainmask;
1657 priv_ops->set_diversity = ar5008_set_diversity;
1658 priv_ops->do_getnf = ar5008_hw_do_getnf; 1650 priv_ops->do_getnf = ar5008_hw_do_getnf;
1659 priv_ops->set_radar_params = ar5008_hw_set_radar_params; 1651 priv_ops->set_radar_params = ar5008_hw_set_radar_params;
1660 1652
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
600static void ar9003_hw_prog_ini(struct ath_hw *ah, 603static 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
798static 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
808static bool ar9003_hw_ani_control(struct ath_hw *ah, 801static 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;
diff --git a/drivers/net/wireless/ath/ath9k/hw-ops.h b/drivers/net/wireless/ath/ath9k/hw-ops.h
index 41f4bf363d3..e9782d16496 100644
--- a/drivers/net/wireless/ath/ath9k/hw-ops.h
+++ b/drivers/net/wireless/ath/ath9k/hw-ops.h
@@ -181,11 +181,6 @@ static inline void ath9k_hw_restore_chainmask(struct ath_hw *ah)
181 return ath9k_hw_private_ops(ah)->restore_chainmask(ah); 181 return ath9k_hw_private_ops(ah)->restore_chainmask(ah);
182} 182}
183 183
184static inline void ath9k_hw_set_diversity(struct ath_hw *ah, bool value)
185{
186 return ath9k_hw_private_ops(ah)->set_diversity(ah, value);
187}
188
189static inline bool ath9k_hw_ani_control(struct ath_hw *ah, 184static inline bool ath9k_hw_ani_control(struct ath_hw *ah,
190 enum ath9k_ani_cmd cmd, int param) 185 enum ath9k_ani_cmd cmd, int param)
191{ 186{
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index bf38e2fc8f7..24889f78a05 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -584,7 +584,6 @@ struct ath_hw_private_ops {
584 bool (*rfbus_req)(struct ath_hw *ah); 584 bool (*rfbus_req)(struct ath_hw *ah);
585 void (*rfbus_done)(struct ath_hw *ah); 585 void (*rfbus_done)(struct ath_hw *ah);
586 void (*restore_chainmask)(struct ath_hw *ah); 586 void (*restore_chainmask)(struct ath_hw *ah);
587 void (*set_diversity)(struct ath_hw *ah, bool value);
588 u32 (*compute_pll_control)(struct ath_hw *ah, 587 u32 (*compute_pll_control)(struct ath_hw *ah,
589 struct ath9k_channel *chan); 588 struct ath9k_channel *chan);
590 bool (*ani_control)(struct ath_hw *ah, enum ath9k_ani_cmd cmd, 589 bool (*ani_control)(struct ath_hw *ah, enum ath9k_ani_cmd cmd,
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 9b34c4bab93..39514de044e 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -506,7 +506,6 @@ static void ath9k_init_misc(struct ath_softc *sc)
506 sc->sc_flags |= SC_OP_RXAGGR; 506 sc->sc_flags |= SC_OP_RXAGGR;
507 } 507 }
508 508
509 ath9k_hw_set_diversity(sc->sc_ah, true);
510 sc->rx.defant = ath9k_hw_getdefantenna(sc->sc_ah); 509 sc->rx.defant = ath9k_hw_getdefantenna(sc->sc_ah);
511 510
512 memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN); 511 memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN);