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>
This commit is contained in:

committed by
John W. Linville

parent
d717fd6188
commit
554d7209c8
@@ -74,12 +74,12 @@ static inline u32 wl1271_raw_read32(struct wl1271 *wl, int addr)
|
||||
wl1271_raw_read(wl, addr, &wl->buffer_32,
|
||||
sizeof(wl->buffer_32), false);
|
||||
|
||||
return wl->buffer_32;
|
||||
return le32_to_cpu(wl->buffer_32);
|
||||
}
|
||||
|
||||
static inline void wl1271_raw_write32(struct wl1271 *wl, int addr, u32 val)
|
||||
{
|
||||
wl->buffer_32 = val;
|
||||
wl->buffer_32 = cpu_to_le32(val);
|
||||
wl1271_raw_write(wl, addr, &wl->buffer_32,
|
||||
sizeof(wl->buffer_32), false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user