···12011201/* Clock rate related functions */12021202unsigned int ath5k_hw_htoclock(struct ath5k_hw *ah, unsigned int usec);12031203unsigned int ath5k_hw_clocktoh(struct ath5k_hw *ah, unsigned int clock);12041204-unsigned int ath5k_hw_get_clockrate(struct ath5k_hw *ah);12041204+void ath5k_hw_set_clockrate(struct ath5k_hw *ah);1205120512061206/* Queue Control Unit, DFS Control Unit Functions */12071207int ath5k_hw_get_tx_queueprops(struct ath5k_hw *ah, int queue,
+8-5
drivers/net/wireless/ath/ath5k/pcu.c
···207207 */208208unsigned int ath5k_hw_htoclock(struct ath5k_hw *ah, unsigned int usec)209209{210210- return usec * ath5k_hw_get_clockrate(ah);210210+ struct ath_common *common = ath5k_hw_common(ah);211211+ return usec * common->clockrate;211212}212213213214/**···217216 */218217unsigned int ath5k_hw_clocktoh(struct ath5k_hw *ah, unsigned int clock)219218{220220- return clock / ath5k_hw_get_clockrate(ah);219219+ struct ath_common *common = ath5k_hw_common(ah);220220+ return clock / common->clockrate;221221}222222223223/**224224- * ath5k_hw_get_clockrate - Get the clock rate for current mode224224+ * ath5k_hw_set_clockrate - Set common->clockrate for the current channel225225 *226226 * @ah: The &struct ath5k_hw227227 */228228-unsigned int ath5k_hw_get_clockrate(struct ath5k_hw *ah)228228+void ath5k_hw_set_clockrate(struct ath5k_hw *ah)229229{230230 struct ieee80211_channel *channel = ah->ah_current_channel;231231+ struct ath_common *common = ath5k_hw_common(ah);231232 int clock;232233233234 if (channel->hw_value & CHANNEL_5GHZ)···243240 if (channel->hw_value & CHANNEL_TURBO)244241 clock *= 2;245242246246- return clock;243243+ common->clockrate = clock;247244}248245249246/**