[Prism54-devel] Bug with endianess

Aurelien slts@free.fr
Wed, 10 Dec 2003 08:31:25 +0100


On Wed, 10 Dec 2003 09:17:41 +0200
kaleda <gadeanta@soften.ktu.lt> wrote:

> > That's true. Thanks for the report. Moreover, it shows that this function is totally stupid (hehe that piece of code was written by intersil ;-)) Because we know that
> > 	MGT_GET_REQUEST_U32(priv, DOT11_OID_FREQUENCY...
> > will return a frequency and not a channel.
> There's no problem:
> iwconfig (wireless tools) can show channel (if less than 1000) 
> as well as frequency (> 1000).
> (The only problem is - you cannot show both at the same time).
No there is no problem, but what I said is that we don't need to find if the card returned a channel or a frequency. The oid used determines it.
 DOT11_OID_FREQUENCY returns a frequency
 DOT11_OID_CHANNEL a channel 



> > But the fix is not so simple because when the card 
> > is not ready (ie we cache the set requests), it is 
> > possible that channel is set but not frequency...
> When the card is not ready - it will show the last set parameter (freq
> or channel) . When the card is ready - it will show frequency.
> 
> What I can suggest - change DOT11_OID_FREQUENCY into DOT11_OID_CHANNEL,
> 'cause ordinarry user always operates in channels, and he's not
> interested in frequency.
No, if frequency is not set we need to read the channel. But if channel is not set, we have to read frequency.
Moreover, it shows another caching problem : if one sets frequency and channel differently (ie channel=6 and the freq=(freq from channel 1)). Which one should we use ? Easy to fix, but I'll do it later.

> I've got one more problem:
> I insmod module, ifup interface and do some (many) settings.
> And after some time seems, that card looses its mode (seems like module
> thinks it's not in running state):
> iwconfig shows mac address all zeros, when I try to change channel - it
> reports, that illegal parameters and so on, and finally i do ifdown and
> again ifup interface - and get oops on in function prism54_mib_init on
> assertion BUG_ON.
> Possibly it's also problem with endianess (I'm working on big endian arm
> board).
> 
> Haven't found the problem - still searching.
> 
> Kaleda
I'll look into it later

	...And justice for all