aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 1447b55a8d0a..048eaef11f4a 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -64,19 +64,6 @@ static u8 parse_mpdudensity(u8 mpdudensity)
64 } 64 }
65} 65}
66 66
67static struct ath9k_channel *ath_get_curchannel(struct ath_softc *sc,
68 struct ieee80211_hw *hw)
69{
70 struct ieee80211_channel *curchan = hw->conf.channel;
71 struct ath9k_channel *channel;
72 u8 chan_idx;
73
74 chan_idx = curchan->hw_value;
75 channel = &sc->sc_ah->channels[chan_idx];
76 ath9k_cmn_update_ichannel(channel, curchan, hw->conf.channel_type);
77 return channel;
78}
79
80bool ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode) 67bool ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode)
81{ 68{
82 unsigned long flags; 69 unsigned long flags;
@@ -867,7 +854,7 @@ void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw)
867 ath9k_hw_configpcipowersave(ah, 0, 0); 854 ath9k_hw_configpcipowersave(ah, 0, 0);
868 855
869 if (!ah->curchan) 856 if (!ah->curchan)
870 ah->curchan = ath_get_curchannel(sc, sc->hw); 857 ah->curchan = ath9k_cmn_get_curchannel(sc->hw, ah);
871 858
872 r = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); 859 r = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false);
873 if (r) { 860 if (r) {
@@ -928,7 +915,7 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw)
928 ath_flushrecv(sc); /* flush recv queue */ 915 ath_flushrecv(sc); /* flush recv queue */
929 916
930 if (!ah->curchan) 917 if (!ah->curchan)
931 ah->curchan = ath_get_curchannel(sc, hw); 918 ah->curchan = ath9k_cmn_get_curchannel(hw, ah);
932 919
933 r = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); 920 r = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false);
934 if (r) { 921 if (r) {
@@ -1029,7 +1016,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
1029 /* setup initial channel */ 1016 /* setup initial channel */
1030 sc->chan_idx = curchan->hw_value; 1017 sc->chan_idx = curchan->hw_value;
1031 1018
1032 init_channel = ath_get_curchannel(sc, hw); 1019 init_channel = ath9k_cmn_get_curchannel(hw, ah);
1033 1020
1034 /* Reset SERDES registers */ 1021 /* Reset SERDES registers */
1035 ath9k_hw_configpcipowersave(ah, 0, 0); 1022 ath9k_hw_configpcipowersave(ah, 0, 0);