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

Holger Schurig hs4233 at mail.mn-solutions.de
Fri Jan 25 03:04:40 EST 2008


> 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;

Just a unrelated note: your patch didn't apply cleanly. I had
to run "patch -l -p1" (to ignore whitespaces).

In the original file, I have

<TAB>bss->beaconperiod = le16_to_cpup((void *) pos);

but your patch tries to remove

<SP><SP><SP><SP><SP><SP><SP><SP>bss->beaconperiod = le16_to_cpup((void *) pos);




Maybe you want to find out what is mangling your whitespace.



More information about the libertas-dev mailing list