From owner-freebsd-wireless@FreeBSD.ORG Thu Aug 2 11:26:22 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFAC91065670 for ; Thu, 2 Aug 2012 11:26:22 +0000 (UTC) (envelope-from moonlightakkiy@yahoo.ca) Received: from nm25-vm0.bullet.mail.sp2.yahoo.com (nm25-vm0.bullet.mail.sp2.yahoo.com [98.139.91.228]) by mx1.freebsd.org (Postfix) with SMTP id 76C068FC14 for ; Thu, 2 Aug 2012 11:26:22 +0000 (UTC) Received: from [98.139.91.66] by nm25.bullet.mail.sp2.yahoo.com with NNFMP; 02 Aug 2012 11:26:16 -0000 Received: from [208.71.42.190] by tm6.bullet.mail.sp2.yahoo.com with NNFMP; 02 Aug 2012 11:25:16 -0000 Received: from [127.0.0.1] by smtp201.mail.gq1.yahoo.com with NNFMP; 02 Aug 2012 11:25:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1343906716; bh=WYH97QEL3aV65K6DBu7vM1eAFLWSN0oKLiDQjXvYiz0=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type; b=MDCsGypDh6xGecRnGRrQm+UA7t8Ao2OHjhcmQuBMgPfwTg16wQKLQwu3+HGGyybVP9NU51jAIKNDwyUHRTQ34Wm0uCI+OQzOFadiBX6iGPsJuil4p/4pxK2Xu8aBU8img7INx9lVwKvkTxiIMVo4WTKvgDEYt2icbe3QOi27HMo= X-Yahoo-Newman-Id: 362568.56958.bm@smtp201.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 47hk_skVM1n1uS.zmskDU1ZQAS4qCHNyW5qp_U0E3GP8BBd RcLU8s2gvS1RuPFTYauQMBsr7i0OtgbjbQIY3hdzxHeiVNu5AXwfVRr4T5qL rBUEtLdKzZBkbiNKY7amXjUdRZIC0_I0KWMguiyHFwFrVmeHAGr9B1yZcHRh GhPj5ki4RLiEoNA7fB7VyJjM4Z4SFPn3t1EZi6SqLLRMrghWoUJYFX_pAbJu So3a847P4hZ7UF133wRbSSGJvNLVfZ2m57lva5NRMRQeP5_i4xGTpjeVigrM bSqnt2MJtMCuDr1lt_or0eGQpgktZAOSuhWYIwBlDqR.04qPVokhtY1ijB32 ro6nvWdWDtXwxyagFPYGYwdVgkqvnDXe2bPKlJoH1LpIJn4NhguSkVceVBTl FER5eyLses0BCpn3POJQRUVFrmcZQOdHbzDJdFYA0_wsMYSn1sP39frg2yQH kzH2OpkMefYny79ylnNrAZlN018KnzxfGTluyFI7zaX7TBOLR79FRAvzAx17 iqmlkCyjutb.J0E4S.6GnkyOLhngQWBEJRVES1ULEIxth8CZc.YUnyReBCYI 7VzPlFHNhIAjeqkyqhiEqiYj4tiT6DNjTtmG._vLofnzx0HYcZadcKtzBTb1 cqfj39SgQ4IZYl3vE5Iie85QXyP8mUmai3LRWBmm9Tss- X-Yahoo-SMTP: Xr6qjFWswBAEmd20sAvB4Q3keqXvXsIH9TjJ Received: from mail-vc0-f182.google.com (moonlightakkiy@209.85.220.182 with plain) by smtp201.mail.gq1.yahoo.com with SMTP; 02 Aug 2012 04:25:16 -0700 PDT Received: by vcbgb22 with SMTP id gb22so9808079vcb.13 for ; Thu, 02 Aug 2012 04:25:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.189.69 with SMTP id gg5mr8651497vec.6.1343906715439; Thu, 02 Aug 2012 04:25:15 -0700 (PDT) Received: by 10.59.10.194 with HTTP; Thu, 2 Aug 2012 04:25:15 -0700 (PDT) In-Reply-To: References: Date: Thu, 2 Aug 2012 05:25:15 -0600 Message-ID: From: PseudoCylon To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org, Kim Culhan Subject: Re: ath lor X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 11:26:22 -0000 On Wed, Aug 1, 2012 at 11:05 AM, Adrian Chadd wrote: > Hm, not quite there. You're still grabbing the node lock before you > call the callback. That's the wrong spot. You need to put the > NODE_LOCK/NODE_UNLOCK calls back where you assemble the list of nodes, > not when you call the callback. > > All the callback loop needs is: > > (for i = 0; ...) { > if (ni == NULL) > break; > (*f)(arg, node array entry); > ieee80211_free_node(node array entry); > } > > Ther'es no need for the node table lock there. You only use the node > table lock when you're iterating through the node table. That's being > done in the first pass. > > You're also calling ieee80211_free_node() on ni, but you're not > assigning ni anywhere. > Third time's the charm. assuming all vaps have the same iv_max_aid https://gitorious.org/ieee80211/net80211/commit/c8a1a722df1683416d4d0d9cd99c57a6b1b2bdf5/diffs/87d27559ad706e4a8c63d5a7d0ed5d2101fb3402 AK