ath lor
Adrian Chadd
adrian.chadd at gmail.com
Fri Jul 27 19:33:14 UTC 2012
.. hm, so. This is quite annoying, really.
ieee80211_iterate_nodes() is called from hostap_newstate() to do a
bunch of things, including:
* calling sta_diassoc() on each STA;
* handling CSA for each STA (for DFS channel change) via sta_csa();
* dropping stations when doing a CSA (via sta_drop());
Now, at this point the _newstate() routine has the comlock
(IEEE80211_LOCK()) held.
So, any function that is passed to ieee80211_iterate_nodes() that also
tries to grab the comlock is going to silently fail.
It may _be_ that the only sensible thing to do here is to force the
comlock is held before calling ieee80211_iterate_nodes(), and then
update all the functions that it calls to require the comlock be held.
So, that'd currently be (in net80211, ignoring what are in drivers atm):
* sta_leave()
* load_ucastkey()
* sta_disassoc()
* sta_csa()
* sta_drop()
* get_sta_space()
* get_sta_info()
* domlme()
* mesh_vdetach_peers()
* mesh_checkid()
* get_adhoc_rssi()
* get_hostap_rssi()
* get_mesh_rssi()
.. and that's kind of scary, because a lot of those will call into the
driver and do things like transmit frames; and we absolutely can't
hold the comlock when doing that or all kinds of bad LORs will occur.
Fixing this is going to take a little more time/patience. I'm open to
other ideas/suggestions on this.
Adrian
More information about the freebsd-wireless
mailing list