summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_node.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-01-18 19:59:40 +0000
committersam <sam@FreeBSD.org>2005-01-18 19:59:40 +0000
commit4c9a185523b963e32b04d8114b4b3f1e582b7c6f (patch)
treee7f8473009184815a4872e6e036509552ab62b8e /sys/net80211/ieee80211_node.c
parent5d86ecca9fc1ae8d87d4f8078545386648502074 (diff)
downloadFreeBSD-src-4c9a185523b963e32b04d8114b4b3f1e582b7c6f.zip
FreeBSD-src-4c9a185523b963e32b04d8114b4b3f1e582b7c6f.tar.gz
when scanning is interrupted reset state so table entries go in the station
table and not the scan table Noticed by: Tai-hwa Liang
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-rw-r--r--sys/net80211/ieee80211_node.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index d16a687..e865c67 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -570,6 +570,20 @@ ieee80211_node_compare(struct ieee80211com *ic,
}
/*
+ * Mark an ongoing scan stopped.
+ */
+void
+ieee80211_cancel_scan(struct ieee80211com *ic)
+{
+
+ IEEE80211_DPRINTF(ic, IEEE80211_MSG_SCAN, "%s: end %s scan\n",
+ __func__,
+ (ic->ic_flags & IEEE80211_F_ASCAN) ? "active" : "passive");
+
+ ic->ic_flags &= ~(IEEE80211_F_SCAN | IEEE80211_F_ASCAN);
+}
+
+/*
* Complete a scan of potential channels.
*/
void
@@ -578,15 +592,12 @@ ieee80211_end_scan(struct ieee80211com *ic)
struct ieee80211_node *ni, *nextbs, *selbs;
struct ieee80211_node_table *nt;
- IEEE80211_DPRINTF(ic, IEEE80211_MSG_SCAN, "end %s scan\n",
- (ic->ic_flags & IEEE80211_F_ASCAN) ? "active" : "passive");
+ ieee80211_cancel_scan(ic);
+ ieee80211_notify_scan_done(ic);
- ic->ic_flags &= ~(IEEE80211_F_SCAN | IEEE80211_F_ASCAN);
nt = &ic->ic_scan;
ni = TAILQ_FIRST(&nt->nt_node);
- ieee80211_notify_scan_done(ic);
-
if (ic->ic_opmode == IEEE80211_M_HOSTAP) {
u_int8_t maxrssi[IEEE80211_CHAN_MAX]; /* XXX off stack? */
int i, bestchan;
OpenPOWER on IntegriCloud