20 byte header on SD8686 rx packets

Dan Williams dcbw at redhat.com
Tue Aug 4 13:03:24 EDT 2009


On Mon, 2009-07-13 at 08:48 +0100, Bob Dunlop wrote:
> Hi,
> 
> On Sat, Jul 11 at 11:51, Erwin Authried wrote:
> > Hi Bob,
> > 
> > it looks like you have to use the "packed" attribute for the union as
> > well as each struct inside the union, otherwise the compiler for the ARM
> > will align the size to next 32-bit boundary.
> 
> Yep, I've revisited the tests this morning and I can get everything to work
> with just the following patch.  I was putting the attribute directives in
> the wrong place last week.  You do need both directives as shown.
> 
> This is with Gcc 3.4.5 but I guess the extra directives are harmless on
> later versions of the compiler.

Can I get a Signed-off-by: as specified by here (5. Sign your work) ?

http://linux.yyz.us/patch-format.html

then i can forward it (bonus points if you also make the packing changes
to txpd) to linux-wireless where it'll actually get applied.

Thanks!
Dan


> 
> diff -u linux-2.6.31-rc2/drivers/net/wireless/libertas/hostcmd.h{-orig,}
> --- linux-2.6.31-rc2/drivers/net/wireless/libertas/hostcmd.h-orig     2009-07-04 18:58:48.000000000 +0100
> +++ linux-2.6.31-rc2/drivers/net/wireless/libertas/hostcmd.h  2009-07-13 08:27:45.000000000 +0100
> @@ -56,8 +56,8 @@
>                         u8 bss_type;
>                         /* BSS number */
>                         u8 bss_num;
> -               } bss;
> -       } u;
> +               } __attribute__ ((packed)) bss;
> +       } __attribute__ ((packed)) u;
>  
>         /* SNR */
>         u8 snr;
> 




More information about the libertas-dev mailing list