[PATCH] libertas: fix memory alignment problems on the blackfin
Ihar Hrachyshka
ihar.hrachyshka at promwad.com
Wed Jul 9 02:29:58 EDT 2008
> 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 at 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;
More information about the libertas-dev
mailing list