diff mbox

zd1211rw: fix unaligned access in zd_mac_rx

Message ID 4A755264.60201@netscape.net (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Patrick Simmons Aug. 2, 2009, 8:46 a.m. UTC
Fix an unaligned memory access in the zd_mac_rx function of zd1211rw 
that causes problems on SPARC64.

Signed-off-by: Patrick Simmons <linuxrocks123@netscape.net>

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -694,7 +694,7 @@ 
                        && !mac->pass_ctrl)
                return 0;

-       fc = *(__le16 *)buffer;
+       fc = get_unaligned((__le16*)buffer);
        need_padding = ieee80211_is_data_qos(fc) ^ ieee80211_has_a4(fc);

        skb = dev_alloc_skb(length + (need_padding ? 2 : 0));