summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_proto.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-05-22 22:17:27 +0000
committersam <sam@FreeBSD.org>2008-05-22 22:17:27 +0000
commitbcc592e44da8c6f2e2631730f3de1bcda47f5e17 (patch)
tree2c9040b998ef8b4f584c91420c290060cf687f4f /sys/net80211/ieee80211_proto.c
parentf8640d774665c908d03218336c56a50c17b5ccbb (diff)
downloadFreeBSD-src-bcc592e44da8c6f2e2631730f3de1bcda47f5e17.zip
FreeBSD-src-bcc592e44da8c6f2e2631730f3de1bcda47f5e17.tar.gz
ignore sw beacon miss while scanning, just reset the beacon count and timer
Reviewed by: thompsa
Diffstat (limited to 'sys/net80211/ieee80211_proto.c')
-rw-r--r--sys/net80211/ieee80211_proto.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c
index fe03b15..89f69af 100644
--- a/sys/net80211/ieee80211_proto.c
+++ b/sys/net80211/ieee80211_proto.c
@@ -1323,8 +1323,25 @@ void
ieee80211_swbmiss(void *arg)
{
struct ieee80211vap *vap = arg;
+ struct ieee80211com *ic = vap->iv_ic;
+
+ /* XXX sleep state? */
+ KASSERT(vap->iv_state == IEEE80211_S_RUN,
+ ("wrong state %d", vap->iv_state));
- if (vap->iv_swbmiss_count == 0) {
+ if (ic->ic_flags & IEEE80211_F_SCAN) {
+ /*
+ * If scanning just ignore and reset state. If we get a
+ * bmiss after coming out of scan because we haven't had
+ * time to receive a beacon then we should probe the AP
+ * before posting a real bmiss (unless iv_bmiss_max has
+ * been artifiically lowered). A cleaner solution might
+ * be to disable the timer on scan start/end but to handle
+ * case of multiple sta vap's we'd need to disable the
+ * timers of all affected vap's.
+ */
+ vap->iv_swbmiss_count = 0;
+ } else if (vap->iv_swbmiss_count == 0) {
if (vap->iv_bmiss != NULL)
vap->iv_bmiss(vap);
if (vap->iv_bmiss_count == 0) /* don't re-arm timer */
OpenPOWER on IntegriCloud