From c239d3a5b8a982229eea0cee81f0b94c31813188 Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 18 Jan 2006 19:56:17 +0000 Subject: 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 --- sys/net80211/ieee80211_node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/net80211/ieee80211_node.c') 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) { -- cgit v1.1