orinoco_cs problem when compiled for Arm processors (Ipaq)
david at gibson.dropbear.id.au
Thu Jan 10 10:35:07 EST 2002
On Thu, Jan 10, 2002 at 02:54:53AM +0800, Clay Jones wrote:
> I was trying to get the orinoco driver working on an Ipaq running Linux.
> I have managed to get it working after a bit of fiddling with one of
> the structures. I am not a part of this list group, but I wanted to
> pass on the information in case you wish to correct the problem for
> future users.
Yes, the driver is broken for ARM (it's in the FAQ even). I think it
is fixed in the current testing version (more below).
> Symptom: After compiling and loading the driver, I was unable to get
> a dhcp lease, even though everything looked right and I connected to
> the AP.
> Problem: After some wireless sniffing, I determined that the
> Wireless packets from the Ipaq had 2 too many bytes in one of the
> headers. The ethernet header has 2 6 byte ethernet addresses,
> followed by 2 byte length/type field, followed by the data. I found
> that there was consistently 0x00 0x00 following the 2 byte length,
> and before the 0xAA 0xAA of the 802.3 header.
> Solution: In orinoco.c, both the struct orinoco_txframe_hdr and
> struct orinoco_rxframe_hdr include a struct ethhdr which is defined
> in linux/include/linux/if_eth.h but which is NOT packed. Thus the
> compiler padded 2 extra bytes onto the end of the ethhdr where it
> wasn't needed. My solution was to re-define struct ethhdr as struct
> ethhdr1 inside orinoco.c, pack it, and change all references to the
> new packed structure.
Actually, I'm surprised that was sufficient - I think I've tried that
in the past and it hasn't worked. gcc doesn't seem to reliably pack
things when there are nested structures.
> That probably isn't the most elegant of solutions, but it was fast
> and it worked. I am now able to use an orinoco card in my Ipaq.
The testing version has a neater solution, it removes the use of the
nested structure entirely.
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
More information about the wireless