Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Aug 2012 10:05:04 -0700
From:      Adrian Chadd <adrian.chadd@gmail.com>
To:        PseudoCylon <moonlightakkiy@yahoo.ca>
Cc:        freebsd-wireless@freebsd.org, Kim Culhan <w8hdkim@gmail.com>
Subject:   Re: ath lor
Message-ID:  <CAJ-VmokoURqGmD=U_=p0noeGbLBwTbW63fMfo8Teb7iw3U_W-g@mail.gmail.com>
In-Reply-To: <CAFZ_MYKnKmM2M%2BpcifxWNcp-pXsJGhb2i7aRo94JK3jqUyaNrw@mail.gmail.com>
References:  <CAFZ_MYKgUkryy4parts3QahAyPA7FY9xUqC98_E7oFW%2BzarA8A@mail.gmail.com> <CAFZ_MYKeOKxT3k7JWHjdH83vbieZ6JpXe0kbXTJy4neEd5Aqew@mail.gmail.com> <CAJ-VmomGBvgLwFEcXbEuYkAj=g%2By8zVo8cT2nSSMdydCk=OhYQ@mail.gmail.com> <CAFZ_MYJP97aO73zLpJF9%2B8MiQVqAHGNngmtOakYDcaikvyq7og@mail.gmail.com> <CAJ-VmomSTcTFVQovOaGB9_7kTh_R9Z2W4bypknHVrtykYz2SMg@mail.gmail.com> <CAFZ_MYKnKmM2M%2BpcifxWNcp-pXsJGhb2i7aRo94JK3jqUyaNrw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokoURqGmD=U_=p0noeGbLBwTbW63fMfo8Teb7iw3U_W-g>