diff options
author | 2020-10-22 11:24:01 +0000 | |
---|---|---|
committer | 2020-10-22 11:24:01 +0000 | |
commit | 6ac161f327b5b17f20d4c1f3c076af1784b0c672 (patch) | |
tree | 3c8f27f9dea2001b9da37dc8ff8eb7910cc5b218 | |
parent | support for session resumption in TLS1.3 does not exist yet, as (diff) | |
download | wireguard-openbsd-6ac161f327b5b17f20d4c1f3c076af1784b0c672.tar.xz wireguard-openbsd-6ac161f327b5b17f20d4c1f3c076af1784b0c672.zip |
Do not write unneeded data into the iwx(4) MAC context removal command.
This extra data seems to trigger an assertion in the firmware and
the Linux iwlwifi driver does not send this data either.
tested by Nicola Dell'Uomo and jmc@
-rw-r--r-- | sys/dev/pci/if_iwx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 5b231404a7d..724cbc696ea 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.45 2020/10/11 07:05:28 mpi Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.46 2020/10/22 11:24:01 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -5149,6 +5149,9 @@ iwx_mac_ctxt_cmd_common(struct iwx_softc *sc, struct iwx_node *in, in->in_color)); cmd->action = htole32(action); + if (action == IWX_FW_CTXT_ACTION_REMOVE) + return; + if (ic->ic_opmode == IEEE80211_M_MONITOR) cmd->mac_type = htole32(IWX_FW_MAC_TYPE_LISTENER); else if (ic->ic_opmode == IEEE80211_M_STA) @@ -5268,6 +5271,11 @@ iwx_mac_ctxt_cmd(struct iwx_softc *sc, struct iwx_node *in, uint32_t action, iwx_mac_ctxt_cmd_common(sc, in, &cmd, action); + if (action == IWX_FW_CTXT_ACTION_REMOVE) { + return iwx_send_cmd_pdu(sc, IWX_MAC_CONTEXT_CMD, 0, + sizeof(cmd), &cmd); + } + if (ic->ic_opmode == IEEE80211_M_MONITOR) { cmd.filter_flags |= htole32(IWX_MAC_FILTER_IN_PROMISC | IWX_MAC_FILTER_IN_CONTROL_AND_MGMT | |