summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2013-04-05 08:57:39 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2013-04-08 19:28:40 (GMT)
commita2ffc5668e2742db7bae48ad6098e45f8d3ea19e (patch)
tree4e1bb1c6f7e1377c9d6f0d82e83a8cf1854732cc /drivers
parent2716fd7d455e277ad8676df794fe65bd1e1ba442 (diff)
downloadlinux-a2ffc5668e2742db7bae48ad6098e45f8d3ea19e.tar.xz
brcmfmac: fix unaligned access in TXSTATUS signal handling
reported by Hante. Needs to be squashed in commit 187fbcec. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
index 8ce79af..451cfc1 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
@@ -1181,13 +1181,15 @@ static int brcmf_fws_fifocreditback_indicate(struct brcmf_fws_info *fws,
static int brcmf_fws_txstatus_indicate(struct brcmf_fws_info *fws, u8 *data)
{
+ __le32 status_le;
u32 status;
u32 hslot;
u32 genbit;
u8 flags;
fws->stats.txs_indicate++;
- status = le32_to_cpu(*(__le32 *)data);
+ memcpy(&status_le, data, sizeof(status_le));
+ status = le32_to_cpu(status_le);
flags = brcmf_txstatus_get_field(status, FLAGS);
hslot = brcmf_txstatus_get_field(status, HSLOT);
genbit = brcmf_txstatus_get_field(status, GENERATION);