diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-09-10 16:55:11 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:28 -0400 |
commit | e5aa847489e543e33a7c72898e72183871ce2916 (patch) | |
tree | e9b2efd90abd3c7e9f02039e8f6b2f1a15d89335 /drivers/net/wireless/ath/ath5k/ath5k.h | |
parent | 9adca126dbf4bf099bc7051deb6b566725a046dc (diff) | |
download | lwn-e5aa847489e543e33a7c72898e72183871ce2916.tar.gz lwn-e5aa847489e543e33a7c72898e72183871ce2916.zip |
ath5k: define ath_common ops
Only common ath read/write ops go through the common ops.
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/ath5k/ath5k.h')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/ath5k.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h index 29ce868b1f1c..1416562e4d19 100644 --- a/drivers/net/wireless/ath/ath5k/ath5k.h +++ b/drivers/net/wireless/ath/ath5k/ath5k.h @@ -1315,17 +1315,21 @@ static inline unsigned int ath5k_hw_clocktoh(unsigned int clock, bool turbo) return turbo ? (clock / 80) : (clock / 40); } -/* - * Read from a register - */ +static inline struct ath_common *ath5k_hw_common(struct ath5k_hw *ah) +{ + return &ah->common; +} + +static inline struct ath_regulatory *ath5k_hw_regulatory(struct ath5k_hw *ah) +{ + return &(ath5k_hw_common(ah)->regulatory); +} + static inline u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg) { return ioread32(ah->ah_iobase + reg); } -/* - * Write to a register - */ static inline void ath5k_hw_reg_write(struct ath5k_hw *ah, u32 val, u16 reg) { iowrite32(val, ah->ah_iobase + reg); |