All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ihar Hrachyshka <ihar.hrachyshka@promwad.com>
To: libertas-dev@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] libertas: fix memory alignment problems on the blackfin
Date: Wed, 9 Jul 2008 03:18:50 +0300	[thread overview]
Message-ID: <20080709031850.2e7bf50f@promwad.com> (raw)

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..9dbfad3 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 = le16_to_cpu(get_unaligned((__le16 *)pos));
	pos += 2;

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


             reply	other threads:[~2008-07-09  0:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09  0:18 Ihar Hrachyshka [this message]
2008-07-09  0:24 ` [PATCH] libertas: fix memory alignment problems on the blackfin Harvey Harrison
2008-07-09  6:29   ` Ihar Hrachyshka
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=20080709031850.2e7bf50f@promwad.com \
    --to=ihar.hrachyshka@promwad.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.