summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath.h
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-09-10 16:11:21 -0700
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:27 -0400
commit9e4bffd233f27fe83fc48efb01935aee7d0685bf (patch)
tree9c7444e68bda2774284dcff2eddacbdef8890932 /drivers/net/wireless/ath/ath.h
parent867633f026456ff71d4c4890f502c7a61b2adac0 (diff)
atheros/ath9k: add common read/write ops and port ath9k to use it
In an effort to make hw code driver core agnostic read and write operations are defined on the ath_common structure. This patch adds that and makes ath9k use it. This allows drivers like ath9k_htc to define its own read/write ops and still rely on the same hw code. This also paves the way for sharing code between ath9k/ath5k/ath9k_htc. 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/ath.h')
-rw-r--r--drivers/net/wireless/ath/ath.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
index 7589b2aa030b..38be4279affc 100644
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -39,6 +39,11 @@ struct ath_regulatory {
struct reg_dmn_pair_mapping *regpair;
};
+struct ath_ops {
+ unsigned int (*read)(void *, u32 reg_offset);
+ void (*write)(void *, u32 val, u32 reg_offset);
+};
+
struct ath_common {
u16 cachelsz;
u16 curaid;
@@ -46,6 +51,7 @@ struct ath_common {
u8 curbssid[ETH_ALEN];
u8 bssidmask[ETH_ALEN];
struct ath_regulatory regulatory;
+ struct ath_ops *ops;
};
struct sk_buff *ath_rxbuf_alloc(struct ath_common *common,