linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ihar Hrachyshka <ihar.hrachyshka@promwad.com>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] libertas: fix memory alignment problems on the blackfin
Date: Wed, 9 Jul 2008 09:29:58 +0300	[thread overview]
Message-ID: <20080709092958.72e82f25@promwad.com> (raw)
In-Reply-To: <1215563092.476.58.camel@brick>

> There's helpers for this now: get_unaligned_le16
Ok, third pass - the first was in January... :)

Fixing unaligned memory access on the blackfin architecture (maybe on
the ARM also).

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@promwad.com>

---

diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index 343ed38..4b27456 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -567,11 +567,11 @@ static int lbs_process_bss(struct bss_descriptor *bss,
	pos += 8;

	/* beacon interval is 2 bytes long */
-	bss->beaconperiod = le16_to_cpup((void *) pos);
+	bss->beaconperiod = get_unaligned_le16(pos);
	pos += 2;

	/* capability information is 2 bytes long */
-	bss->capability = le16_to_cpup((void *) pos);
+	bss->capability = get_unaligned_le16(pos);
	lbs_deb_scan("process_bss: capabilities 0x%04x\n", bss->capability);
	pos += 2;


  reply	other threads:[~2008-07-09  6:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09  0:18 [PATCH] libertas: fix memory alignment problems on the blackfin Ihar Hrachyshka
2008-07-09  0:24 ` Harvey Harrison
2008-07-09  6:29   ` Ihar Hrachyshka [this message]
2008-07-10 11:29     ` Dan Williams
2008-07-09 13:21 ` Holger Schurig
2008-07-09 20:03   ` Ihar Hrachyshka
2008-07-09 20:07     ` Johannes Berg
2008-07-09 20:55       ` Ihar Hrachyshka
2008-07-09 21:02         ` Johannes Berg
2008-07-10  6:41     ` Holger Schurig
2008-07-09 21:07   ` Ihar Hrachyshka
  -- strict thread matches above, loose matches on Subject: below --
2008-01-25 13:15 Holger Schurig
2008-01-25 15:46 ` Dan Williams

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=20080709092958.72e82f25@promwad.com \
    --to=ihar.hrachyshka@promwad.com \
    --cc=harvey.harrison@gmail.com \
    --cc=libertas-dev@lists.infradead.org \
    --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).