diff options
author | Andrew Thompson <thompsa@FreeBSD.org> | 2007-06-30 21:39:21 +0000 |
---|---|---|
committer | Andrew Thompson <thompsa@FreeBSD.org> | 2007-06-30 21:39:21 +0000 |
commit | d81b3a5588d407699925c3a0f30d2c5fc9279281 (patch) | |
tree | 306cc9408848851d98d30d3afd746ba9f8d4a1f4 /sys/net80211/ieee80211_scan.c | |
parent | b54b1bab4b4327346a420892b43703bc189462f0 (diff) | |
download | src-d81b3a5588d407699925c3a0f30d2c5fc9279281.tar.gz src-d81b3a5588d407699925c3a0f30d2c5fc9279281.zip |
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)
Notes
Notes:
svn path=/head/; revision=171125
Diffstat (limited to 'sys/net80211/ieee80211_scan.c')
-rw-r--r-- | sys/net80211/ieee80211_scan.c | 23 |
1 files changed, 13 insertions, 10 deletions
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 @@ -627,6 +627,19 @@ ieee80211_scan_next(struct ieee80211com *ic) } /* + * 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). * Arrange for the channel change after maxdwell ticks. @@ -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 |