ARM patches for orinoco

David Gibson hermes at gibson.dropbear.id.au
Thu Feb 28 10:15:15 EST 2002


On Mon, Feb 25, 2002 at 10:41:33PM -0700, Ben Greear wrote:
> The patch is attached.  Some of it you probably will not
> want (the debug stuff).  The reset code doesn't actually
> seem to help me, but it is no worse than the current state
> (both of which are totally broken).  I think that a more
> thorough reset (can you power the device down in software?)
> might help rejuvinate the system...

Most cards can be powered down in software, but the means of doing so
depends on the interface type (PCMCIA / PLX / Airport).

> The alignment pads and __attribute__ packed changes
> actually seem to make it work on ARM w/out special
> compilation hacks.  I think these should definately
> go in...  In the future, you may want to design your
> structures such that they are aligned to 4 byte boundaries,
> internally too.  In other words, don't do this:
> 
> struct foo {
>   char a;
>   uint32 i;
>   uint16 u;
>   char a1;
> };
> 
> But instead, perhaps do this:
> struct foo {
>   char a;
>   char a1;
>   uint16 u;
>   uint32 i;
> };

I've added the ((packed)) attribute to struct p8022_hdr, but not to
struct hermes.  As long as each of the modules are compiled with the
same options it shouldn't matter how struct hermes is aligned - it's a
purely internal structure.  The only structures where ((packed))
should matter are where they are mapped onto external byte streams -
actual packets from the card.  In which case I obviously can't reorder
the elements.

-- 
David Gibson			| For every complex problem there is a
david at gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.  -- H.L. Mencken
http://www.ozlabs.org/people/dgibson





More information about the wireless mailing list