From: Dan Williams <dcbw@redhat.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Colin McCabe <colin@cozybit.com>,
linux-wireless@vger.kernel.org,
Andrey Yurovsky <andrey@cozybit.com>
Subject: Re: [PATCH v2 1/3] libertas: Fix alignment issues in libertas core
Date: Thu, 08 Jan 2009 11:54:41 -0500 [thread overview]
Message-ID: <1231433681.21643.43.camel@localhost.localdomain> (raw)
In-Reply-To: <1231433597.8398.3.camel@johannes>
On Thu, 2009-01-08 at 17:53 +0100, Johannes Berg wrote:
> On Fri, 2009-01-02 at 19:00 -0800, Colin McCabe wrote:
> > When loading fields from packed structs, use get_unaligned_le16 and
> > get_unaligned_le32 instead of le16_to_cpu and le32_to_cpu.
> > This doesn't matter on x86, but it is important for some other CPUs.
> >
> > Also, mark all packed structs as packed. Generally, any data structure
> > that comes over the wire from the WLAN firmware should be a packed struct.
>
> Just marking the structs packed should be sufficient, since then the
> compiler must assume they are potentially unaligned.
Colin, can you test out just the bits that mark the structs as packed
and see if we can get by without using get_unaligned_le16() everywhere?
There will be a few cases where get_unaligned_le16() may be required but
I'm pretty sure we don't need this many...
Dan
prev parent reply other threads:[~2009-01-08 16:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-03 3:00 [PATCH v2 0/3] libertas: driver for GSPI devices Colin McCabe
2009-01-03 3:00 ` [PATCH v2 1/3] libertas: Fix alignment issues in libertas core Colin McCabe
2009-01-03 3:00 ` [PATCH v2 2/3] libertas: Update libertas core with GSPI constants Colin McCabe
2009-01-03 3:00 ` [PATCH v2 3/3] libertas: if_spi, driver for libertas GSPI devices Colin McCabe
2009-01-07 8:38 ` Holger Schurig
2009-01-07 17:28 ` Andrey Yurovsky
2009-01-08 17:17 ` Dan Williams
2009-01-08 17:42 ` Colin McCabe
2009-01-09 8:05 ` Kalle Valo
2009-01-08 16:56 ` [PATCH v2 2/3] libertas: Update libertas core with GSPI constants Dan Williams
2009-01-08 16:53 ` [PATCH v2 1/3] libertas: Fix alignment issues in libertas core Johannes Berg
2009-01-08 16:54 ` Dan Williams [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=1231433681.21643.43.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=andrey@cozybit.com \
--cc=colin@cozybit.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).