[PATCH 3/3] libertas: fix memory alignment problems on the blackfin

Dan Williams dcbw at redhat.com
Thu Jan 24 18:21:41 EST 2008


On Thu, 2008-01-24 at 20:52 +0200, Ihar Hrachyshka wrote:
> Fixing  unaligned memory access  on the blackfin architecture (maybe on the 
> ARM also).
> 
> Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka at promwad.com>

This looks like the same patch as #1...

Dan

> ---
> 
> diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
> index 9a61188..9e45ba8 100644
> --- a/drivers/net/wireless/libertas/scan.c
> +++ b/drivers/net/wireless/libertas/scan.c
> @@ -755,11 +755,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((u16 *)pos));
>         pos += 2;
>  
>         /* capability information is 2 bytes long */
> -       bss->capability = le16_to_cpup((void *) pos);
> +       bss->capability = le16_to_cpu(get_unaligned((u16 *)pos));
>         lbs_deb_scan("process_bss: capabilities 0x%04x\n",
> bss->capability);
>         pos += 2; 
> 
> 
> 




More information about the libertas-dev mailing list