mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 00:20:29 +00:00
bump the scan generation number before iterating so we're guaranteed
to have a value that's not been used before; this fixes the problem where the first traversal of the scan list did nothing because the entries were initialized with the current generation number (a separate issue) MFC after: 1 week
This commit is contained in:
parent
347daa0f17
commit
a1a5050276
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154532
|
@ -1784,7 +1784,7 @@ ieee80211_timeout_stations(struct ieee80211_node_table *nt)
|
|||
isadhoc = (ic->ic_opmode == IEEE80211_M_IBSS ||
|
||||
ic->ic_opmode == IEEE80211_M_AHDEMO);
|
||||
IEEE80211_SCAN_LOCK(nt);
|
||||
gen = nt->nt_scangen++;
|
||||
gen = ++nt->nt_scangen;
|
||||
IEEE80211_DPRINTF(ic, IEEE80211_MSG_NODE,
|
||||
"%s: %s scangen %u\n", __func__, nt->nt_name, gen);
|
||||
restart:
|
||||
|
@ -1928,7 +1928,7 @@ ieee80211_iterate_nodes(struct ieee80211_node_table *nt, ieee80211_iter_func *f,
|
|||
u_int gen;
|
||||
|
||||
IEEE80211_SCAN_LOCK(nt);
|
||||
gen = nt->nt_scangen++;
|
||||
gen = ++nt->nt_scangen;
|
||||
restart:
|
||||
IEEE80211_NODE_LOCK(nt);
|
||||
TAILQ_FOREACH(ni, &nt->nt_node, ni_list) {
|
||||
|
|
Loading…
Reference in a new issue