diff options
Diffstat (limited to 'drivers/net/wireless/wl1251')
-rw-r--r-- | drivers/net/wireless/wl1251/io.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/wl1251/wl1251.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl1251/io.h b/drivers/net/wireless/wl1251/io.h index c545e9d5f512..d382877c34cc 100644 --- a/drivers/net/wireless/wl1251/io.h +++ b/drivers/net/wireless/wl1251/io.h | |||
@@ -36,16 +36,15 @@ | |||
36 | 36 | ||
37 | static inline u32 wl1251_read32(struct wl1251 *wl, int addr) | 37 | static inline u32 wl1251_read32(struct wl1251 *wl, int addr) |
38 | { | 38 | { |
39 | u32 response; | 39 | wl->if_ops->read(wl, addr, &wl->buffer_32, sizeof(wl->buffer_32)); |
40 | |||
41 | wl->if_ops->read(wl, addr, &response, sizeof(u32)); | ||
42 | 40 | ||
43 | return response; | 41 | return le32_to_cpu(wl->buffer_32); |
44 | } | 42 | } |
45 | 43 | ||
46 | static inline void wl1251_write32(struct wl1251 *wl, int addr, u32 val) | 44 | static inline void wl1251_write32(struct wl1251 *wl, int addr, u32 val) |
47 | { | 45 | { |
48 | wl->if_ops->write(wl, addr, &val, sizeof(u32)); | 46 | wl->buffer_32 = cpu_to_le32(val); |
47 | wl->if_ops->write(wl, addr, &wl->buffer_32, sizeof(wl->buffer_32)); | ||
49 | } | 48 | } |
50 | 49 | ||
51 | static inline u32 wl1251_read_elp(struct wl1251 *wl, int addr) | 50 | static inline u32 wl1251_read_elp(struct wl1251 *wl, int addr) |
diff --git a/drivers/net/wireless/wl1251/wl1251.h b/drivers/net/wireless/wl1251/wl1251.h index a77f1bbbed0a..9d8f5816c6f9 100644 --- a/drivers/net/wireless/wl1251/wl1251.h +++ b/drivers/net/wireless/wl1251/wl1251.h | |||
@@ -380,7 +380,7 @@ struct wl1251 { | |||
380 | struct wl1251_stats stats; | 380 | struct wl1251_stats stats; |
381 | struct wl1251_debugfs debugfs; | 381 | struct wl1251_debugfs debugfs; |
382 | 382 | ||
383 | u32 buffer_32; | 383 | __le32 buffer_32; |
384 | u32 buffer_cmd; | 384 | u32 buffer_cmd; |
385 | u8 buffer_busyword[WL1251_BUSY_WORD_LEN]; | 385 | u8 buffer_busyword[WL1251_BUSY_WORD_LEN]; |
386 | struct wl1251_rx_descriptor *rx_descriptor; | 386 | struct wl1251_rx_descriptor *rx_descriptor; |