summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorVladimir Davydov <vladimir.davydov@promwad.com>2007-09-06 21:45:36 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:52:28 -0700
commitac630c2b1933e79ff32e3653ae656620cf4b4c79 (patch)
tree187debee339f616dad7ad9083095f99b516ff047 /drivers
parentf31ce76b781d15ab6b529663b95223f58171ec80 (diff)
[LIBERTAS]: fix oops on the blackfin architecture
Fixing memory alignment problems on the blackfin architecture (maybe on the ARM also) Signed-off-by: Vladimir Davydov <vladimir.davydov@promwad.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/scan.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index 8f073ad1957..fab93d8fe9c 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -13,6 +13,8 @@
#include <net/ieee80211.h>
#include <net/iw_handler.h>
+#include <asm/unaligned.h>
+
#include "host.h"
#include "decl.h"
#include "dev.h"
@@ -888,7 +890,7 @@ static int libertas_process_bss(struct bss_descriptor * bss,
if (*bytesleft >= sizeof(beaconsize)) {
/* Extract & convert beacon size from the command buffer */
- beaconsize = le16_to_cpup((void *)*pbeaconinfo);
+ beaconsize = le16_to_cpu(get_unaligned((u16 *)*pbeaconinfo));
*bytesleft -= sizeof(beaconsize);
*pbeaconinfo += sizeof(beaconsize);
}
@@ -1698,10 +1700,10 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
goto done;
}
- bytesleft = le16_to_cpu(pscan->bssdescriptsize);
+ bytesleft = le16_to_cpu(get_unaligned((u16*)&pscan->bssdescriptsize));
lbs_deb_scan("SCAN_RESP: bssdescriptsize %d\n", bytesleft);
- scanrespsize = le16_to_cpu(resp->size);
+ scanrespsize = le16_to_cpu(get_unaligned((u16*)&resp->size));
lbs_deb_scan("SCAN_RESP: returned %d AP before parsing\n",
pscan->nr_sets);