projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3718424
)
zd1211rw: fix unaligned access in zd_mac_rx
author
Patrick Simmons
<
[email protected]
>
Sun, 2 Aug 2009 08:46:28 +0000
(
02:46
-0600)
committer
John W. Linville
<
[email protected]
>
Mon, 3 Aug 2009 20:31:22 +0000
(16:31 -0400)
Fix an unaligned memory access in the zd_mac_rx function of zd1211rw
that causes problems on SPARC64.
Signed-off-by: Patrick Simmons <
[email protected]
>
Signed-off-by: John W. Linville <
[email protected]
>
drivers/net/wireless/zd1211rw/zd_mac.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/zd1211rw/zd_mac.c
b/drivers/net/wireless/zd1211rw/zd_mac.c
index 40b07b988224a4eee002a91c970fe1b5500f8ce2..3bd3c779fff337ab480b357ff8302d7facca25bd 100644
(file)
--- a/
drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/
drivers/net/wireless/zd1211rw/zd_mac.c
@@
-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));