Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Oct 2006 13:14:32 +0200
From:      Jeremie Le Hen <jeremie@le-hen.org>
To:        Damien Bergamini <damien.bergamini@free.fr>
Cc:        mlaier@FreeBSD.org, freebsd-current@FreeBSD.org
Subject:   Re: not enough rates in struct iwi_rateset
Message-ID:  <20061022111431.GV53114@obiwan.tataz.chchile.org>
In-Reply-To: <00aa01c6f5b1$d8e8a6a0$0300a8c0@COMETE>
References:  <20061021225146.GT53114@obiwan.tataz.chchile.org> <00aa01c6f5b1$d8e8a6a0$0300a8c0@COMETE>

next in thread | previous in thread | raw e-mail | index | archive | help
Damien,

On Sun, Oct 22, 2006 at 10:12:41AM +0200, Damien Bergamini wrote:
> Thanks a lot for pointing that out.
> I think the correct fix would be to copy only the minimum
> between 12 (sizeof rs.rsrates) and ni->ni_rates.rs_nrates.
> You can't just extend the size of the iwi_rateset structure
> which is a command sent to the firmware (I double-checked in
> the Intel Linux driver and they also use a structure with 12
> (IPW_MAX_RATES) rates).
> I wonder how ni->ni_rates.rs_nrates can be greater than 12
> though since we only have 12 rates max in ic->ic_sup_rates[]
> and the rate set is supposed to be negotiated at that point
> which means that any rate that we don't support should have
> been removed from ni->ni_rates.rs_rates[].
> If you could show the content of ni->ni_rates.rs_rates[],
> that might help.

Here is the content of the ieee80211_rateset structure:
% (kgdb) print ni->ni_rates
% $6 = {
%   rs_nrates = 0x0,
%   rs_rates = "\000\000\214\n\000\000\2200\177\001\000\000\000\000\202"
% }


And a more readable version of rs_rates[]:
% (kgdb) while ($i < 15)
%  >printf "%d\t%#x\n", ni->ni_rates.rs_rates[$i], ni->ni_rates.rs_rates[$i]
%  >set $i = $i + 1
%  >end
% 0       0
% 0       0
% 140     0x8c
% 10      0xa
% 0       0
% 0       0
% 144     0x90
% 48      0x30
% 127     0x7f
% 1       0x1
% 0       0
% 0       0
% 0       0
% 0       0
% 130     0x82

Feel free to ask for more informations at need.

Thank you.
Best regards,
-- 
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061022111431.GV53114>