diff options
author | Rajkumar Manoharan <rmanoharan@atheros.com> | 2011-01-31 13:17:43 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-03 16:44:43 -0500 |
commit | c344c9cb01d1dc65f2d5c85f22790e7f01d7dcd8 (patch) | |
tree | 3a87dd160d97c4016c9bed75710167db8b029872 /drivers/net/wireless/ath | |
parent | 45655baa42ce4116dd8a8d93832d75b4b264137a (diff) |
ath9k: use common get current channel function
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 19 |
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 | ||
67 | static 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 | |||
80 | bool ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode) | 67 | bool 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); |