From: Shaddy Baddah <shaddy_baddah@hotmail.com>
To: linux-wireless@vger.kernel.org,
Johannes Berg <johannes@sipsolutions.net>
Subject: Re: zd1211rw (2.6.26 sparc64): unaligned access (zd_mac_rx)
Date: Sun, 09 Nov 2008 14:08:38 +1100 [thread overview]
Message-ID: <BAY104-DAV405497D40328FA26D8B14991B0@phx.gbl> (raw) (sfid-20081109_040931_707815_8E82A9AC)
Message-ID: <49165436.4040306@hotmail.com> (raw)
In-Reply-To: <BAY104-DAV7C39A232BE9A213EB2122991B0@phx.gbl>
[-- Attachment #1: Type: text/plain, Size: 360 bytes --]
On 09/11/08 14:06, Shaddy Baddah wrote:
> (attached. Note, it also includes remnants of the patch recommended by
> Sebastian Andrzej Siewior in
> http://marc.info/?l=linux-wireless&m=122493409906326&w=2). The problem
> occurs within compare_ether_addr() and this immediately reminded me that
This time, really attached. Sorry about that.
Regards,
Shaddy
[-- Attachment #2: zd_mac_rx_fix.diff --]
[-- Type: text/x-diff, Size: 1409 bytes --]
diff -urN -x '*.o' -x '*.ko' ./linux-source-2.6.26.orig/drivers/net/wireless/zd1211rw/zd_mac.c ./linux-source-2.6.26/drivers/net/wireless/zd1211rw/zd_mac.c
--- ./linux-source-2.6.26.orig/drivers/net/wireless/zd1211rw/zd_mac.c 2008-07-14 07:51:29.000000000 +1000
+++ ./linux-source-2.6.26/drivers/net/wireless/zd1211rw/zd_mac.c 2008-11-09 03:52:45.000000000 +1100
@@ -25,6 +25,7 @@
#include <linux/usb.h>
#include <linux/jiffies.h>
#include <net/ieee80211_radiotap.h>
+#include <asm/unaligned.h>
#include "zd_def.h"
#include "zd_chip.h"
@@ -632,7 +633,7 @@
struct ieee80211_hdr *tx_hdr;
tx_hdr = (struct ieee80211_hdr *)skb->data;
- if (likely(!compare_ether_addr(tx_hdr->addr2, rx_hdr->addr1)))
+ if (likely(!memcmp(tx_hdr->addr2, rx_hdr->addr1, ETH_ALEN)))
{
struct ieee80211_tx_status status;
@@ -716,7 +717,7 @@
&& !mac->pass_ctrl)
return 0;
- fc = le16_to_cpu(*((__le16 *) buffer));
+ fc = get_unaligned_le16(buffer);
is_qos = ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) &&
(fc & IEEE80211_STYPE_QOS_DATA);
@@ -806,7 +807,7 @@
u16 int_status;
struct zd_mac *mac = container_of(work, struct zd_mac, process_intr);
- int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer+4));
+ int_status = get_unaligned_le16(mac->intr_buffer+4);
if (int_status & INT_CFG_NEXT_BCN) {
if (net_ratelimit())
dev_dbg_f(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n");
next prev parent reply other threads:[~2008-11-09 3:09 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-25 8:54 zd1211rw (2.6.26 sparc64): unaligned access (zd_mac_rx) Shaddy Baddah
2008-10-25 9:17 ` Johannes Berg
2008-10-25 11:25 ` Sebastian Andrzej Siewior
2008-10-25 12:05 ` Johannes Berg
2008-10-26 22:00 ` Sebastian Andrzej Siewior
2008-10-27 7:00 ` Johannes Berg
2008-10-25 11:21 ` Sebastian Andrzej Siewior
2008-10-25 11:25 ` Michael Buesch
2008-10-25 11:28 ` Sebastian Andrzej Siewior
2008-10-25 11:31 ` Michael Buesch
2008-10-25 11:38 ` Sebastian Andrzej Siewior
2008-10-25 15:13 ` Shaddy Baddah
[not found] ` <491589ED.4090904@hotmail.com>
2008-11-08 12:45 ` Shaddy Baddah
2008-11-08 13:11 ` Johannes Berg
[not found] ` <491653A6.20705@hotmail.com>
2008-11-09 3:06 ` Shaddy Baddah
[not found] ` <49165436.4040306@hotmail.com>
2008-11-09 3:08 ` Shaddy Baddah [this message]
2008-11-09 12:00 ` Michael Buesch
2008-11-09 8:56 ` Johannes Berg
2008-11-09 9:03 ` Johannes Berg
2008-11-09 12:02 ` Michael Buesch
2008-11-09 18:31 ` Johannes Berg
[not found] ` <4916F1C0.1040703@hotmail.com>
2008-11-09 14:20 ` Shaddy Baddah
[not found] ` <49184F82.9070102@hotmail.com>
2008-11-10 15:13 ` Shaddy Baddah
[not found] ` <492F82EA.4030902@hotmail.com>
2008-11-28 5:34 ` Shaddy Baddah
2008-11-28 7:10 ` David Miller
2008-11-28 22:44 ` Michael Buesch
[not found] ` <49310454.60906@hotmail.com>
2008-11-29 8:59 ` Shaddy Baddah
2008-11-29 9:50 ` Johannes Berg
[not found] ` <49313C0E.9030309@hotmail.com>
2008-11-29 12:56 ` Shaddy Baddah
[not found] ` <492F856D.9020200@hotmail.com>
2008-11-28 5:45 ` Shaddy Baddah
2008-11-28 6:47 ` Harvey Harrison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BAY104-DAV405497D40328FA26D8B14991B0@phx.gbl \
--to=shaddy_baddah@hotmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).