brcmfmac: fix unaligned access in TXSTATUS signal handling
authorArend van Spriel <arend@broadcom.com>
Fri, 5 Apr 2013 08:57:39 +0000 (10:57 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 8 Apr 2013 19:28:40 +0000 (15:28 -0400)
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>
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c

index 8ce79af47e66166f8c5b19e9af49053adb75606a..451cfc1b2c47506c0bf7d7cc8b71e3564ac3972a 100644 (file)
@@ -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);