summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_iwx.c
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2023-03-06 11:21:25 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2023-03-06 11:21:25 +0000
commitaa8c3f14da59aa4813a6da6f63dc21582150a081 (patch)
tree8be9ed750abff5a2dcc2ed5759020ebd0a7060a9 /sys/dev/pci/if_iwx.c
parentcac141f7f7f786ac6565100a6f02320465537997 (diff)
fix iwx session protection event duration
Firmware expects time in TU units. Use 900 TU for the session protection timeout, like the linux driver does. verified with Johannes Berg from Linux/Intel, thanks for the support!
Diffstat (limited to 'sys/dev/pci/if_iwx.c')
-rw-r--r--sys/dev/pci/if_iwx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c
index d12efc25daf..47a93cfddde 100644
--- a/sys/dev/pci/if_iwx.c
+++ b/sys/dev/pci/if_iwx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwx.c,v 1.163 2023/03/06 11:18:37 stsp Exp $ */
+/* $OpenBSD: if_iwx.c,v 1.164 2023/03/06 11:21:24 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -2978,14 +2978,14 @@ iwx_post_alive(struct iwx_softc *sc)
int
iwx_schedule_session_protection(struct iwx_softc *sc, struct iwx_node *in,
- uint32_t duration)
+ uint32_t duration_tu)
{
struct iwx_session_prot_cmd cmd = {
.id_and_color = htole32(IWX_FW_CMD_ID_AND_COLOR(in->in_id,
in->in_color)),
.action = htole32(IWX_FW_CTXT_ACTION_ADD),
.conf_id = htole32(IWX_SESSION_PROTECT_CONF_ASSOC),
- .duration_tu = htole32(duration * IEEE80211_DUR_TU),
+ .duration_tu = htole32(duration_tu),
};
uint32_t cmd_id;
int err;
@@ -8183,9 +8183,9 @@ iwx_auth(struct iwx_softc *sc)
* by "protecting" the session with a time event.
*/
if (in->in_ni.ni_intval)
- duration = in->in_ni.ni_intval * 2;
+ duration = in->in_ni.ni_intval * 9;
else
- duration = IEEE80211_DUR_TU;
+ duration = 900;
return iwx_schedule_session_protection(sc, in, duration);
rm_mgmt_queue:
if (generation == sc->sc_generation)