Commit dbc1eec4 authored by Patrick Simmons's avatar Patrick Simmons Committed by John W. Linville

zd1211rw: fix unaligned access in zd_mac_rx

Fix an unaligned memory access in the zd_mac_rx function of zd1211rw
that causes problems on SPARC64.
Signed-off-by: default avatarPatrick Simmons <linuxrocks123@netscape.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 37184244
...@@ -698,7 +698,7 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length) ...@@ -698,7 +698,7 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length)
&& !mac->pass_ctrl) && !mac->pass_ctrl)
return 0; return 0;
fc = *(__le16 *)buffer; fc = get_unaligned((__le16*)buffer);
need_padding = ieee80211_is_data_qos(fc) ^ ieee80211_has_a4(fc); need_padding = ieee80211_is_data_qos(fc) ^ ieee80211_has_a4(fc);
skb = dev_alloc_skb(length + (need_padding ? 2 : 0)); skb = dev_alloc_skb(length + (need_padding ? 2 : 0));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment