diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-09-04 09:11:47 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-09-04 09:11:47 +0000 |
commit | 8244ec821906c0354c162cab673d587f8f73576d (patch) | |
tree | e99f59fcb715daf244620741e3d2dbc76250a85f /sys | |
parent | e73d04820d9bcd2b36c88658292e74d4b49fc0b6 (diff) |
If a beacon is received in RUN state, reset the management timer.
Some wifi drivers send a probe request if the hardware reports "missed beacon"
events. If the AP replies with a probe response it is still servicing us and
there is no need to search for a new AP. However, the management timer was not
reset if a beacon was received while in RUN state. So the interface watchdog
always ended up putting the driver into SCAN state after a missed beacon event,
even if the AP did respond to our probe request. Under some conditions this
bug would cause spurious disconnects.
Problem reported and fix tested by mlarkin@
(Using the management timer in RUN state is a new convention. Before support
for missed beacons was added, this timer was only used during the association
sequence to handle APs which don't respond to our assoc requests and such.)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 85a5e4aea0c..e7add1e4a75 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_input.c,v 1.195 2017/08/04 17:31:05 stsp Exp $ */ +/* $OpenBSD: ieee80211_input.c,v 1.196 2017/09/04 09:11:46 stsp Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe @@ -1582,6 +1582,14 @@ ieee80211_recv_probe_resp(struct ieee80211com *ic, struct mbuf *m, ic->ic_curmode == IEEE80211_MODE_11A || (capinfo & IEEE80211_CAPINFO_SHORT_SLOTTIME)); } + + /* + * Reset management timer. If it is non-zero in RUN state, the + * driver sent a probe request after a missed beacon event. + * This probe response indicates the AP is still serving us + * so don't allow ieee80211_watchdog() to move us into SCAN. + */ + ic->ic_mgt_timer = 0; } /* * We do not try to update EDCA parameters if QoS was not negotiated |