ath lor
Adrian Chadd
adrian.chadd at gmail.com
Wed Aug 1 17:05:06 UTC 2012
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
More information about the freebsd-wireless
mailing list