From owner-freebsd-current@FreeBSD.ORG Sun Oct 22 11:13:45 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3D2716A407; Sun, 22 Oct 2006 11:13:45 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BA5A43D75; Sun, 22 Oct 2006 11:13:44 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp3-g19.free.fr (Postfix) with ESMTP id 63B07497BB; Sun, 22 Oct 2006 13:13:43 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 2BBDC9E6C2; Sun, 22 Oct 2006 11:14:32 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 17D74405B; Sun, 22 Oct 2006 13:14:32 +0200 (CEST) Date: Sun, 22 Oct 2006 13:14:32 +0200 From: Jeremie Le Hen To: Damien Bergamini Message-ID: <20061022111431.GV53114@obiwan.tataz.chchile.org> References: <20061021225146.GT53114@obiwan.tataz.chchile.org> <00aa01c6f5b1$d8e8a6a0$0300a8c0@COMETE> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00aa01c6f5b1$d8e8a6a0$0300a8c0@COMETE> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: mlaier@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: not enough rates in struct iwi_rateset X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Oct 2006 11:13:45 -0000 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 >