aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ath9k.h
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-09-14 03:55:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:30 -0400
commit5bb127913299b37fceecf66ce86ee8ede70e7d13 (patch)
tree9856d3469b448bab7f425aac962f5a9a46ace9e6 /drivers/net/wireless/ath/ath9k/ath9k.h
parent990b70ab24cbce585a3436c8c88cb48b888d48b4 (diff)
atheros: move bus ops to ath_common
This is the last part to make ath9k hw code core driver agnostic. I believe ath9k_htc can now use use the hw code unmodified. 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/ath9k.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 8768e603eb72..14ff38d1f67c 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -537,13 +537,6 @@ struct ath_led {
537#define SC_OP_BEACON_SYNC BIT(19) 537#define SC_OP_BEACON_SYNC BIT(19)
538#define SC_OP_BT_PRIORITY_DETECTED BIT(21) 538#define SC_OP_BT_PRIORITY_DETECTED BIT(21)
539 539
540struct ath_bus_ops {
541 void (*read_cachesize)(struct ath_softc *sc, int *csz);
542 void (*cleanup)(struct ath_softc *sc);
543 bool (*eeprom_read)(struct ath_hw *ah, u32 off, u16 *data);
544 void (*bt_coex_prep)(struct ath_softc *sc);
545};
546
547struct ath_wiphy; 540struct ath_wiphy;
548 541
549struct ath_softc { 542struct ath_softc {
@@ -613,7 +606,6 @@ struct ath_softc {
613#ifdef CONFIG_ATH9K_DEBUG 606#ifdef CONFIG_ATH9K_DEBUG
614 struct ath9k_debug debug; 607 struct ath9k_debug debug;
615#endif 608#endif
616 struct ath_bus_ops *bus_ops;
617 struct ath_beacon_config cur_beacon_conf; 609 struct ath_beacon_config cur_beacon_conf;
618 struct delayed_work tx_complete_work; 610 struct delayed_work tx_complete_work;
619 struct ath_btcoex btcoex; 611 struct ath_btcoex btcoex;
@@ -638,21 +630,22 @@ int ath_get_hal_qnum(u16 queue, struct ath_softc *sc);
638int ath_get_mac80211_qnum(u32 queue, struct ath_softc *sc); 630int ath_get_mac80211_qnum(u32 queue, struct ath_softc *sc);
639int ath_cabq_update(struct ath_softc *); 631int ath_cabq_update(struct ath_softc *);
640 632
641static inline void ath_read_cachesize(struct ath_softc *sc, int *csz) 633static inline void ath_read_cachesize(struct ath_common *common, int *csz)
642{ 634{
643 sc->bus_ops->read_cachesize(sc, csz); 635 common->bus_ops->read_cachesize(common, csz);
644} 636}
645 637
646static inline void ath_bus_cleanup(struct ath_softc *sc) 638static inline void ath_bus_cleanup(struct ath_common *common)
647{ 639{
648 sc->bus_ops->cleanup(sc); 640 common->bus_ops->cleanup(common);
649} 641}
650 642
651extern struct ieee80211_ops ath9k_ops; 643extern struct ieee80211_ops ath9k_ops;
652 644
653irqreturn_t ath_isr(int irq, void *dev); 645irqreturn_t ath_isr(int irq, void *dev);
654void ath_cleanup(struct ath_softc *sc); 646void ath_cleanup(struct ath_softc *sc);
655int ath_init_device(u16 devid, struct ath_softc *sc, u16 subsysid); 647int ath_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
648 const struct ath_bus_ops *bus_ops);
656void ath_detach(struct ath_softc *sc); 649void ath_detach(struct ath_softc *sc);
657const char *ath_mac_bb_name(u32 mac_bb_version); 650const char *ath_mac_bb_name(u32 mac_bb_version);
658const char *ath_rf_name(u16 rf_version); 651const char *ath_rf_name(u16 rf_version);