diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/io.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/io.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/io.h b/drivers/net/wireless/wl12xx/io.h index 20b00319e444..a2fe4f506ada 100644 --- a/drivers/net/wireless/wl12xx/io.h +++ b/drivers/net/wireless/wl12xx/io.h | |||
@@ -129,6 +129,20 @@ static inline void wl1271_write(struct wl1271 *wl, int addr, void *buf, | |||
129 | wl1271_raw_write(wl, physical, buf, len, fixed); | 129 | wl1271_raw_write(wl, physical, buf, len, fixed); |
130 | } | 130 | } |
131 | 131 | ||
132 | static inline void wl1271_read_hwaddr(struct wl1271 *wl, int hwaddr, | ||
133 | void *buf, size_t len, bool fixed) | ||
134 | { | ||
135 | int physical; | ||
136 | int addr; | ||
137 | |||
138 | /* Addresses are stored internally as addresses to 32 bytes blocks */ | ||
139 | addr = hwaddr << 5; | ||
140 | |||
141 | physical = wl1271_translate_addr(wl, addr); | ||
142 | |||
143 | wl1271_raw_read(wl, physical, buf, len, fixed); | ||
144 | } | ||
145 | |||
132 | static inline u32 wl1271_read32(struct wl1271 *wl, int addr) | 146 | static inline u32 wl1271_read32(struct wl1271 *wl, int addr) |
133 | { | 147 | { |
134 | return wl1271_raw_read32(wl, wl1271_translate_addr(wl, addr)); | 148 | return wl1271_raw_read32(wl, wl1271_translate_addr(wl, addr)); |