aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/hw-ops.h
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2010-04-15 17:38:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-16 15:43:19 -0400
commit8fe6536850ae49609704a263cbc7542133536922 (patch)
tree68560fc5132795bbd422d8ecfdf62014f59d8598 /drivers/net/wireless/ath/ath9k/hw-ops.h
parentaed1baf1ab10f4b6bd40952a9deb791dbba48f3a (diff)
ath9k_hw: Move some RF ops to the private callbacks
The PHY split is easier done in a few steps. First move the RF ops to the private ops and rename them accordingly. We split PHY stuff up first for the AR5008 and AR9002 families. There are some callbacks that AR9002 share with the AR5008 familiy so we set those first, if AR9002 has some different callbacks it will override them upon hardware init. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw-ops.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw-ops.h113
1 files changed, 113 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw-ops.h b/drivers/net/wireless/ath/ath9k/hw-ops.h
index ee33146cda15..81f3d03f0dbf 100644
--- a/drivers/net/wireless/ath/ath9k/hw-ops.h
+++ b/drivers/net/wireless/ath/ath9k/hw-ops.h
@@ -28,4 +28,117 @@ static inline void ath9k_hw_configpcipowersave(struct ath_hw *ah,
28 ath9k_hw_ops(ah)->config_pci_powersave(ah, restore, power_off); 28 ath9k_hw_ops(ah)->config_pci_powersave(ah, restore, power_off);
29} 29}
30 30
31/* Private hardware call ops */
32
33/* PHY ops */
34
35static inline int ath9k_hw_rf_set_freq(struct ath_hw *ah,
36 struct ath9k_channel *chan)
37{
38 return ath9k_hw_private_ops(ah)->rf_set_freq(ah, chan);
39}
40
41static inline void ath9k_hw_spur_mitigate_freq(struct ath_hw *ah,
42 struct ath9k_channel *chan)
43{
44 ath9k_hw_private_ops(ah)->spur_mitigate_freq(ah, chan);
45}
46
47static inline int ath9k_hw_rf_alloc_ext_banks(struct ath_hw *ah)
48{
49 if (!ath9k_hw_private_ops(ah)->rf_alloc_ext_banks)
50 return 0;
51
52 return ath9k_hw_private_ops(ah)->rf_alloc_ext_banks(ah);
53}
54
55static inline void ath9k_hw_rf_free_ext_banks(struct ath_hw *ah)
56{
57 if (!ath9k_hw_private_ops(ah)->rf_free_ext_banks)
58 return;
59
60 ath9k_hw_private_ops(ah)->rf_free_ext_banks(ah);
61}
62
63static inline bool ath9k_hw_set_rf_regs(struct ath_hw *ah,
64 struct ath9k_channel *chan,
65 u16 modesIndex)
66{
67 if (!ath9k_hw_private_ops(ah)->set_rf_regs)
68 return true;
69
70 return ath9k_hw_private_ops(ah)->set_rf_regs(ah, chan, modesIndex);
71}
72
73static inline void ath9k_hw_init_bb(struct ath_hw *ah,
74 struct ath9k_channel *chan)
75{
76 return ath9k_hw_private_ops(ah)->init_bb(ah, chan);
77}
78
79static inline void ath9k_hw_set_channel_regs(struct ath_hw *ah,
80 struct ath9k_channel *chan)
81{
82 return ath9k_hw_private_ops(ah)->set_channel_regs(ah, chan);
83}
84
85static inline int ath9k_hw_process_ini(struct ath_hw *ah,
86 struct ath9k_channel *chan)
87{
88 return ath9k_hw_private_ops(ah)->process_ini(ah, chan);
89}
90
91static inline void ath9k_olc_init(struct ath_hw *ah)
92{
93 if (!ath9k_hw_private_ops(ah)->olc_init)
94 return;
95
96 return ath9k_hw_private_ops(ah)->olc_init(ah);
97}
98
99static inline void ath9k_hw_set_rfmode(struct ath_hw *ah,
100 struct ath9k_channel *chan)
101{
102 return ath9k_hw_private_ops(ah)->set_rfmode(ah, chan);
103}
104
105static inline void ath9k_hw_mark_phy_inactive(struct ath_hw *ah)
106{
107 return ath9k_hw_private_ops(ah)->mark_phy_inactive(ah);
108}
109
110static inline void ath9k_hw_set_delta_slope(struct ath_hw *ah,
111 struct ath9k_channel *chan)
112{
113 return ath9k_hw_private_ops(ah)->set_delta_slope(ah, chan);
114}
115
116static inline bool ath9k_hw_rfbus_req(struct ath_hw *ah)
117{
118 return ath9k_hw_private_ops(ah)->rfbus_req(ah);
119}
120
121static inline void ath9k_hw_rfbus_done(struct ath_hw *ah)
122{
123 return ath9k_hw_private_ops(ah)->rfbus_done(ah);
124}
125
126static inline void ath9k_enable_rfkill(struct ath_hw *ah)
127{
128 return ath9k_hw_private_ops(ah)->enable_rfkill(ah);
129}
130
131static inline void ath9k_hw_restore_chainmask(struct ath_hw *ah)
132{
133 if (!ath9k_hw_private_ops(ah)->restore_chainmask)
134 return;
135
136 return ath9k_hw_private_ops(ah)->restore_chainmask(ah);
137}
138
139static inline void ath9k_hw_set_diversity(struct ath_hw *ah, bool value)
140{
141 return ath9k_hw_private_ops(ah)->set_diversity(ah, value);
142}
143
31#endif /* ATH9K_HW_OPS_H */ 144#endif /* ATH9K_HW_OPS_H */