diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-05-07 04:38:59 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-07 14:57:18 -0400 |
commit | 554d7209c87a7b7ec70c14d9ed1c01e05f5dbc23 (patch) | |
tree | 4f1c229b9aa2b210570dffffdb530f967b96110b /drivers/net | |
parent | d717fd6188b2ea63cf9dc0a870fd312c312841cd (diff) |
wl1271: Fix 32 bit register read related endiannes bug
Reading single registers did not pay attention to data endianness. This patch
fix that.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_io.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h index 3e1769dd1b55..6f1b6b5640c0 100644 --- a/drivers/net/wireless/wl12xx/wl1271.h +++ b/drivers/net/wireless/wl12xx/wl1271.h | |||
@@ -481,7 +481,7 @@ struct wl1271 { | |||
481 | struct wl1271_stats stats; | 481 | struct wl1271_stats stats; |
482 | struct wl1271_debugfs debugfs; | 482 | struct wl1271_debugfs debugfs; |
483 | 483 | ||
484 | u32 buffer_32; | 484 | __le32 buffer_32; |
485 | u32 buffer_cmd; | 485 | u32 buffer_cmd; |
486 | u32 buffer_busyword[WL1271_BUSY_WORD_CNT]; | 486 | u32 buffer_busyword[WL1271_BUSY_WORD_CNT]; |
487 | 487 | ||
diff --git a/drivers/net/wireless/wl12xx/wl1271_io.h b/drivers/net/wireless/wl12xx/wl1271_io.h index d8837ef0bb40..bc806c74c63a 100644 --- a/drivers/net/wireless/wl12xx/wl1271_io.h +++ b/drivers/net/wireless/wl12xx/wl1271_io.h | |||
@@ -74,12 +74,12 @@ static inline u32 wl1271_raw_read32(struct wl1271 *wl, int addr) | |||
74 | wl1271_raw_read(wl, addr, &wl->buffer_32, | 74 | wl1271_raw_read(wl, addr, &wl->buffer_32, |
75 | sizeof(wl->buffer_32), false); | 75 | sizeof(wl->buffer_32), false); |
76 | 76 | ||
77 | return wl->buffer_32; | 77 | return le32_to_cpu(wl->buffer_32); |
78 | } | 78 | } |
79 | 79 | ||
80 | static inline void wl1271_raw_write32(struct wl1271 *wl, int addr, u32 val) | 80 | static inline void wl1271_raw_write32(struct wl1271 *wl, int addr, u32 val) |
81 | { | 81 | { |
82 | wl->buffer_32 = val; | 82 | wl->buffer_32 = cpu_to_le32(val); |
83 | wl1271_raw_write(wl, addr, &wl->buffer_32, | 83 | wl1271_raw_write(wl, addr, &wl->buffer_32, |
84 | sizeof(wl->buffer_32), false); | 84 | sizeof(wl->buffer_32), false); |
85 | } | 85 | } |