summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2023-03-06 11:37:15 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2023-03-06 11:37:15 +0000
commit08b0208adac2044d9e7d59f1281b277b672d4e06 (patch)
tree007ebe3d85be4d9acad86efe0f5fdc0f474e82c7 /sys/dev
parent474627b1bea306d651b1b2375eb2475c9e5114d7 (diff)
fix previous: only ignore request to delete key while doing crypto in hardware
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_iwx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c
index b1d8498a5fb..edd3cb77a45 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.167 2023/03/06 11:33:57 stsp Exp $ */
+/* $OpenBSD: if_iwx.c,v 1.168 2023/03/06 11:37:14 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -8577,15 +8577,15 @@ iwx_delete_key(struct ieee80211com *ic, struct ieee80211_node *ni,
struct iwx_softc *sc = ic->ic_softc;
struct iwx_add_sta_key_cmd cmd;
- if ((sc->sc_flags & IWX_FLAG_STA_ACTIVE) == 0)
- return;
-
if (k->k_cipher != IEEE80211_CIPHER_CCMP) {
/* Fallback to software crypto for other ciphers. */
ieee80211_delete_key(ic, ni, k);
return;
}
+ if ((sc->sc_flags & IWX_FLAG_STA_ACTIVE) == 0)
+ return;
+
memset(&cmd, 0, sizeof(cmd));
cmd.common.key_flags = htole16(IWX_STA_KEY_NOT_VALID |