summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2016-09-21 13:57:36 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2016-09-21 13:57:36 +0000
commit62f0ae3b27434276777a6e15342138bfd244d4cc (patch)
treec66e46dc3c5395048becf1556c5953bbef4d163e
parent873e166844549fd332f5425a0dde679be92fb4af (diff)
Make iwm protect the session during association more like Linux does it.
ok sthen@
-rw-r--r--sys/dev/pci/if_iwm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index f4a3dffb84e..d9cbc7685fa 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.137 2016/09/21 13:53:18 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.138 2016/09/21 13:57:35 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -5211,9 +5211,11 @@ iwm_auth(struct iwm_softc *sc)
* Prevent the FW from wandering off channel during association
* by "protecting" the session with a time event.
*/
- /* XXX duration is in units of TU, not MS */
- duration = IWM_TE_SESSION_PROTECTION_MAX_TIME_MS;
- iwm_protect_session(sc, in, duration, 500 /* XXX magic number */);
+ if (in->in_ni.ni_intval)
+ duration = in->in_ni.ni_intval * 2;
+ else
+ duration = IEEE80211_DUR_TU;
+ iwm_protect_session(sc, in, duration, in->in_ni.ni_intval / 2);
DELAY(100);
return 0;