From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
shaddy_baddah-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org
Subject: Re: ZD1211RW unaligned accesses...
Date: Fri, 23 Nov 2007 11:41:26 +0100 [thread overview]
Message-ID: <1195814486.4149.83.camel@johannes.berg> (raw)
In-Reply-To: <20071120.040546.222294375.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> (sfid-20071120_120554_491311_552F5A44)
> The problem is
> drivers/net/wireless/zd1211/zd_mac.c:update_qual_rssi().
> Specifically the compare_ether_addr() call
I don't believe this is true. Shaddy seems to back that up by the patch
not helping.
> Wireless folks, I would suggest we do some auditing of the
> compare_ether_addr() calls and for the ones that are operating
> on these potentially unaligned structs we change it to either
> a straight memcmp() or some new routine which will more reflect
> the issue (say something like "compare_ether_addr_unaligned()"
> or "ieee80211_compare_ether_addr()").
All MAC addresses in 802.11 headers are at least aligned on 16-bit
boundaries. Hence, if the some MAC address like the BSSID here was
unaligned we'd also have the IP header unaligned causing a lot more
trouble than this.
Shaddy, please rebuild zd1211 with the patch below, it should make the
compiler not inline all those static functions allowing us to pinpoint
much better where the problem occurs. You will probably need to delete
all *.o files in the zd1211rw/ directory to the them rebuilt after the
Makefile change.
--- everything.orig/drivers/net/wireless/zd1211rw/Makefile 2007-11-23 11:36:30.652094075 +0100
+++ everything/drivers/net/wireless/zd1211rw/Makefile 2007-11-23 11:36:57.112090711 +0100
@@ -1,5 +1,7 @@
obj-$(CONFIG_ZD1211RW) += zd1211rw.o
+EXTRA_CFLAGS += -fno-inline-functions-called-once
+
zd1211rw-objs := zd_chip.o zd_ieee80211.o \
zd_mac.o zd_netdev.o \
zd_rf_al2230.o zd_rf_rf2959.o \
prev parent reply other threads:[~2007-11-23 10:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-20 12:05 ZD1211RW unaligned accesses David Miller
[not found] ` <20071120.040546.222294375.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2007-11-21 13:00 ` Shaddy Baddah
[not found] ` <47442BFC.8090008-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>
2007-11-24 15:02 ` Herbert Xu
[not found] ` <20071124150216.GA28153-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2007-11-24 16:52 ` Ulrich Kunitz
2007-11-29 21:45 ` John W. Linville
[not found] ` <20071129214533.GD32730-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2007-11-29 23:43 ` Herbert Xu
[not found] ` <20071129234327.GA23769-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2007-11-30 7:34 ` Shaddy Baddah
2007-11-30 9:50 ` Herbert Xu
2007-11-30 11:33 ` Johannes Berg
2007-12-01 10:33 ` Ulrich Kunitz
2007-11-23 10:41 ` Johannes Berg [this message]
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=1195814486.4149.83.camel@johannes.berg \
--to=johannes-cdvu00un1vgdhxzaddlk8q@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=shaddy_baddah-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.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).