summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/ath5k.h
diff options
context:
space:
mode:
authorLuis R. Rodriguez2009-09-11 01:55:11 +0200
committerJohn W. Linville2009-10-07 22:39:28 +0200
commite5aa847489e543e33a7c72898e72183871ce2916 (patch)
treee9b2efd90abd3c7e9f02039e8f6b2f1a15d89335 /drivers/net/wireless/ath/ath5k/ath5k.h
parentath5k: allocate ath5k_hw prior to initializing hw (diff)
downloadkernel-qcow2-linux-e5aa847489e543e33a7c72898e72183871ce2916.tar.gz
kernel-qcow2-linux-e5aa847489e543e33a7c72898e72183871ce2916.tar.xz
kernel-qcow2-linux-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.h16
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);