diff options
author | sam <sam@FreeBSD.org> | 2006-01-18 19:56:17 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2006-01-18 19:56:17 +0000 |
commit | c239d3a5b8a982229eea0cee81f0b94c31813188 (patch) | |
tree | 98e5edd3911aa71963827ead509bcf143ca3fa60 /sys/net80211/ieee80211_node.c | |
parent | 471e2b71d13bd2d2b69d6ed30943ae193893965d (diff) | |
download | FreeBSD-src-c239d3a5b8a982229eea0cee81f0b94c31813188.zip FreeBSD-src-c239d3a5b8a982229eea0cee81f0b94c31813188.tar.gz |
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
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index a26f860..9466d73 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -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) { |