summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell/mwifiex/util.c
diff options
context:
space:
mode:
authorDevidas Puranik <devidas@marvell.com>2017-03-09 14:06:17 +0530
committerKalle Valo <kvalo@codeaurora.org>2017-03-20 19:05:21 +0200
commit92c70a958b0b6b7e729a47a7c85762636859eee9 (patch)
treeb0fa2fa9fef5e6c84605f38f2445627d5737362e /drivers/net/wireless/marvell/mwifiex/util.c
parent5653c6462f56e13cb943cd572fdae9252157a523 (diff)
mwifiex: fix for unaligned reads
Using the accessor function e.g. get_unaligned_le32 instead of le32_to_cpu to avoid the unaligned access. This is for the architectures that don't handle the unaligned memory access Signed-off-by: Devidas Puranik <devidas@marvell.com> Signed-off-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/util.c')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/util.c b/drivers/net/wireless/marvell/mwifiex/util.c
index b1ab8da121dd..0cd68ffc2c74 100644
--- a/drivers/net/wireless/marvell/mwifiex/util.c
+++ b/drivers/net/wireless/marvell/mwifiex/util.c
@@ -274,13 +274,13 @@ int mwifiex_debug_info_to_buffer(struct mwifiex_private *priv, char *buf,
val = *((u8 *)addr);
break;
case 2:
- val = *((u16 *)addr);
+ val = get_unaligned((u16 *)addr);
break;
case 4:
- val = *((u32 *)addr);
+ val = get_unaligned((u32 *)addr);
break;
case 8:
- val = *((long long *)addr);
+ val = get_unaligned((long long *)addr);
break;
default:
val = -1;