Skip to content

Commit

Permalink
zd1211rw: fix unaligned access in zd_mac_rx
Browse files Browse the repository at this point in the history
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Patrick Simmons authored and John W. Linville committed Aug 3, 2009
1 parent 3718424 commit dbc1eec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/zd1211rw/zd_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length)
&& !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));
Expand Down

0 comments on commit dbc1eec

Please sign in to comment.