diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2013-12-27 23:17:10 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-01-03 15:36:58 -0500 |
commit | e4ef2763039ec6ccd727b29d461e56414bf5425e (patch) | |
tree | 891a0b13da2d7cf3046ff69c7fc6281abdcf282b /drivers/net/wireless | |
parent | 1dd9619a21b7a334f84f35524aed1c39c5087b3b (diff) |
ath9k: Move private HW callbacks to hw-ops.h
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw-ops.h | 27 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 39 |
2 files changed, 27 insertions, 39 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw-ops.h b/drivers/net/wireless/ath/ath9k/hw-ops.h index 0b2550a91c7c..a47ea8423f1e 100644 --- a/drivers/net/wireless/ath/ath9k/hw-ops.h +++ b/drivers/net/wireless/ath/ath9k/hw-ops.h | |||
@@ -247,4 +247,31 @@ static inline void ath9k_hw_set_radar_params(struct ath_hw *ah) | |||
247 | ath9k_hw_private_ops(ah)->set_radar_params(ah, &ah->radar_conf); | 247 | ath9k_hw_private_ops(ah)->set_radar_params(ah, &ah->radar_conf); |
248 | } | 248 | } |
249 | 249 | ||
250 | static inline void ath9k_hw_init_cal_settings(struct ath_hw *ah) | ||
251 | { | ||
252 | ath9k_hw_private_ops(ah)->init_cal_settings(ah); | ||
253 | } | ||
254 | |||
255 | static inline u32 ath9k_hw_compute_pll_control(struct ath_hw *ah, | ||
256 | struct ath9k_channel *chan) | ||
257 | { | ||
258 | return ath9k_hw_private_ops(ah)->compute_pll_control(ah, chan); | ||
259 | } | ||
260 | |||
261 | static inline void ath9k_hw_init_mode_gain_regs(struct ath_hw *ah) | ||
262 | { | ||
263 | if (!ath9k_hw_private_ops(ah)->init_mode_gain_regs) | ||
264 | return; | ||
265 | |||
266 | ath9k_hw_private_ops(ah)->init_mode_gain_regs(ah); | ||
267 | } | ||
268 | |||
269 | static inline void ath9k_hw_ani_cache_ini_regs(struct ath_hw *ah) | ||
270 | { | ||
271 | if (!ath9k_hw_private_ops(ah)->ani_cache_ini_regs) | ||
272 | return; | ||
273 | |||
274 | ath9k_hw_private_ops(ah)->ani_cache_ini_regs(ah); | ||
275 | } | ||
276 | |||
250 | #endif /* ATH9K_HW_OPS_H */ | 277 | #endif /* ATH9K_HW_OPS_H */ |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 724e7be706d8..2ba712471d85 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -37,45 +37,6 @@ MODULE_DESCRIPTION("Support for Atheros 802.11n wireless LAN cards."); | |||
37 | MODULE_SUPPORTED_DEVICE("Atheros 802.11n WLAN cards"); | 37 | MODULE_SUPPORTED_DEVICE("Atheros 802.11n WLAN cards"); |
38 | MODULE_LICENSE("Dual BSD/GPL"); | 38 | MODULE_LICENSE("Dual BSD/GPL"); |
39 | 39 | ||
40 | /* Private hardware callbacks */ | ||
41 | |||
42 | static void ath9k_hw_init_cal_settings(struct ath_hw *ah) | ||
43 | { | ||
44 | ath9k_hw_private_ops(ah)->init_cal_settings(ah); | ||
45 | } | ||
46 | |||
47 | static u32 ath9k_hw_compute_pll_control(struct ath_hw *ah, | ||
48 | struct ath9k_channel *chan) | ||
49 | { | ||
50 | return ath9k_hw_private_ops(ah)->compute_pll_control(ah, chan); | ||
51 | } | ||
52 | |||
53 | static void ath9k_hw_init_mode_gain_regs(struct ath_hw *ah) | ||
54 | { | ||
55 | if (!ath9k_hw_private_ops(ah)->init_mode_gain_regs) | ||
56 | return; | ||
57 | |||
58 | ath9k_hw_private_ops(ah)->init_mode_gain_regs(ah); | ||
59 | } | ||
60 | |||
61 | static void ath9k_hw_ani_cache_ini_regs(struct ath_hw *ah) | ||
62 | { | ||
63 | /* You will not have this callback if using the old ANI */ | ||
64 | if (!ath9k_hw_private_ops(ah)->ani_cache_ini_regs) | ||
65 | return; | ||
66 | |||
67 | ath9k_hw_private_ops(ah)->ani_cache_ini_regs(ah); | ||
68 | } | ||
69 | |||
70 | /********************/ | ||
71 | /* Helper Functions */ | ||
72 | /********************/ | ||
73 | |||
74 | #ifdef CONFIG_ATH9K_DEBUGFS | ||
75 | |||
76 | #endif | ||
77 | |||
78 | |||
79 | static void ath9k_hw_set_clockrate(struct ath_hw *ah) | 40 | static void ath9k_hw_set_clockrate(struct ath_hw *ah) |
80 | { | 41 | { |
81 | struct ath_common *common = ath9k_hw_common(ah); | 42 | struct ath_common *common = ath9k_hw_common(ah); |