From d81b3a5588d407699925c3a0f30d2c5fc9279281 Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Sat, 30 Jun 2007 21:39:21 +0000 Subject: Fix scanning issues since the new net80211 code went in - provide dummy routines for ic_scan_curchan and ic_scan_mindwell, we do not support those operations. - add ieee80211_scan_done() to tell the scanning module that all channels have been scanned. - pass IEEE80211_S_SCAN state off to net80211 so it can initiate scanning - fix overflow in the rates array - scale the rate value passed back from the firmware scan to the units that net80211 uses. Submitted by: Token Reviewed by: sam, avatar Approved by: re (kensmith) --- sys/net80211/ieee80211_scan.c | 23 +++++++++++++---------- sys/net80211/ieee80211_scan.h | 1 + 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'sys/net80211') diff --git a/sys/net80211/ieee80211_scan.c b/sys/net80211/ieee80211_scan.c index 883565476128..35584e542125 100644 --- a/sys/net80211/ieee80211_scan.c +++ b/sys/net80211/ieee80211_scan.c @@ -626,6 +626,19 @@ ieee80211_scan_next(struct ieee80211com *ic) scan_next(ic->ic_scan); } +/* + * Public access to scan_next for drivers that are not able to scan single + * channels (e.g. for firmware-based devices). + */ +void +ieee80211_scan_done(struct ieee80211com *ic) +{ + struct ieee80211_scan_state *ss = ic->ic_scan; + + ss->ss_next = ss->ss_last; /* all channels are complete */ + scan_next(ss); +} + /* * Scan curchan. If this is an active scan and the channel * is not marked passive then send probe request frame(s). @@ -897,17 +910,7 @@ ieee80211_add_scan(struct ieee80211com *ic, ieee80211_chan2ieee(ic, ic->ic_curchan), channel_type(ic->ic_curchan), ticks, SCAN_PRIVATE(ss)->ss_chanmindwell); - /* - * XXX - * We want to just kick the timer and still - * process frames until it fires but linux - * will livelock unless we discard frames. - */ -#if 0 SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_MINDWELL; -#else - SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_DISCARD; -#endif /* * NB: trigger at next clock tick or wait for the * hardware diff --git a/sys/net80211/ieee80211_scan.h b/sys/net80211/ieee80211_scan.h index d8953c4c1b88..fed5e0b71566 100644 --- a/sys/net80211/ieee80211_scan.h +++ b/sys/net80211/ieee80211_scan.h @@ -83,6 +83,7 @@ int ieee80211_check_scan(struct ieee80211com *, int flags, u_int duration, int ieee80211_bg_scan(struct ieee80211com *); void ieee80211_cancel_scan(struct ieee80211com *); void ieee80211_scan_next(struct ieee80211com *); +void ieee80211_scan_done(struct ieee80211com *); struct ieee80211_scanparams; void ieee80211_add_scan(struct ieee80211com *, -- cgit v1.2.3