linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix SPARC64 unaligned access in zd_mac_rx
@ 2009-07-31  7:59 Patrick Simmons
  2009-07-31  8:39 ` Johannes Berg
  0 siblings, 1 reply; 11+ messages in thread
From: Patrick Simmons @ 2009-07-31  7:59 UTC (permalink / raw)
  To: linux-wireless; +Cc: Daniel Drake, Ulrich Kunitz

I'm running zd1211rw on SPARC64 and was getting a lot of "unaligned 
access" messages in dmesg.  I tracked the problem down to this line, and 
changing the cast to a memcpy fixes the issue.

Please CC me with any comments as I am not subscribed to the list.

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

--- a/drivers/net/wireless/zd1211rw/zd_mac.c    2009-07-30 
23:23:50.000000000 -0600
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c    2009-07-30 
23:58:19.000000000 -0600
@@ -694,7 +694,7 @@
                        && !mac->pass_ctrl)
                return 0;
 
-       fc = *(__le16 *)buffer;
+       memcpy(&fc,buffer,sizeof(__le16));
        need_padding = ieee80211_is_data_qos(fc) ^ ieee80211_has_a4(fc);
 
        skb = dev_alloc_skb(length + (need_padding ? 2 : 0));


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-08-02  8:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-31  7:59 [PATCH] Fix SPARC64 unaligned access in zd_mac_rx Patrick Simmons
2009-07-31  8:39 ` Johannes Berg
2009-08-01  5:23   ` David Miller
2009-08-01 10:40     ` Michael Buesch
2009-08-01 16:12       ` David Miller
2009-08-02  1:41         ` Patrick Simmons
2009-08-02  7:50           ` Johannes Berg
2009-08-02  8:24             ` Patrick Simmons
2009-08-02  8:34               ` Johannes Berg
2009-08-02  8:45                 ` Patrick Simmons
2009-08-02  8:46             ` [PATCH] zd1211rw: fix " Patrick Simmons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).