aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/io.h')
-rw-r--r--drivers/net/wireless/wl12xx/io.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/net/wireless/wl12xx/io.h b/drivers/net/wireless/wl12xx/io.h
index e839341dfafe..d398cbcea986 100644
--- a/drivers/net/wireless/wl12xx/io.h
+++ b/drivers/net/wireless/wl12xx/io.h
@@ -51,23 +51,17 @@ void wl1271_enable_interrupts(struct wl1271 *wl);
51void wl1271_io_reset(struct wl1271 *wl); 51void wl1271_io_reset(struct wl1271 *wl);
52void wl1271_io_init(struct wl1271 *wl); 52void wl1271_io_init(struct wl1271 *wl);
53 53
54static inline struct device *wl1271_wl_to_dev(struct wl1271 *wl)
55{
56 return wl->if_ops->dev(wl);
57}
58
59
60/* Raw target IO, address is not translated */ 54/* Raw target IO, address is not translated */
61static inline void wl1271_raw_write(struct wl1271 *wl, int addr, void *buf, 55static inline void wl1271_raw_write(struct wl1271 *wl, int addr, void *buf,
62 size_t len, bool fixed) 56 size_t len, bool fixed)
63{ 57{
64 wl->if_ops->write(wl, addr, buf, len, fixed); 58 wl->if_ops->write(wl->dev, addr, buf, len, fixed);
65} 59}
66 60
67static inline void wl1271_raw_read(struct wl1271 *wl, int addr, void *buf, 61static inline void wl1271_raw_read(struct wl1271 *wl, int addr, void *buf,
68 size_t len, bool fixed) 62 size_t len, bool fixed)
69{ 63{
70 wl->if_ops->read(wl, addr, buf, len, fixed); 64 wl->if_ops->read(wl->dev, addr, buf, len, fixed);
71} 65}
72 66
73static inline u32 wl1271_raw_read32(struct wl1271 *wl, int addr) 67static inline u32 wl1271_raw_read32(struct wl1271 *wl, int addr)
@@ -155,13 +149,13 @@ static inline void wl1271_write32(struct wl1271 *wl, int addr, u32 val)
155 149
156static inline void wl1271_power_off(struct wl1271 *wl) 150static inline void wl1271_power_off(struct wl1271 *wl)
157{ 151{
158 wl->if_ops->power(wl, false); 152 wl->if_ops->power(wl->dev, false);
159 clear_bit(WL1271_FLAG_GPIO_POWER, &wl->flags); 153 clear_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
160} 154}
161 155
162static inline int wl1271_power_on(struct wl1271 *wl) 156static inline int wl1271_power_on(struct wl1271 *wl)
163{ 157{
164 int ret = wl->if_ops->power(wl, true); 158 int ret = wl->if_ops->power(wl->dev, true);
165 if (ret == 0) 159 if (ret == 0)
166 set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags); 160 set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
167 161
@@ -176,15 +170,10 @@ u16 wl1271_top_reg_read(struct wl1271 *wl, int addr);
176int wl1271_set_partition(struct wl1271 *wl, 170int wl1271_set_partition(struct wl1271 *wl,
177 struct wl1271_partition_set *p); 171 struct wl1271_partition_set *p);
178 172
173bool wl1271_set_block_size(struct wl1271 *wl);
174
179/* Functions from wl1271_main.c */ 175/* Functions from wl1271_main.c */
180 176
181int wl1271_register_hw(struct wl1271 *wl);
182void wl1271_unregister_hw(struct wl1271 *wl);
183int wl1271_init_ieee80211(struct wl1271 *wl);
184struct ieee80211_hw *wl1271_alloc_hw(void);
185int wl1271_free_hw(struct wl1271 *wl);
186irqreturn_t wl1271_irq(int irq, void *data);
187bool wl1271_set_block_size(struct wl1271 *wl);
188int wl1271_tx_dummy_packet(struct wl1271 *wl); 177int wl1271_tx_dummy_packet(struct wl1271 *wl);
189 178
190#endif 179#endif